]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
(search_file): Improve error message.
authorrobertmh <robertmh@localhost>
Mon, 22 Jun 2009 20:19:13 +0000 (20:19 +0000)
committerrobertmh <robertmh@localhost>
Mon, 22 Jun 2009 20:19:13 +0000 (20:19 +0000)
        (GRUB_MOD_INIT(search)): Add missing `-n' to help output.

ChangeLog
commands/search.c

index f78766a5eec9c7e68d66c0b3de1c275dfabfb261..ccebcf1e01cc2fc3a5ec2a200c774090649d6905 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,8 @@
 
        * commands/search.c (grub_cmd_search): Macroify hardcoded args[]
        indexes.  Check for -f explicitly.
+       (search_file): Improve error message.
+       (GRUB_MOD_INIT(search)): Add missing `-n' to help output.
 
 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
 
index 5b1c0b03b2b29a2a550a7702b8278d695c8708de..647f4083962eb1642ea1ac72454ebc175a30b10a 100644 (file)
@@ -162,7 +162,7 @@ search_file (const char *key, const char *var, int no_floppy)
   grub_free (buf);
 
   if (grub_errno == GRUB_ERR_NONE && count == 0)
-    grub_error (GRUB_ERR_FILE_NOT_FOUND, "no such device");
+    grub_error (GRUB_ERR_FILE_NOT_FOUND, "no such file: %s", key);
 }
 
 static grub_err_t
@@ -196,7 +196,7 @@ GRUB_MOD_INIT(search)
   cmd =
     grub_register_extcmd ("search", grub_cmd_search,
                          GRUB_COMMAND_FLAG_BOTH,
-                         "search [-f|-l|-u|-s] NAME",
+                         "search [-f|-l|-u|-s|-n] NAME",
                          "Search devices by file, filesystem label or filesystem UUID."
                          " If --set is specified, the first device found is"
                          " set to a variable. If no variable name is"