diff options
author | Karel Zak | 2013-01-18 16:11:40 +0100 |
---|---|---|
committer | Karel Zak | 2013-03-11 12:47:30 +0100 |
commit | bddd84e7c5acfe38ebb079e6fd6f3226a27cc2aa (patch) | |
tree | 83cd96fa44af501ae48da202d1c66634ea38c20e /fdisks/gpt.c | |
parent | libfdisk: add label->changed flag (diff) | |
download | kernel-qcow2-util-linux-bddd84e7c5acfe38ebb079e6fd6f3226a27cc2aa.tar.gz kernel-qcow2-util-linux-bddd84e7c5acfe38ebb079e6fd6f3226a27cc2aa.tar.xz kernel-qcow2-util-linux-bddd84e7c5acfe38ebb079e6fd6f3226a27cc2aa.zip |
fdisk: use libfdisk label->changed
The patch is huge because it's necessary to add a pointer context to
all read_<foo> functions.
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'fdisks/gpt.c')
-rw-r--r-- | fdisks/gpt.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fdisks/gpt.c b/fdisks/gpt.c index ba7d257d2..115dcd4eb 100644 --- a/fdisks/gpt.c +++ b/fdisks/gpt.c @@ -1439,6 +1439,7 @@ static int gpt_delete_partition(struct fdisk_context *cxt, gpt_recompute_crc(gpt->pheader, gpt->ents); gpt_recompute_crc(gpt->bheader, gpt->ents); lb->nparts_cur--; + fdisk_label_set_changed(lb, 1); } return 0; @@ -1606,6 +1607,7 @@ static int gpt_add_partition( else { printf(_("Created partition %d\n"), partnum + 1); lb->nparts_cur++; + fdisk_label_set_changed(lb, 1); } return 0; @@ -1670,6 +1672,7 @@ static int gpt_create_disklabel(struct fdisk_context *cxt, struct fdisk_label *l uid->node[0], uid->node[1], uid->node[2], uid->node[3], uid->node[4], uid->node[5]); + fdisk_label_set_changed(lb, 1); done: return rc; } @@ -1721,6 +1724,8 @@ static int gpt_set_partition_type( gpt_entry_set_type(&gpt->ents[i], &uuid); gpt_recompute_crc(gpt->pheader, gpt->ents); gpt_recompute_crc(gpt->bheader, gpt->ents); + + fdisk_label_set_changed(lb, 1); return 0; } |