* include/grub/env.h (grub_env_find): Remove prototype.

* grub-core/kern/env.c (grub_env_find): Make static.
	(grub_env_set): Remove useless set.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-02-26 23:53:21 +01:00
parent a4c65f3441
commit 8e307a625d
3 changed files with 7 additions and 5 deletions

View file

@ -1,3 +1,9 @@
2012-02-26 Vladimir Serbinenko <phcoder@gmail.com>
* include/grub/env.h (grub_env_find): Remove prototype.
* grub-core/kern/env.c (grub_env_find): Make static.
(grub_env_set): Remove useless set.
2012-02-26 Vladimir Serbinenko <phcoder@gmail.com> 2012-02-26 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/kern/i386/realmode.S: Remove useless align. * grub-core/kern/i386/realmode.S: Remove useless align.

View file

@ -41,7 +41,7 @@ grub_env_hashval (const char *s)
return i % HASHSZ; return i % HASHSZ;
} }
struct grub_env_var * static struct grub_env_var *
grub_env_find (const char *name) grub_env_find (const char *name)
{ {
struct grub_env_var *var; struct grub_env_var *var;
@ -109,9 +109,6 @@ grub_env_set (const char *name, const char *val)
if (! var) if (! var)
return grub_errno; return grub_errno;
/* This is not necessary. But leave this for readability. */
var->global = 0;
var->name = grub_strdup (name); var->name = grub_strdup (name);
if (! var->name) if (! var->name)
goto fail; goto fail;

View file

@ -46,7 +46,6 @@ grub_err_t EXPORT_FUNC(grub_env_set) (const char *name, const char *val);
const char *EXPORT_FUNC(grub_env_get) (const char *name); const char *EXPORT_FUNC(grub_env_get) (const char *name);
void EXPORT_FUNC(grub_env_unset) (const char *name); void EXPORT_FUNC(grub_env_unset) (const char *name);
void EXPORT_FUNC(grub_env_iterate) (int (*func) (struct grub_env_var *var)); void EXPORT_FUNC(grub_env_iterate) (int (*func) (struct grub_env_var *var));
struct grub_env_var *EXPORT_FUNC(grub_env_find) (const char *name);
grub_err_t EXPORT_FUNC(grub_register_variable_hook) (const char *name, grub_err_t EXPORT_FUNC(grub_register_variable_hook) (const char *name,
grub_env_read_hook_t read_hook, grub_env_read_hook_t read_hook,
grub_env_write_hook_t write_hook); grub_env_write_hook_t write_hook);