if (partnum < 0 || warn_geometry(cxt))
return;
- ptes[partnum].changed = 1;
if (fdisk_delete_partition(cxt, partnum) != 0)
printf(_("Could not delete partition %d\n"), partnum + 1);
else
continue;
if (fdisk_set_partition_type(cxt, i, t) == 0) {
- ptes[i].changed = 1;
printf (_("Changed type of partition '%s' to '%s'\n"),
org_t ? org_t->name : _("Unknown"),
t ? t->name : _("Unknown"));
fdisk_is_disklabel(cxt, GPT))
print_buffer(cxt, cxt->firstsector);
- else for (i = 3; i < cxt->label->nparts_max; i++)
+ else if (fdisk_is_disklabel(cxt, DOS)) {
+ for (i = 3; i < cxt->label->nparts_max; i++)
print_buffer(cxt, ptes[i].sectorbuffer);
+ }
}
static void __attribute__ ((__noreturn__)) handle_quit(struct fdisk_context *cxt)
ptes[ext_index].ext_pointer = NULL;
extended_offset = 0;
}
+ ptes[partnum].changed = 1;
clear_partition(p);
} else if (!q->sys_ind && partnum > 4) {
/* the last one in the chain - just delete */
"partitions, please see the fdisk manual page for additional "
"information.\n\n"));
+ ptes[partnum].changed = 1;
p->sys_ind = t->type;
fdisk_label_set_changed(cxt->label, 1);
return 0;