From: robertmh Date: Mon, 22 Jun 2009 20:19:13 +0000 (+0000) Subject: (search_file): Improve error message. X-Git-Tag: 1.98~761 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cc3752ad7374594dda88655a0cf57f9299c452d2;p=thirdparty%2Fgrub.git (search_file): Improve error message. (GRUB_MOD_INIT(search)): Add missing `-n' to help output. --- diff --git a/ChangeLog b/ChangeLog index f78766a5e..ccebcf1e0 100644 --- 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 diff --git a/commands/search.c b/commands/search.c index 5b1c0b03b..647f40839 100644 --- a/commands/search.c +++ b/commands/search.c @@ -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"