diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/genhd.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 02fa4697a0e5..6957350e122f 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -21,6 +21,8 @@ | |||
21 | #define dev_to_part(device) container_of((device), struct hd_struct, __dev) | 21 | #define dev_to_part(device) container_of((device), struct hd_struct, __dev) |
22 | #define disk_to_dev(disk) (&(disk)->part0.__dev) | 22 | #define disk_to_dev(disk) (&(disk)->part0.__dev) |
23 | #define part_to_dev(part) (&((part)->__dev)) | 23 | #define part_to_dev(part) (&((part)->__dev)) |
24 | #define alias_name(disk) ((disk)->alias ? (disk)->alias : \ | ||
25 | (disk)->disk_name) | ||
24 | 26 | ||
25 | extern struct device_type part_type; | 27 | extern struct device_type part_type; |
26 | extern struct kobject *block_depr; | 28 | extern struct kobject *block_depr; |
@@ -58,6 +60,7 @@ enum { | |||
58 | 60 | ||
59 | #define DISK_MAX_PARTS 256 | 61 | #define DISK_MAX_PARTS 256 |
60 | #define DISK_NAME_LEN 32 | 62 | #define DISK_NAME_LEN 32 |
63 | #define ALIAS_LEN 256 | ||
61 | 64 | ||
62 | #include <linux/major.h> | 65 | #include <linux/major.h> |
63 | #include <linux/device.h> | 66 | #include <linux/device.h> |
@@ -162,6 +165,7 @@ struct gendisk { | |||
162 | * disks that can't be partitioned. */ | 165 | * disks that can't be partitioned. */ |
163 | 166 | ||
164 | char disk_name[DISK_NAME_LEN]; /* name of major driver */ | 167 | char disk_name[DISK_NAME_LEN]; /* name of major driver */ |
168 | char *alias; /* alias name of disk */ | ||
165 | char *(*devnode)(struct gendisk *gd, mode_t *mode); | 169 | char *(*devnode)(struct gendisk *gd, mode_t *mode); |
166 | 170 | ||
167 | unsigned int events; /* supported events */ | 171 | unsigned int events; /* supported events */ |