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;
print = 'u';
continue;
case 'd':
- probe = 'd';
+ probe_main_device = 1;
continue;
case 'h':
case '?':
goto exit;
}
- switch(probe) {
- case 'p' :
+ if (probe_main_device == 0) {
/* open block device */
vid = open_classdev(class_dev);
if (vid == NULL)
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)
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");
#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;
#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