diff options
| author | Karel Zak <kzak@redhat.com> | 2013-01-21 12:32:33 +0100 |
|---|---|---|
| committer | Karel Zak <kzak@redhat.com> | 2013-03-11 12:47:31 +0100 |
| commit | e76d577627acec228e76c22f6e914b8d86d69c9b (patch) | |
| tree | 95e41fc877f4fa85f727a66e353bb46e3c395566 /fdisks/fdisk.c | |
| parent | cc0c4e56aa0afe2fbeb02c96d754e4542ea807da (diff) | |
| download | util-linux-e76d577627acec228e76c22f6e914b8d86d69c9b.tar.gz | |
fdisk: (dos) move 'toggle active' code to fdiskdoslabe.c
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'fdisks/fdisk.c')
| -rw-r--r-- | fdisks/fdisk.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/fdisks/fdisk.c b/fdisks/fdisk.c index 18990f72..a73cf312 100644 --- a/fdisks/fdisk.c +++ b/fdisks/fdisk.c @@ -601,20 +601,6 @@ str_units(int n) return P_("sector", "sectors", n); } -static void -toggle_active(struct fdisk_context *cxt, int i) { - struct pte *pe = &ptes[i]; - struct partition *p = pe->part_table; - - if (IS_EXTENDED (p->sys_ind) && !p->boot_ind) - fprintf(stderr, - _("WARNING: Partition %d is an extended partition\n"), - i + 1); - p->boot_ind = (p->boot_ind ? 0 : ACTIVE_FLAG); - pe->changed = 1; - fdisk_label_set_changed(cxt->label, 1); -} - static void toggle_dos_compatibility_flag(struct fdisk_context *cxt) { struct fdisk_label *lb = fdisk_context_get_label(cxt, "dos"); @@ -1084,7 +1070,7 @@ static void command_prompt(struct fdisk_context *cxt) switch (c) { case 'a': if (fdisk_is_disklabel(cxt, DOS)) - toggle_active(cxt, get_partition(cxt, 1, partitions)); + dos_toggle_active(cxt, get_partition(cxt, 1, partitions)); else if (fdisk_is_disklabel(cxt, SUN)) toggle_sunflags(cxt, get_partition(cxt, 1, partitions), SUN_FLAG_UNMNT); |
