mirror of
https://github.com/AuxXxilium/eudev.git
synced 2024-12-28 06:35:34 +07:00
[PATCH] udev_volume_id: rename probe_ibm into probe_dasd
This commit is contained in:
parent
7979e3d4b7
commit
d9cf0b0a7c
@ -89,7 +89,7 @@ int main(int argc, char *argv[])
|
|||||||
struct sysfs_class_device *class_dev_parent = NULL;
|
struct sysfs_class_device *class_dev_parent = NULL;
|
||||||
struct volume_id *vid = NULL;
|
struct volume_id *vid = NULL;
|
||||||
char *devpath;
|
char *devpath;
|
||||||
char probe = 'p';
|
char probe_main_device = 0;
|
||||||
char print = 'a';
|
char print = 'a';
|
||||||
static char name[VOLUME_ID_LABEL_SIZE];
|
static char name[VOLUME_ID_LABEL_SIZE];
|
||||||
int len, i, j;
|
int len, i, j;
|
||||||
@ -116,7 +116,7 @@ int main(int argc, char *argv[])
|
|||||||
print = 'u';
|
print = 'u';
|
||||||
continue;
|
continue;
|
||||||
case 'd':
|
case 'd':
|
||||||
probe = 'd';
|
probe_main_device = 1;
|
||||||
continue;
|
continue;
|
||||||
case 'h':
|
case 'h':
|
||||||
case '?':
|
case '?':
|
||||||
@ -146,8 +146,7 @@ int main(int argc, char *argv[])
|
|||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(probe) {
|
if (probe_main_device == 0) {
|
||||||
case 'p' :
|
|
||||||
/* open block device */
|
/* open block device */
|
||||||
vid = open_classdev(class_dev);
|
vid = open_classdev(class_dev);
|
||||||
if (vid == NULL)
|
if (vid == NULL)
|
||||||
@ -158,8 +157,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (volume_id_probe_all(vid, 0, size) == 0)
|
if (volume_id_probe_all(vid, 0, size) == 0)
|
||||||
goto print;
|
goto print;
|
||||||
break;
|
} else {
|
||||||
case 'd' :
|
|
||||||
/* if we are on a partition, open main block device instead */
|
/* if we are on a partition, open main block device instead */
|
||||||
class_dev_parent = sysfs_get_classdev_parent(class_dev);
|
class_dev_parent = sysfs_get_classdev_parent(class_dev);
|
||||||
if (class_dev_parent != NULL)
|
if (class_dev_parent != NULL)
|
||||||
@ -169,9 +167,8 @@ int main(int argc, char *argv[])
|
|||||||
if (vid == NULL)
|
if (vid == NULL)
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
if (probe_ibm_partition(vid) == 0)
|
if (volume_id_probe_dasd_partition(vid) == 0)
|
||||||
goto print;
|
goto print;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("unknown volume type\n");
|
printf("unknown volume type\n");
|
||||||
|
@ -160,7 +160,7 @@ typedef struct dasd_information_t {
|
|||||||
#define BIODASDINFO _IOR(DASD_IOCTL_LETTER,1,dasd_information_t)
|
#define BIODASDINFO _IOR(DASD_IOCTL_LETTER,1,dasd_information_t)
|
||||||
#define BLKSSZGET _IO(0x12,104)
|
#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;
|
int blocksize;
|
||||||
dasd_information_t info;
|
dasd_information_t info;
|
||||||
|
@ -21,6 +21,6 @@
|
|||||||
#ifndef _VOLUME_ID_DASDLABEL_
|
#ifndef _VOLUME_ID_DASDLABEL_
|
||||||
#define _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
|
#endif
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#ifndef _VOLUME_ID_H_
|
#ifndef _VOLUME_ID_H_
|
||||||
#define _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_LABEL_SIZE 64
|
||||||
#define VOLUME_ID_UUID_SIZE 16
|
#define VOLUME_ID_UUID_SIZE 16
|
||||||
|
Loading…
Reference in New Issue
Block a user