wok rev 20337
linux: hile useless efi error messages
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Jun 04 09:32:46 2018 +0200 (2018-06-04) |
parents | eb81e47c9a20 |
children | f4c2c3de903b |
files | linux/stuff/linux-efi.u |
line diff
1.1 --- a/linux/stuff/linux-efi.u Sun Jun 03 15:43:43 2018 +0200 1.2 +++ b/linux/stuff/linux-efi.u Mon Jun 04 09:32:46 2018 +0200 1.3 @@ -1,6 +1,6 @@ 1.4 --- linux-3.16.53/drivers/firmware/efi/efi-stub-helper.c 1.5 +++ linux-3.16.53/drivers/firmware/efi/efi-stub-helper.c 1.6 -@@ -321,6 +321,77 @@ 1.7 +@@ -321,6 +321,79 @@ 1.8 1.9 1.10 /* 1.11 @@ -27,6 +27,7 @@ 1.12 +#ifdef CONFIG_X86_64 1.13 + for (p = filename_16; *p != '\0'; p++); 1.14 + c = p[-2]; 1.15 ++ file->size = EFI_FILE_SIZE_MUTE; 1.16 + while (1) { 1.17 +#endif 1.18 + status = efi_file_size(sys_table_arg, fh, filename_16, 1.19 @@ -34,6 +35,7 @@ 1.20 +#ifdef CONFIG_X86_64 1.21 + if (status != EFI_SUCCESS && p[-2] != '\0') { 1.22 + p[-2] = '\0'; 1.23 ++ file->size++; 1.24 + continue; 1.25 + } 1.26 + break; 1.27 @@ -78,7 +80,7 @@ 1.28 * Check the cmdline for a LILO-style file= arguments. 1.29 * 1.30 * We only support loading a file from the same filesystem as 1.31 -@@ -414,18 +485,14 @@ 1.32 +@@ -414,18 +487,14 @@ 1.33 } 1.34 } 1.35 1.36 @@ -103,7 +105,7 @@ 1.37 if (status != EFI_SUCCESS) 1.38 goto close_handles; 1.39 1.40 -@@ -456,28 +523,11 @@ 1.41 +@@ -456,28 +525,11 @@ 1.42 1.43 addr = file_addr; 1.44 for (j = 0; j < nr_files; j++) { 1.45 @@ -137,7 +139,7 @@ 1.46 } 1.47 1.48 } 1.49 -@@ -649,6 +699,30 @@ 1.50 +@@ -649,6 +701,30 @@ 1.51 } 1.52 1.53 if (!options_chars) { 1.54 @@ -168,7 +170,7 @@ 1.55 /* No command line options, so return empty string*/ 1.56 options = &zero; 1.57 } 1.58 -@@ -665,6 +739,7 @@ 1.59 +@@ -665,6 +741,7 @@ 1.60 s1 = efi_utf16_to_utf8(s1, s2, options_chars); 1.61 *s1 = '\0'; 1.62 1.63 @@ -176,3 +178,43 @@ 1.64 *cmd_line_len = options_bytes; 1.65 return (char *)cmdline_addr; 1.66 } 1.67 +--- linux-3.16.53/arch/x86/boot/compressed/eboot.c 1.68 ++++ linux-3.16.53/arch/x86/boot/compressed/eboot.c 1.69 +@@ -51,6 +51,7 @@ 1.70 + static void efi_printk(efi_system_table_t *, char *); 1.71 + static void efi_char16_printk(efi_system_table_t *, efi_char16_t *); 1.72 + 1.73 ++#define EFI_FILE_SIZE_MUTE 0x4554554d20525245LL 1.74 + static efi_status_t 1.75 + __file_size32(void *__fh, efi_char16_t *filename_16, 1.76 + void **handle, u64 *file_sz) 1.77 +@@ -64,9 +65,11 @@ 1.78 + status = efi_early->call((unsigned long)fh->open, fh, &h, filename_16, 1.79 + EFI_FILE_MODE_READ, (u64)0); 1.80 + if (status != EFI_SUCCESS) { 1.81 +- efi_printk(sys_table, "Failed to open file: "); 1.82 +- efi_char16_printk(sys_table, filename_16); 1.83 +- efi_printk(sys_table, "\n"); 1.84 ++ if (*file_sz != EFI_FILE_SIZE_MUTE) { 1.85 ++ efi_printk(sys_table, "Failed to open file: "); 1.86 ++ efi_char16_printk(sys_table, filename_16); 1.87 ++ efi_printk(sys_table, "\n"); 1.88 ++ } 1.89 + return status; 1.90 + } 1.91 + 1.92 +@@ -117,9 +120,11 @@ 1.93 + status = efi_early->call((unsigned long)fh->open, fh, &h, filename_16, 1.94 + EFI_FILE_MODE_READ, (u64)0); 1.95 + if (status != EFI_SUCCESS) { 1.96 +- efi_printk(sys_table, "Failed to open file: "); 1.97 +- efi_char16_printk(sys_table, filename_16); 1.98 +- efi_printk(sys_table, "\n"); 1.99 ++ if (*file_sz != EFI_FILE_SIZE_MUTE) { 1.100 ++ efi_printk(sys_table, "Failed to open file: "); 1.101 ++ efi_char16_printk(sys_table, filename_16); 1.102 ++ efi_printk(sys_table, "\n"); 1.103 ++ } 1.104 + return status; 1.105 + } 1.106 +