diff mbox

[1/3] arm64: add grub_xen_boot env to indicate that we have xen_* commands

Message ID 1456336901-25708-2-git-send-email-fu.wei@linaro.org (mailing list archive)
State New, archived
Headers show

Commit Message

fu.wei@linaro.org Feb. 24, 2016, 6:01 p.m. UTC
From: Fu Wei <fu.wei@linaro.org>

Signed-off-by: Fu Wei <fu.wei@linaro.org>
---
 grub-core/loader/arm64/xen_boot.c | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Andrei Borzenkov Feb. 24, 2016, 6:12 p.m. UTC | #1
24.02.2016 21:01, fu.wei@linaro.org ?????:
> From: Fu Wei <fu.wei@linaro.org>
> 
> Signed-off-by: Fu Wei <fu.wei@linaro.org>
> ---
>  grub-core/loader/arm64/xen_boot.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/grub-core/loader/arm64/xen_boot.c b/grub-core/loader/arm64/xen_boot.c
> index 8ae43d7..ef03111 100644
> --- a/grub-core/loader/arm64/xen_boot.c
> +++ b/grub-core/loader/arm64/xen_boot.c
> @@ -20,6 +20,7 @@
>  #include <grub/charset.h>
>  #include <grub/command.h>
>  #include <grub/err.h>
> +#include <grub/env.h>
>  #include <grub/file.h>
>  #include <grub/fdt.h>
>  #include <grub/list.h>
> @@ -490,10 +491,17 @@ GRUB_MOD_INIT (xen_boot)
>      grub_register_command ("xen_module", grub_cmd_xen_module, 0,
>  			   N_("Load a xen module."));
>    my_mod = mod;
> +
> +/* setup a env to indicate that
> + * we have xen_* commands.
> + */
> +  grub_env_set ("grub_xen_boot", "y");
> +  grub_env_export ("grub_xen_boot");
>  }

Please define feature for it, see grub-core/normal/main.c.

>  
>  GRUB_MOD_FINI (xen_boot)
>  {
>    grub_unregister_command (cmd_xen_hypervisor);
>    grub_unregister_command (cmd_xen_module);
> +  grub_env_unset ("grub_xen_boot");
>  }
>
fu.wei@linaro.org Feb. 25, 2016, 6:55 a.m. UTC | #2
Hi Andrei.

On 25 February 2016 at 02:12, Andrei Borzenkov <arvidjaar@gmail.com> wrote:
> 24.02.2016 21:01, fu.wei@linaro.org ?????:
>> From: Fu Wei <fu.wei@linaro.org>
>>
>> Signed-off-by: Fu Wei <fu.wei@linaro.org>
>> ---
>>  grub-core/loader/arm64/xen_boot.c | 8 ++++++++
>>  1 file changed, 8 insertions(+)
>>
>> diff --git a/grub-core/loader/arm64/xen_boot.c b/grub-core/loader/arm64/xen_boot.c
>> index 8ae43d7..ef03111 100644
>> --- a/grub-core/loader/arm64/xen_boot.c
>> +++ b/grub-core/loader/arm64/xen_boot.c
>> @@ -20,6 +20,7 @@
>>  #include <grub/charset.h>
>>  #include <grub/command.h>
>>  #include <grub/err.h>
>> +#include <grub/env.h>
>>  #include <grub/file.h>
>>  #include <grub/fdt.h>
>>  #include <grub/list.h>
>> @@ -490,10 +491,17 @@ GRUB_MOD_INIT (xen_boot)
>>      grub_register_command ("xen_module", grub_cmd_xen_module, 0,
>>                          N_("Load a xen module."));
>>    my_mod = mod;
>> +
>> +/* setup a env to indicate that
>> + * we have xen_* commands.
>> + */
>> +  grub_env_set ("grub_xen_boot", "y");
>> +  grub_env_export ("grub_xen_boot");
>>  }
>
> Please define feature for it, see grub-core/normal/main.c.

Thanks for your suggestion

>
>>
>>  GRUB_MOD_FINI (xen_boot)
>>  {
>>    grub_unregister_command (cmd_xen_hypervisor);
>>    grub_unregister_command (cmd_xen_module);
>> +  grub_env_unset ("grub_xen_boot");
>>  }
>>
>
diff mbox

Patch

diff --git a/grub-core/loader/arm64/xen_boot.c b/grub-core/loader/arm64/xen_boot.c
index 8ae43d7..ef03111 100644
--- a/grub-core/loader/arm64/xen_boot.c
+++ b/grub-core/loader/arm64/xen_boot.c
@@ -20,6 +20,7 @@ 
 #include <grub/charset.h>
 #include <grub/command.h>
 #include <grub/err.h>
+#include <grub/env.h>
 #include <grub/file.h>
 #include <grub/fdt.h>
 #include <grub/list.h>
@@ -490,10 +491,17 @@  GRUB_MOD_INIT (xen_boot)
     grub_register_command ("xen_module", grub_cmd_xen_module, 0,
 			   N_("Load a xen module."));
   my_mod = mod;
+
+/* setup a env to indicate that
+ * we have xen_* commands.
+ */
+  grub_env_set ("grub_xen_boot", "y");
+  grub_env_export ("grub_xen_boot");
 }
 
 GRUB_MOD_FINI (xen_boot)
 {
   grub_unregister_command (cmd_xen_hypervisor);
   grub_unregister_command (cmd_xen_module);
+  grub_env_unset ("grub_xen_boot");
 }