2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>

* 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.
This commit is contained in:
okuji 2009-03-22 10:45:06 +00:00
parent b28bbc4ef5
commit 42a5b3fcc7
4 changed files with 17 additions and 6 deletions

View file

@ -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 @@ void EXPORT_FUNC(grub_env_iterate) (int (*func) (struct grub_env_var *var));
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);