diff options
author | Fabio Massimo Di Nitto <fabbione@ubuntu.com> | 2007-02-11 02:50:00 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2007-02-11 02:50:00 -0500 |
commit | d18d7682c18b617f523df6beea5ea0bd396ed0bd (patch) | |
tree | 8e005fee2e13134e9ebdd1a3b71ef72b84351b19 /include | |
parent | 66efc5a7e3061c3597ac43a8bb1026488d57e66b (diff) |
[PARTITION]: Add whole_disk attribute.
Some partitioning systems create special partitions that
span the entire disk. One example are Sun partitions, and
this whole-disk partition exists to tell the firmware the
extent of the entire device so it can load the boot block
and do other things.
Such partitions should not be treated as normal partitions,
because all the other partitions overlap this whole-disk one.
So we'd see multiple instances of the same UUID etc. which
we do not want. udev and friends can thus search for this
'whole_disk' attribute and use it to decide to ignore the
partition.
Signed-off-by: Fabio Massimo Di Nitto <fabbione@ubuntu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/genhd.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 0a022b2f63fc..247734f7881f 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -20,6 +20,8 @@ enum { | |||
20 | LINUX_EXTENDED_PARTITION = 0x85, | 20 | LINUX_EXTENDED_PARTITION = 0x85, |
21 | WIN98_EXTENDED_PARTITION = 0x0f, | 21 | WIN98_EXTENDED_PARTITION = 0x0f, |
22 | 22 | ||
23 | SUN_WHOLE_DISK = DOS_EXTENDED_PARTITION, | ||
24 | |||
23 | LINUX_SWAP_PARTITION = 0x82, | 25 | LINUX_SWAP_PARTITION = 0x82, |
24 | LINUX_RAID_PARTITION = 0xfd, /* autodetect RAID partition */ | 26 | LINUX_RAID_PARTITION = 0xfd, /* autodetect RAID partition */ |
25 | 27 | ||
@@ -400,10 +402,14 @@ struct unixware_disklabel { | |||
400 | 402 | ||
401 | #ifdef __KERNEL__ | 403 | #ifdef __KERNEL__ |
402 | 404 | ||
405 | #define ADDPART_FLAG_NONE 0 | ||
406 | #define ADDPART_FLAG_RAID 1 | ||
407 | #define ADDPART_FLAG_WHOLEDISK 2 | ||
408 | |||
403 | char *disk_name (struct gendisk *hd, int part, char *buf); | 409 | char *disk_name (struct gendisk *hd, int part, char *buf); |
404 | 410 | ||
405 | extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev); | 411 | extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev); |
406 | extern void add_partition(struct gendisk *, int, sector_t, sector_t); | 412 | extern void add_partition(struct gendisk *, int, sector_t, sector_t, int); |
407 | extern void delete_partition(struct gendisk *, int); | 413 | extern void delete_partition(struct gendisk *, int); |
408 | 414 | ||
409 | extern struct gendisk *alloc_disk_node(int minors, int node_id); | 415 | extern struct gendisk *alloc_disk_node(int minors, int node_id); |