From: Karel Zak Date: Thu, 6 Apr 2017 11:04:09 +0000 (+0200) Subject: libfdisk: (gpt) update nparts_max X-Git-Tag: v2.30-rc1~126 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bbb574a2938fbd05ce5aae3fd0456b0f5d959360;p=thirdparty%2Futil-linux.git libfdisk: (gpt) update nparts_max Signed-off-by: Karel Zak --- diff --git a/libfdisk/src/gpt.c b/libfdisk/src/gpt.c index 36198c3bde..092954f11c 100644 --- a/libfdisk/src/gpt.c +++ b/libfdisk/src/gpt.c @@ -2678,6 +2678,9 @@ int fdisk_gpt_set_npartitions(struct fdisk_context *cxt, uint32_t entries) gpt_recompute_crc(gpt->pheader, gpt->ents); gpt_recompute_crc(gpt->bheader, gpt->ents); + /* update library info */ + cxt->label->nparts_max = gpt_get_nentries(gpt); + fdisk_info(cxt, _("Partition table length changed from %"PRIu32" to %"PRIu64"."), old, entries); fdisk_label_set_changed(cxt->label, 1);