summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/asm-offsets.c2
-rw-r--r--lib/efi_loader/efi_capsule.c3
-rw-r--r--lib/efi_loader/efi_disk.c4
-rw-r--r--lib/efi_loader/efi_image_loader.c2
-rw-r--r--lib/efi_loader/efi_var_file.c2
5 files changed, 8 insertions, 5 deletions
diff --git a/lib/asm-offsets.c b/lib/asm-offsets.c
index ee592cfda1..c691066332 100644
--- a/lib/asm-offsets.c
+++ b/lib/asm-offsets.c
@@ -41,5 +41,7 @@ int main(void)
DEFINE(GD_NEW_GD, offsetof(struct global_data, new_gd));
+ DEFINE(GD_ENV_ADDR, offsetof(struct global_data, env_addr));
+
return 0;
}
diff --git a/lib/efi_loader/efi_capsule.c b/lib/efi_loader/efi_capsule.c
index 9ead0d2c78..60309d4a07 100644
--- a/lib/efi_loader/efi_capsule.c
+++ b/lib/efi_loader/efi_capsule.c
@@ -901,7 +901,8 @@ static efi_status_t efi_capsule_delete_file(const u16 *filename)
/* ignore an error */
EFI_CALL((*dirh->close)(dirh));
- ret = EFI_CALL((*fh->delete)(fh));
+ if (ret == EFI_SUCCESS)
+ ret = EFI_CALL((*fh->delete)(fh));
return ret;
}
diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c
index 307d5d759b..988907ecb9 100644
--- a/lib/efi_loader/efi_disk.c
+++ b/lib/efi_loader/efi_disk.c
@@ -476,7 +476,7 @@ static efi_status_t efi_disk_add_dev(
efi_system_partition.if_type = desc->if_type;
efi_system_partition.devnum = desc->devnum;
efi_system_partition.part = part;
- EFI_PRINT("EFI system partition: %s %d:%d\n",
+ EFI_PRINT("EFI system partition: %s %x:%x\n",
blk_get_if_type_name(desc->if_type),
desc->devnum, part);
}
@@ -521,7 +521,7 @@ int efi_disk_create_partitions(efi_handle_t parent, struct blk_desc *desc,
if (part_get_info(desc, part, &info))
continue;
- snprintf(devname, sizeof(devname), "%s:%d", pdevname,
+ snprintf(devname, sizeof(devname), "%s:%x", pdevname,
part);
ret = efi_disk_add_dev(parent, dp, if_typename, desc, diskid,
&info, part, NULL);
diff --git a/lib/efi_loader/efi_image_loader.c b/lib/efi_loader/efi_image_loader.c
index bcd57f7fcc..a0eb63fceb 100644
--- a/lib/efi_loader/efi_image_loader.c
+++ b/lib/efi_loader/efi_image_loader.c
@@ -220,7 +220,7 @@ static void efi_set_code_and_data_type(
* @end: End address of region (excluded)
* @nocheck: flag against overlapped regions
*
- * Take one entry of region [@start, @end[ and insert it into the list.
+ * Take one entry of region \[@start, @end\[ and insert it into the list.
*
* * If @nocheck is false, the list will be sorted ascending by address.
* Overlapping entries will not be allowed.
diff --git a/lib/efi_loader/efi_var_file.c b/lib/efi_loader/efi_var_file.c
index b171d2d1a8..de076b8cbc 100644
--- a/lib/efi_loader/efi_var_file.c
+++ b/lib/efi_loader/efi_var_file.c
@@ -35,7 +35,7 @@ static efi_status_t __maybe_unused efi_set_blk_dev_to_system_partition(void)
log_err("No EFI system partition\n");
return EFI_DEVICE_ERROR;
}
- snprintf(part_str, PART_STR_LEN, "%u:%u",
+ snprintf(part_str, PART_STR_LEN, "%x:%x",
efi_system_partition.devnum, efi_system_partition.part);
r = fs_set_blk_dev(blk_get_if_type_name(efi_system_partition.if_type),
part_str, FS_TYPE_ANY);