summaryrefslogtreecommitdiff
path: root/extras/volume_id
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2005-02-09 01:15:35 +0100
committerGreg KH <gregkh@suse.de>2005-04-26 23:27:03 -0700
commitbce52be81ec679bf080bb11f292c899d9fde084e (patch)
treedd7ac9e67dc26a6eaf872ba630c5bf51388e6d2f /extras/volume_id
parent9d4791b66a7756421fc699be51a7be68a5aed329 (diff)
[PATCH] udev_volume_id: fix dasd disklabel reading with -l option
Diffstat (limited to 'extras/volume_id')
-rw-r--r--extras/volume_id/udev_volume_id.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/extras/volume_id/udev_volume_id.c b/extras/volume_id/udev_volume_id.c
index c2a37e8547..d3c3fcd505 100644
--- a/extras/volume_id/udev_volume_id.c
+++ b/extras/volume_id/udev_volume_id.c
@@ -89,7 +89,7 @@ int main(int argc, char *argv[])
struct sysfs_class_device *class_dev_parent = NULL;
struct volume_id *vid = NULL;
char *devpath;
- char probe_main_device = 0;
+ char probe_disk_label = 0;
char print = 'a';
static char name[VOLUME_ID_LABEL_SIZE];
int len, i, j;
@@ -116,7 +116,7 @@ int main(int argc, char *argv[])
print = 'u';
continue;
case 'd':
- probe_main_device = 1;
+ probe_disk_label = 1;
continue;
case 'h':
case '?':
@@ -146,8 +146,7 @@ int main(int argc, char *argv[])
goto exit;
}
- if (probe_main_device == 0) {
- /* open block device */
+ if (probe_disk_label == 0) {
vid = open_classdev(class_dev);
if (vid == NULL)
goto exit;
@@ -205,7 +204,8 @@ print:
printf("%s\n", vid->type);
break;
case 'l':
- if (name[0] == '\0' || vid->usage_id != VOLUME_ID_FILESYSTEM) {
+ if (name[0] == '\0' ||
+ (vid->usage_id != VOLUME_ID_FILESYSTEM && vid->usage_id != VOLUME_ID_DISKLABEL)) {
rc = 2;
goto exit;
}