2014-01-23 21:54:12 +00:00
|
|
|
From: Raymund Will <rw@suse.com>
|
2014-01-24 13:26:11 +00:00
|
|
|
Subject: Print EFI status on failed operations.
|
2014-01-23 21:54:12 +00:00
|
|
|
References: bnc#811767
|
|
|
|
|
|
|
|
Otherwise it's probably noticed only much too late.
|
|
|
|
|
2014-01-24 13:26:11 +00:00
|
|
|
V2: Produce failure output for '--create' as well.
|
|
|
|
|
2014-01-23 21:54:12 +00:00
|
|
|
Reported-by: Frederic Crozat <fcrozat@suse.com>
|
|
|
|
Signed-off-by: Raymund Will <rw@suse.com>
|
2013-12-19 16:49:29 +00:00
|
|
|
---
|
|
|
|
src/efibootmgr/efibootmgr.c | 4 ++++
|
|
|
|
1 file changed, 4 insertions(+)
|
|
|
|
|
|
|
|
--- a/src/efibootmgr/efibootmgr.c
|
|
|
|
+++ b/src/efibootmgr/efibootmgr.c
|
2014-01-23 21:54:12 +00:00
|
|
|
@@ -279,6 +279,7 @@ make_boot_var(list_t *boot_list)
|
2013-12-19 16:49:29 +00:00
|
|
|
|
|
|
|
status = create_variable(&boot->var_data);
|
|
|
|
if (status != EFI_SUCCESS) {
|
|
|
|
+ fprintf (stderr,"\n\nrequested operation failed: status=%lx\n\n", status);
|
|
|
|
free(boot);
|
|
|
|
return NULL;
|
|
|
|
}
|
2014-01-23 21:54:12 +00:00
|
|
|
@@ -1137,6 +1138,9 @@ main(int argc, char **argv)
|
2013-12-19 16:49:29 +00:00
|
|
|
}
|
|
|
|
show_boot_order();
|
|
|
|
show_boot_vars();
|
|
|
|
+ } else if (ret > 1) {
|
|
|
|
+ /* only print efi_status_t values as others already have a message! */
|
|
|
|
+ fprintf (stderr,"\n\nrequested operation failed: status=%lx\n\n", ret);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
free_dirents(boot_names, num_boot_names);
|