2008-05-31 Robert Millan <rmh@aybabtu.com>

* commands/search.c (search_label, search_fs_uuid, search_file): Do
        not print device names when we were asked to set a variable.
This commit is contained in:
robertmh 2008-05-31 21:08:04 +00:00
parent 6e037aa956
commit b7db5d47d9
2 changed files with 23 additions and 9 deletions

View file

@ -1,3 +1,8 @@
2008-05-31 Robert Millan <rmh@aybabtu.com>
* commands/search.c (search_label, search_fs_uuid, search_file): Do
not print device names when we were asked to set a variable.
2008-05-31 Robert Millan <rmh@aybabtu.com>
* term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement

View file

@ -63,9 +63,12 @@ search_label (const char *key, const char *var)
if (grub_strcmp (label, key) == 0)
{
/* Found! */
grub_printf (" %s", name);
if (count++ == 0 && var)
grub_env_set (var, name);
if (var)
{
grub_printf (" %s", name);
if (count++ == 0)
grub_env_set (var, name);
}
}
grub_free (label);
@ -111,9 +114,12 @@ search_fs_uuid (const char *key, const char *var)
if (grub_strcmp (uuid, key) == 0)
{
/* Found! */
grub_printf (" %s", name);
if (count++ == 0 && var)
grub_env_set (var, name);
if (var)
{
grub_printf (" %s", name);
if (count++ == 0)
grub_env_set (var, name);
}
}
grub_free (uuid);
@ -158,9 +164,12 @@ search_file (const char *key, const char *var)
if (file)
{
/* Found! */
grub_printf (" %s", name);
if (count++ == 0 && var)
grub_env_set (var, name);
if (var)
{
grub_printf (" %s", name);
if (count++ == 0)
grub_env_set (var, name);
}
grub_file_close (file);
}