The current code uses "part" or "disk" only if nothing else is
possible to recognize. It means for example partitions on loops (or
RAIDs, etc) are marked as "loop" rather than "part".
Addresses: https://github.com/karelzak/util-linux/issues/700
Signed-off-by: Karel Zak <kzak@redhat.com>
{
char *res = NULL, *p;
+ if (cxt->partition)
+ return xstrdup("part");
+
if (is_dm(cxt->name)) {
char *dm_uuid = NULL;
if (ul_path_read_s32(cxt->sysfs, &x, "device/type") == 0)
type = blkdev_scsi_type_to_name(x);
if (!type)
- type = cxt->partition ? "part" : "disk";
+ type = "disk";
res = xstrdup(type);
}