commit-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[2042] 2009-03-22 Yoshinori K.


From: Yoshinori K. Okuji
Subject: [2042] 2009-03-22 Yoshinori K.
Date: Sun, 22 Mar 2009 10:45:09 +0000

Revision: 2042
          http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=2042
Author:   okuji
Date:     2009-03-22 10:45:06 +0000 (Sun, 22 Mar 2009)
Log Message:
-----------
2009-03-22  Yoshinori K. Okuji  <address@hidden>

    * kern/env.c (grub_env_context_open): Added an argument to specify
    whether a new context inherits exported variables from current
    one. This is useful when making a sandbox to interpret a config
    file.
    All callers updated.

    * include/grub/env.h (grub_env_context_open): Updated the prototype.

Modified Paths:
--------------
    trunk/grub2/ChangeLog
    trunk/grub2/commands/configfile.c
    trunk/grub2/include/grub/env.h
    trunk/grub2/kern/env.c

Modified: trunk/grub2/ChangeLog
===================================================================
--- trunk/grub2/ChangeLog       2009-03-22 10:38:19 UTC (rev 2041)
+++ trunk/grub2/ChangeLog       2009-03-22 10:45:06 UTC (rev 2042)
@@ -1,5 +1,15 @@
 2009-03-22  Yoshinori K. Okuji  <address@hidden>
 
+       * kern/env.c (grub_env_context_open): Added an argument to specify
+       whether a new context inherits exported variables from current
+       one. This is useful when making a sandbox to interpret a config
+       file.
+       All callers updated.
+
+       * include/grub/env.h (grub_env_context_open): Updated the prototype.
+
+2009-03-22  Yoshinori K. Okuji  <address@hidden>
+
        * kern/env.c (grub_env_context_close): Fix memory leaks.
 
 2009-03-22  Yoshinori K. Okuji  <address@hidden>
@@ -11,7 +21,8 @@
        (read_command_list): Prevent being executed twice.
        (read_fs_list): Likewise.
 
-       * include/grub/normal.h (grub_normal_execute): 
+       * include/grub/normal.h (grub_normal_execute): Updated the
+       prototype.
 
 2009-03-22  Pavel Roskin  <address@hidden>
 

Modified: trunk/grub2/commands/configfile.c
===================================================================
--- trunk/grub2/commands/configfile.c   2009-03-22 10:38:19 UTC (rev 2041)
+++ trunk/grub2/commands/configfile.c   2009-03-22 10:45:06 UTC (rev 2042)
@@ -36,7 +36,7 @@
   if (new_env)
     {
       grub_cls ();
-      grub_env_context_open ();
+      grub_env_context_open (1);
     }
 
   grub_normal_execute (args[0], 1, ! new_env);

Modified: trunk/grub2/include/grub/env.h
===================================================================
--- trunk/grub2/include/grub/env.h      2009-03-22 10:38:19 UTC (rev 2041)
+++ trunk/grub2/include/grub/env.h      2009-03-22 10:45:06 UTC (rev 2042)
@@ -1,6 +1,6 @@
 /*
  *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 2003,2005,2006,2007  Free Software Foundation, Inc.
+ *  Copyright (C) 2003,2005,2006,2007,2009  Free Software Foundation, Inc.
  *
  *  GRUB is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -60,7 +60,7 @@
 grub_err_t EXPORT_FUNC(grub_register_variable_hook) (const char *name,
                                                     grub_env_read_hook_t 
read_hook,
                                                     grub_env_write_hook_t 
write_hook);
-grub_err_t EXPORT_FUNC(grub_env_context_open) (void);
+grub_err_t EXPORT_FUNC(grub_env_context_open) (int export);
 grub_err_t EXPORT_FUNC(grub_env_context_close) (void);
 grub_err_t EXPORT_FUNC(grub_env_export) (const char *name);
 

Modified: trunk/grub2/kern/env.c
===================================================================
--- trunk/grub2/kern/env.c      2009-03-22 10:38:19 UTC (rev 2041)
+++ trunk/grub2/kern/env.c      2009-03-22 10:45:06 UTC (rev 2042)
@@ -75,7 +75,7 @@
 }
 
 grub_err_t
-grub_env_context_open (void)
+grub_env_context_open (int export)
 {
   struct grub_env_context *context;
   int i;
@@ -95,7 +95,7 @@
       
       for (var = context->prev->vars[i]; var; var = var->next)
        {
-         if (var->type == GRUB_ENV_VAR_GLOBAL)
+         if (export && var->type == GRUB_ENV_VAR_GLOBAL)
            {
              if (grub_env_set (var->name, var->value) != GRUB_ERR_NONE)
                {





reply via email to

[Prev in Thread] Current Thread [Next in Thread]