{
struct gpt_header *h;
int rc = 0;
+ uint64_t x = 0;
assert(cxt);
assert(cxt->label);
break;
case GPT_LABELITEM_ENTRIESLBA:
/* TRANSLATORS: The start of the array of partition entries. */
- item->name = _("Partition entries LBA");
+ item->name = _("Partition entries starting LBA");
item->type = 'j';
item->data.num64 = le64_to_cpu(h->partition_entry_lba);
break;
+ case GPT_LABELITEM_ENTRIESLASTLBA:
+ /* TRANSLATORS: The end of the array of partition entries. */
+ item->name = _("Partition entries ending LBA");
+ item->type = 'j';
+ gpt_calculate_sectorsof_entries(h,
+ le32_to_cpu(h->npartition_entries), &x, cxt);
+ item->data.num64 = le64_to_cpu(h->partition_entry_lba) + x - 1;
+ break;
case GPT_LABELITEM_ENTRIESALLOC:
item->name = _("Allocated partition entries");
item->type = 'j';
* fdisk_labelitem_gpt:
* @GPT_LABELITEM_ID: GPT disklabel UUID (!= partition UUID)
* @GPT_LABELITEM_FIRSTLBA: First Usable LBA
- * @GPT_LABELITEM_LASTLBA: Usable LBA
+ * @GPT_LABELITEM_LASTLBA: Last Usable LBA
* @GPT_LABELITEM_ALTLBA: Alternative LBA (backup header LBA)
* @GPT_LABELITEM_ENTRIESLBA: Partitions entries array LBA
* @GPT_LABELITEM_ENTRIESALLOC: Number of allocated entries in entries array
+ * @GPT_LABELITEM_ENTRIESLASTLBA: Last LBA where is entries array
*
* GPT specific label items.
*/
GPT_LABELITEM_LASTLBA,
GPT_LABELITEM_ALTLBA,
GPT_LABELITEM_ENTRIESLBA,
- GPT_LABELITEM_ENTRIESALLOC
+ GPT_LABELITEM_ENTRIESALLOC,
+ GPT_LABELITEM_ENTRIESLASTLBA
};
/* script.c */