Commit cc9106247de92549e50abb0ba12d6b2fdbf0be55
Committed by
Al Viro
1 parent
8018ab0574
Exists in
master
and in
4 other branches
fs/partitions: use ADDPART_FLAG_RAID instead of magic number
ADDPART_FLAG_RAID was introduced in commit d18d768, and most places were converted to use it instead of a hardcoded value. However, some places seem to have been missed. Change all of them to the symbolic names via the following semantic patch: @@ struct parsed_partitions *state; expression E; @@ ( - state->parts[E].flags = 1 + state->parts[E].flags = ADDPART_FLAG_RAID | - state->parts[E].flags |= 1 + state->parts[E].flags |= ADDPART_FLAG_RAID | - state->parts[E].flags = 2 + state->parts[E].flags = ADDPART_FLAG_WHOLEDISK | - state->parts[E].flags |= 2 + state->parts[E].flags |= ADDPART_FLAG_WHOLEDISK ) Signed-off-by: Cesar Eduardo Barros <cesarb@cesarb.net> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Showing 3 changed files with 3 additions and 3 deletions Side-by-side Diff
fs/partitions/efi.c
... | ... | @@ -631,7 +631,7 @@ |
631 | 631 | /* If this is a RAID volume, tell md */ |
632 | 632 | if (!efi_guidcmp(ptes[i].partition_type_guid, |
633 | 633 | PARTITION_LINUX_RAID_GUID)) |
634 | - state->parts[i+1].flags = 1; | |
634 | + state->parts[i + 1].flags = ADDPART_FLAG_RAID; | |
635 | 635 | } |
636 | 636 | kfree(ptes); |
637 | 637 | kfree(gpt); |
fs/partitions/mac.c
... | ... | @@ -75,7 +75,7 @@ |
75 | 75 | be32_to_cpu(part->block_count) * (secsize/512)); |
76 | 76 | |
77 | 77 | if (!strnicmp(part->type, "Linux_RAID", 10)) |
78 | - state->parts[slot].flags = 1; | |
78 | + state->parts[slot].flags = ADDPART_FLAG_RAID; | |
79 | 79 | #ifdef CONFIG_PPC_PMAC |
80 | 80 | /* |
81 | 81 | * If this is the first bootable partition, tell the |
fs/partitions/msdos.c
... | ... | @@ -509,7 +509,7 @@ |
509 | 509 | } |
510 | 510 | put_partition(state, slot, start, size); |
511 | 511 | if (SYS_IND(p) == LINUX_RAID_PARTITION) |
512 | - state->parts[slot].flags = 1; | |
512 | + state->parts[slot].flags = ADDPART_FLAG_RAID; | |
513 | 513 | if (SYS_IND(p) == DM6_PARTITION) |
514 | 514 | printk("[DM]"); |
515 | 515 | if (SYS_IND(p) == EZD_PARTITION) |