summaryrefslogtreecommitdiff
path: root/extras/volume_id/udev_volume_id.c
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2005-02-05 05:23:26 +0100
committerGreg KH <gregkh@suse.de>2005-04-26 23:24:19 -0700
commitd9cf0b0a7c0b3549afe9cdcfc2d1d43a4bafe8a9 (patch)
treeac351a2c2db327b133ca486c9c9b70c6c43549d5 /extras/volume_id/udev_volume_id.c
parent7979e3d4b7c56acee2fe0e9a9fefb3fe0d83771e (diff)
[PATCH] udev_volume_id: rename probe_ibm into probe_dasd
Diffstat (limited to 'extras/volume_id/udev_volume_id.c')
-rw-r--r--extras/volume_id/udev_volume_id.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/extras/volume_id/udev_volume_id.c b/extras/volume_id/udev_volume_id.c
index 915c1c4117..c2a37e8547 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 = 'p';
+ char probe_main_device = 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 = 'd';
+ probe_main_device = 1;
continue;
case 'h':
case '?':
@@ -146,8 +146,7 @@ int main(int argc, char *argv[])
goto exit;
}
- switch(probe) {
- case 'p' :
+ if (probe_main_device == 0) {
/* open block device */
vid = open_classdev(class_dev);
if (vid == NULL)
@@ -158,8 +157,7 @@ int main(int argc, char *argv[])
if (volume_id_probe_all(vid, 0, size) == 0)
goto print;
- break;
- case 'd' :
+ } else {
/* if we are on a partition, open main block device instead */
class_dev_parent = sysfs_get_classdev_parent(class_dev);
if (class_dev_parent != NULL)
@@ -169,9 +167,8 @@ int main(int argc, char *argv[])
if (vid == NULL)
goto exit;
- if (probe_ibm_partition(vid) == 0)
+ if (volume_id_probe_dasd_partition(vid) == 0)
goto print;
- break;
}
printf("unknown volume type\n");