diff mbox series

[v3,(part,1)] arm64/xen: Fix implicit declaration of function ‘grub_file_filter_disable_compression'

Message ID 20181120123538.GV3513@dell
State New
Headers show
Series [v3,(part,1)] arm64/xen: Fix implicit declaration of function ‘grub_file_filter_disable_compression' | expand

Commit Message

Lee Jones Nov. 20, 2018, 12:35 p.m. UTC
From: Lee Jones <lee.jones@linaro.org>

arm64/xen: Fix implicit declaration of function ‘grub_file_filter_disable_compression'

Without this fix, building xen_boot.c emits:

loader/arm64/xen_boot.c:433:5: error: implicit declaration of function ‘grub_file_filter_disable_compression’; did you mean ‘grub_file_filter_unregister’? [-Werror=implicit-function-declaration]
     grub_file_filter_disable_compression ();
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     grub_file_filter_unregister
loader/arm64/xen_boot.c:433:5: error: nested extern declaration of ‘grub_file_filter_disable_compression’ [-Werror=nested-externs]

Signed-off-by: Lee Jones <lee.jones@linaro.org>

Comments

Daniel Kiper Nov. 21, 2018, 2:59 p.m. UTC | #1
On Tue, Nov 20, 2018 at 12:35:39PM +0000, Lee Jones wrote:
> From: Lee Jones <lee.jones@linaro.org>
>
> arm64/xen: Fix implicit declaration of function ‘grub_file_filter_disable_compression'
>
> Without this fix, building xen_boot.c emits:
>
> loader/arm64/xen_boot.c:433:5: error: implicit declaration of function ‘grub_file_filter_disable_compression’; did you mean ‘grub_file_filter_unregister’? [-Werror=implicit-function-declaration]
>      grub_file_filter_disable_compression ();
>      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>      grub_file_filter_unregister
> loader/arm64/xen_boot.c:433:5: error: nested extern declaration of ‘grub_file_filter_disable_compression’ [-Werror=nested-externs]
>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

I have not pushed this patch because it depends on "arm64/xen: Fix too
few arguments to function ‘grub_file_open’" patch.

Daniel
diff mbox series

Patch

diff --git a/grub-core/loader/arm64/xen_boot.c b/grub-core/loader/arm64/xen_boot.c
index 7d1adce1b..a01792a72 100644
--- a/grub-core/loader/arm64/xen_boot.c
+++ b/grub-core/loader/arm64/xen_boot.c
@@ -429,9 +429,9 @@  grub_cmd_xen_module (grub_command_t cmd __attribute__((unused)),
 
   grub_dprintf ("xen_loader", "Init module and node info\n");
 
-  if (nounzip)
-    grub_file_filter_disable_compression ();
-  file = grub_file_open (argv[0], GRUB_FILE_TYPE_LINUX_KERNEL);
+  file = grub_file_open (argv[0], GRUB_FILE_TYPE_LINUX_KERNEL
+			 | (nounzip ? GRUB_FILE_TYPE_NO_DECOMPRESS
+			    : GRUB_FILE_TYPE_NONE));
   if (!file)
     goto fail;