mirror of
https://codeberg.org/kiss-community/repo
synced 2024-11-15 19:20:10 -07:00
efibootmgr: Fix verbose
This commit is contained in:
parent
8a19b60033
commit
e36d67f9b6
@ -1,6 +1,7 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
patch -p1 < efivar.patch
|
||||
patch -p1 < fix-verbose.patch
|
||||
|
||||
make \
|
||||
EXTRA_CFLAGS=-Os \
|
||||
|
@ -1,2 +1,3 @@
|
||||
22a95ebe0d5c9fb2915b3a100450f8f37484d1dbb8b296f55b343cc84f10397d 17.tar.gz
|
||||
167ac36fb4bd59e90fede0422280117c0b50d0ac3c0c7d478fea427cb9a6944c efivar.patch
|
||||
aba035327649b6b926b278ebe1613979f1923ff5963631c5e7dd7ebc6cfc5733 fix-verbose.patch
|
||||
|
85
extra/efibootmgr/patches/fix-verbose.patch
Normal file
85
extra/efibootmgr/patches/fix-verbose.patch
Normal file
@ -0,0 +1,85 @@
|
||||
diff --git a/src/efibootmgr.c b/src/efibootmgr.c
|
||||
index de38f01..2ebc312 100644
|
||||
--- a/src/efibootmgr.c
|
||||
+++ b/src/efibootmgr.c
|
||||
@@ -951,47 +951,64 @@ show_vars(const char *prefix)
|
||||
dp = efi_loadopt_path(load_option, boot->data_size);
|
||||
rc = efidp_format_device_path(text_path, text_path_len,
|
||||
dp, pathlen);
|
||||
- if (rc < 0)
|
||||
- error(18, "Could not parse device path");
|
||||
+ if (rc < 0) {
|
||||
+ warning("Could not parse device path");
|
||||
+ return;
|
||||
+ }
|
||||
rc += 1;
|
||||
|
||||
text_path_len = rc;
|
||||
text_path = calloc(1, rc);
|
||||
- if (!text_path)
|
||||
- error(19, "Could not parse device path");
|
||||
+ if (!text_path) {
|
||||
+ warning("Could not parse device path");
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
rc = efidp_format_device_path(text_path, text_path_len,
|
||||
dp, pathlen);
|
||||
- if (rc < 0)
|
||||
- error(20, "Could not parse device path");
|
||||
- printf("\t%s", text_path);
|
||||
+ if (rc >= 0)
|
||||
+ printf("\t%s", text_path);
|
||||
free(text_path);
|
||||
+ if (rc < 0) {
|
||||
+ warning("Could not parse device path");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
/* Print optional data */
|
||||
|
||||
rc = efi_loadopt_optional_data(load_option,
|
||||
boot->data_size,
|
||||
&optional_data,
|
||||
&optional_data_len);
|
||||
- if (rc < 0)
|
||||
- error(21, "Could not parse optional data");
|
||||
+ if (rc < 0) {
|
||||
+ warning("Could not parse optional data");
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
if (opts.unicode) {
|
||||
text_path = ucs2_to_utf8((uint16_t*)optional_data, optional_data_len/2);
|
||||
} else {
|
||||
rc = unparse_raw_text(NULL, 0, optional_data,
|
||||
optional_data_len);
|
||||
- if (rc < 0)
|
||||
- error(22, "Could not parse optional data");
|
||||
+ if (rc < 0) {
|
||||
+ warning("Could not parse optional data");
|
||||
+ return;
|
||||
+ }
|
||||
rc += 1;
|
||||
text_path_len = rc;
|
||||
text_path = calloc(1, rc);
|
||||
- if (!text_path)
|
||||
- error(23, "Could not parse optional data");
|
||||
+ if (!text_path) {
|
||||
+ warning("Could not parse optional data");
|
||||
+ return;
|
||||
+ }
|
||||
rc = unparse_raw_text(text_path, text_path_len,
|
||||
optional_data, optional_data_len);
|
||||
- if (rc < 0)
|
||||
- error(24, "Could not parse device path");
|
||||
- }
|
||||
+ if (rc < 0) {
|
||||
+ warning("Could not parse device path");
|
||||
+ free(text_path);
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
printf("%s", text_path);
|
||||
free(text_path);
|
||||
}
|
@ -1,2 +1,3 @@
|
||||
https://github.com/rhboot/efibootmgr/archive/17.tar.gz
|
||||
patches/efivar.patch
|
||||
patches/fix-verbose.patch
|
||||
|
@ -1 +1 @@
|
||||
17 1
|
||||
17 2
|
||||
|
Loading…
Reference in New Issue
Block a user