/* get info about a segment possible return values: -ENOSYS : we are not running on VM -EIO : could not perform query diagnose -ENOENT : no such segment -ENOTSUPP: multi-part segment cannot be used with linux -ENOMEM : out of memory 0 .. 6 : type of segment as defined in include/asm-s390/extmem.h  */
int segment_type(char *name)
/* get info about a segment possible return values: -ENOSYS : we are not running on VM -EIO : could not perform query diagnose -ENOENT : no such segment -ENOTSUPP: multi-part segment cannot be used with linux -ENOMEM : out of memory 0 .. 6 : type of segment as defined in include/asm-s390/extmem.h  */
int segment_type(char *name)
{
	int rc;
	struct dcss_segment seg;
	if (!MACHINE_IS_VM)
		return -ENOSYS;
	dcss_mkname(name, seg.dcss_name);
	rc = query_segment_type (&seg);
	if (rc < 0)
		return rc;
	return seg.vm_segtype;
}