aboutsummaryrefslogtreecommitdiffstats
path: root/fs/partitions/sun.c
diff options
context:
space:
mode:
authorFabio Massimo Di Nitto <fabbione@ubuntu.com>2007-02-11 02:50:00 -0500
committerDavid S. Miller <davem@davemloft.net>2007-02-11 02:50:00 -0500
commitd18d7682c18b617f523df6beea5ea0bd396ed0bd (patch)
tree8e005fee2e13134e9ebdd1a3b71ef72b84351b19 /fs/partitions/sun.c
parent66efc5a7e3061c3597ac43a8bb1026488d57e66b (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 'fs/partitions/sun.c')
-rw-r--r--fs/partitions/sun.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/partitions/sun.c b/fs/partitions/sun.c
index 0a5927c806ca..123f8b46c8ba 100644
--- a/fs/partitions/sun.c
+++ b/fs/partitions/sun.c
@@ -80,8 +80,11 @@ int sun_partition(struct parsed_partitions *state, struct block_device *bdev)
80 num_sectors = be32_to_cpu(p->num_sectors); 80 num_sectors = be32_to_cpu(p->num_sectors);
81 if (num_sectors) { 81 if (num_sectors) {
82 put_partition(state, slot, st_sector, num_sectors); 82 put_partition(state, slot, st_sector, num_sectors);
83 state->parts[slot].flags = 0;
83 if (label->infos[i].id == LINUX_RAID_PARTITION) 84 if (label->infos[i].id == LINUX_RAID_PARTITION)
84 state->parts[slot].flags = 1; 85 state->parts[slot].flags |= ADDPART_FLAG_RAID;
86 if (label->infos[i].id == SUN_WHOLE_DISK)
87 state->parts[slot].flags |= ADDPART_FLAG_WHOLEDISK;
85 } 88 }
86 slot++; 89 slot++;
87 } 90 }