Re: [PATCH v2] arm64/xen: Fix too few arguments to function ‘grub_file_open’

2018-11-21 Thread Daniel Kiper
On Tue, Nov 20, 2018 at 11:39:42AM +, Lee Jones wrote:
> From: Lee Jones 
>
> arm64/xen: Fix too few arguments to function ‘grub_file_open’
>
> Without this fix xen_boot.c omits:
>
> loader/arm64/xen_boot.c: In function ‘grub_cmd_xen_module’:
> loader/arm64/xen_boot.c:424:10: error: too few arguments to function 
> ‘grub_file_open’
>file = grub_file_open (argv[0]);
>   ^~
> In file included from ../include/grub/cache.h:23:0,
>  from loader/arm64/xen_boot.c:19:
> ../include/grub/file.h:204:25: note: declared here
>  grub_file_t EXPORT_FUNC(grub_file_open) (const char *name, enum 
> grub_file_type type);
>  ^
> ../include/grub/symbol.h:68:25: note: in definition of macro ‘EXPORT_FUNC’
>  # define EXPORT_FUNC(x) x
>  ^
> loader/arm64/xen_boot.c: In function ‘grub_cmd_xen_hypervisor’:
> loader/arm64/xen_boot.c:456:10: error: too few arguments to function 
> ‘grub_file_open’
>file = grub_file_open (argv[0]);
>   ^~
>
> Signed-off-by: Lee Jones 
>
> diff --git a/grub-core/loader/arm64/xen_boot.c 
> b/grub-core/loader/arm64/xen_boot.c
> index 117293fb9..1b1dd8c65 100644
> --- a/grub-core/loader/arm64/xen_boot.c
> +++ b/grub-core/loader/arm64/xen_boot.c
> @@ -427,7 +427,7 @@ grub_cmd_xen_module (grub_command_t cmd 
> __attribute__((unused)),
>
>grub_dprintf ("xen_loader", "Init module and node info\n");
>
> -  file = grub_file_open (argv[0]);
> +  file = grub_file_open (argv[0], GRUB_FILE_TYPE_LINUX_KERNEL);
>if (!file)
>  goto fail;
>
> @@ -459,7 +459,7 @@ grub_cmd_xen_hypervisor (grub_command_t cmd __attribute__ 
> ((unused)),
>goto fail;
>  }
>
> -  file = grub_file_open (argv[0]);
> +  file = grub_file_open (argv[0], GRUB_FILE_TYPE_LINUX_KERNEL);

Please introduce GRUB_FILE_TYPE_XEN_HYPERVISOR and GRUB_FILE_TYPE_XEN_MODULE.
You can put both of them behind GRUB_FILE_TYPE_MULTIBOOT_MODULE.

Daniel

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


[PATCH v2] arm64/xen: Fix too few arguments to function ‘grub_file_open’

2018-11-20 Thread Lee Jones
From: Lee Jones 

arm64/xen: Fix too few arguments to function ‘grub_file_open’

Without this fix xen_boot.c omits:

loader/arm64/xen_boot.c: In function ‘grub_cmd_xen_module’:
loader/arm64/xen_boot.c:424:10: error: too few arguments to function 
‘grub_file_open’
   file = grub_file_open (argv[0]);
  ^~
In file included from ../include/grub/cache.h:23:0,
 from loader/arm64/xen_boot.c:19:
../include/grub/file.h:204:25: note: declared here
 grub_file_t EXPORT_FUNC(grub_file_open) (const char *name, enum grub_file_type 
type);
 ^
../include/grub/symbol.h:68:25: note: in definition of macro ‘EXPORT_FUNC’
 # define EXPORT_FUNC(x) x
 ^
loader/arm64/xen_boot.c: In function ‘grub_cmd_xen_hypervisor’:
loader/arm64/xen_boot.c:456:10: error: too few arguments to function 
‘grub_file_open’
   file = grub_file_open (argv[0]);
  ^~

Signed-off-by: Lee Jones 

diff --git a/grub-core/loader/arm64/xen_boot.c 
b/grub-core/loader/arm64/xen_boot.c
index 117293fb9..1b1dd8c65 100644
--- a/grub-core/loader/arm64/xen_boot.c
+++ b/grub-core/loader/arm64/xen_boot.c
@@ -427,7 +427,7 @@ grub_cmd_xen_module (grub_command_t cmd 
__attribute__((unused)),
 
   grub_dprintf ("xen_loader", "Init module and node info\n");
 
-  file = grub_file_open (argv[0]);
+  file = grub_file_open (argv[0], GRUB_FILE_TYPE_LINUX_KERNEL);
   if (!file)
 goto fail;
 
@@ -459,7 +459,7 @@ grub_cmd_xen_hypervisor (grub_command_t cmd __attribute__ 
((unused)),
   goto fail;
 }
 
-  file = grub_file_open (argv[0]);
+  file = grub_file_open (argv[0], GRUB_FILE_TYPE_LINUX_KERNEL);
   if (!file)
 goto fail;

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: arm64/xen: Fix too few arguments to function ‘grub_file_open’

2018-11-20 Thread Lee Jones
On Tue, 20 Nov 2018, Julien Grall wrote:

> Hi Lee,
> 
> On 20/11/2018 10:48, Lee Jones wrote:
> > From: Lee Jones 
> > 
> > arm64/xen: Fix too few arguments to function ‘grub_file_open’
> > Without this fix xen_boot.c omits:
> > loader/arm64/xen_boot.c: In function ‘grub_cmd_xen_module’:
> > loader/arm64/xen_boot.c:424:10: error: too few arguments to function 
> > ‘grub_file_open’
> > file = grub_file_open (argv[0]);
> >^~
> > In file included from ../include/grub/cache.h:23:0,
> >   from loader/arm64/xen_boot.c:19:
> > ../include/grub/file.h:204:25: note: declared here
> >   grub_file_t EXPORT_FUNC(grub_file_open) (const char *name, enum 
> > grub_file_type type);
> >   ^
> > ../include/grub/symbol.h:68:25: note: in definition of macro ‘EXPORT_FUNC’
> >   # define EXPORT_FUNC(x) x
> >   ^
> > loader/arm64/xen_boot.c: In function ‘grub_cmd_xen_hypervisor’:
> > loader/arm64/xen_boot.c:456:10: error: too few arguments to function 
> > ‘grub_file_open’
> > file = grub_file_open (argv[0]);
> >^~
> > 
> > Signed-off-by: Lee Jones 
> > 
> > diff --git a/grub-core/loader/arm64/xen_boot.c 
> > b/grub-core/loader/arm64/xen_boot.c
> > index 5820412e8..1f49e3278 100644
> > --- a/grub-core/loader/arm64/xen_boot.c
> > +++ b/grub-core/loader/arm64/xen_boot.c
> > @@ -421,7 +421,7 @@ grub_cmd_xen_module (grub_command_t cmd 
> > __attribute__((unused)),
> > grub_dprintf ("xen_loader", "Init module and node info\n");
> > -  file = grub_file_open (argv[0]);
> > +  file = grub_file_open (argv[0], GRUB_FILE_TYPE_NONE);
> > if (!file)
> >   goto fail;
> > @@ -453,7 +453,7 @@ grub_cmd_xen_hypervisor (grub_command_t cmd 
> > __attribute__ ((unused)),
> > goto fail;
> >   }
> > -  file = grub_file_open (argv[0]);
> > +  file = grub_file_open (argv[0], GRUB_FILE_TYPE_NONE);
> 
> I would prefer if we try to keep the type similar to x86 Xen. In that case
> it would be GRUB_FILE_TYPE_LINUX_KERNEL.

Thanks Julien.  Will fix.

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


arm64/xen: Fix too few arguments to function ‘grub_file_open’

2018-11-20 Thread Lee Jones
From: Lee Jones 

arm64/xen: Fix too few arguments to function ‘grub_file_open’

Without this fix xen_boot.c omits:

loader/arm64/xen_boot.c: In function ‘grub_cmd_xen_module’:
loader/arm64/xen_boot.c:424:10: error: too few arguments to function 
‘grub_file_open’
   file = grub_file_open (argv[0]);
  ^~
In file included from ../include/grub/cache.h:23:0,
 from loader/arm64/xen_boot.c:19:
../include/grub/file.h:204:25: note: declared here
 grub_file_t EXPORT_FUNC(grub_file_open) (const char *name, enum grub_file_type 
type);
 ^
../include/grub/symbol.h:68:25: note: in definition of macro ‘EXPORT_FUNC’
 # define EXPORT_FUNC(x) x
 ^
loader/arm64/xen_boot.c: In function ‘grub_cmd_xen_hypervisor’:
loader/arm64/xen_boot.c:456:10: error: too few arguments to function 
‘grub_file_open’
   file = grub_file_open (argv[0]);
  ^~

Signed-off-by: Lee Jones 

diff --git a/grub-core/loader/arm64/xen_boot.c 
b/grub-core/loader/arm64/xen_boot.c
index 5820412e8..1f49e3278 100644
--- a/grub-core/loader/arm64/xen_boot.c
+++ b/grub-core/loader/arm64/xen_boot.c
@@ -421,7 +421,7 @@ grub_cmd_xen_module (grub_command_t cmd 
__attribute__((unused)),
 
   grub_dprintf ("xen_loader", "Init module and node info\n");
 
-  file = grub_file_open (argv[0]);
+  file = grub_file_open (argv[0], GRUB_FILE_TYPE_NONE);
   if (!file)
 goto fail;
 
@@ -453,7 +453,7 @@ grub_cmd_xen_hypervisor (grub_command_t cmd __attribute__ 
((unused)),
   goto fail;
 }
 
-  file = grub_file_open (argv[0]);
+  file = grub_file_open (argv[0], GRUB_FILE_TYPE_NONE);
   if (!file)
 goto fail;

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: arm64/xen: Fix too few arguments to function ‘grub_file_open’

2018-11-20 Thread Julien Grall

Hi Lee,

On 20/11/2018 10:48, Lee Jones wrote:

From: Lee Jones 

arm64/xen: Fix too few arguments to function ‘grub_file_open’
 
Without this fix xen_boot.c omits:
 
loader/arm64/xen_boot.c: In function ‘grub_cmd_xen_module’:

loader/arm64/xen_boot.c:424:10: error: too few arguments to function 
‘grub_file_open’
file = grub_file_open (argv[0]);
   ^~
In file included from ../include/grub/cache.h:23:0,
  from loader/arm64/xen_boot.c:19:
../include/grub/file.h:204:25: note: declared here
  grub_file_t EXPORT_FUNC(grub_file_open) (const char *name, enum 
grub_file_type type);
  ^
../include/grub/symbol.h:68:25: note: in definition of macro ‘EXPORT_FUNC’
  # define EXPORT_FUNC(x) x
  ^
loader/arm64/xen_boot.c: In function ‘grub_cmd_xen_hypervisor’:
loader/arm64/xen_boot.c:456:10: error: too few arguments to function 
‘grub_file_open’
file = grub_file_open (argv[0]);
   ^~

Signed-off-by: Lee Jones 

diff --git a/grub-core/loader/arm64/xen_boot.c 
b/grub-core/loader/arm64/xen_boot.c
index 5820412e8..1f49e3278 100644
--- a/grub-core/loader/arm64/xen_boot.c
+++ b/grub-core/loader/arm64/xen_boot.c
@@ -421,7 +421,7 @@ grub_cmd_xen_module (grub_command_t cmd 
__attribute__((unused)),
  
grub_dprintf ("xen_loader", "Init module and node info\n");
  
-  file = grub_file_open (argv[0]);

+  file = grub_file_open (argv[0], GRUB_FILE_TYPE_NONE);
if (!file)
  goto fail;
  
@@ -453,7 +453,7 @@ grub_cmd_xen_hypervisor (grub_command_t cmd __attribute__ ((unused)),

goto fail;
  }
  
-  file = grub_file_open (argv[0]);

+  file = grub_file_open (argv[0], GRUB_FILE_TYPE_NONE);


I would prefer if we try to keep the type similar to x86 Xen. In that case it 
would be GRUB_FILE_TYPE_LINUX_KERNEL.


Cheers,

--
Julien Grall

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel