summaryrefslogtreecommitdiff
path: root/disk/part_efi.c
diff options
context:
space:
mode:
authorMaxime Ripard <maxime.ripard@free-electrons.com>2017-08-23 16:01:32 +0200
committerTom Rini <trini@konsulko.com>2017-09-03 11:04:51 -0400
commit47d7ee47baf2c92dad390251e6c1306afa7eea29 (patch)
treea2cace7ee1142499210cf22fc2526f1a59ab83ef /disk/part_efi.c
parent5276e8b62d958a50e90dc7e8cb8260be597ae51f (diff)
part: efi: make gpt_fill_pte take the device descriptor
The gpt_fill_pte will need to access the device block size. Let's pass the device descriptor as an argument. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'disk/part_efi.c')
-rw-r--r--disk/part_efi.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/disk/part_efi.c b/disk/part_efi.c
index fa95ce1232..807d01de39 100644
--- a/disk/part_efi.c
+++ b/disk/part_efi.c
@@ -428,8 +428,9 @@ int write_gpt_table(struct blk_desc *dev_desc,
return -1;
}
-int gpt_fill_pte(gpt_header *gpt_h, gpt_entry *gpt_e,
- disk_partition_t *partitions, int parts)
+int gpt_fill_pte(struct blk_desc *dev_desc,
+ gpt_header *gpt_h, gpt_entry *gpt_e,
+ disk_partition_t *partitions, int parts)
{
lbaint_t offset = (lbaint_t)le64_to_cpu(gpt_h->first_usable_lba);
lbaint_t last_usable_lba = (lbaint_t)
@@ -633,7 +634,7 @@ int gpt_restore(struct blk_desc *dev_desc, char *str_disk_guid,
goto err;
/* Generate partition entries */
- ret = gpt_fill_pte(gpt_h, gpt_e, partitions, parts_count);
+ ret = gpt_fill_pte(dev_desc, gpt_h, gpt_e, partitions, parts_count);
if (ret)
goto err;