chiark / gitweb /
[PATCH] udev_volume_id: rename probe_ibm into probe_dasd
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>
Sat, 5 Feb 2005 04:23:26 +0000 (05:23 +0100)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 06:24:19 +0000 (23:24 -0700)
extras/volume_id/udev_volume_id.c
extras/volume_id/volume_id/dasd/dasd.c
extras/volume_id/volume_id/dasd/dasd.h
extras/volume_id/volume_id/volume_id.h

index 915c1c411739a073b91a10a44c7260244e4f1719..c2a37e854724cefb31e0ed59fc55f7e4dc32f5cd 100644 (file)
@@ -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");
index 6f045fe32693b99f7b14f74b8284219f23f68247..5623f69d365cd2d1853a67c56f7640466840bdf9 100644 (file)
@@ -160,7 +160,7 @@ typedef struct dasd_information_t {
 #define BIODASDINFO _IOR(DASD_IOCTL_LETTER,1,dasd_information_t)
 #define BLKSSZGET _IO(0x12,104)
 
-int probe_ibm_partition(struct volume_id *id)
+int volume_id_probe_dasd_partition(struct volume_id *id)
 {
        int blocksize;
        dasd_information_t info;
index eba73f1af003ef91457a7f42f2dc242d734a695a..e7918948c9b224ef9878e9ebf0a41618bdcb9f88 100644 (file)
@@ -21,6 +21,6 @@
 #ifndef _VOLUME_ID_DASDLABEL_
 #define _VOLUME_ID_DASDLABEL_
 
-extern int probe_ibm_partition(struct volume_id *id);
+extern int volume_id_probe_dasd_partition(struct volume_id *id);
 
 #endif
index a8c47bc61658f52a4489475237f805f85e000afe..5a4b136c32dae5355ee1d3a07798ea406777bf7b 100644 (file)
@@ -21,7 +21,7 @@
 #ifndef _VOLUME_ID_H_
 #define _VOLUME_ID_H_
 
-#define VOLUME_ID_VERSION              32
+#define VOLUME_ID_VERSION              33
 
 #define VOLUME_ID_LABEL_SIZE           64
 #define VOLUME_ID_UUID_SIZE            16