Attached please find a patch which does:
*Make the FILO 'color' command set a more helpful errnum rather than
using the one from the integer parser.
Signed-off-by: Alex Mauer <[EMAIL PROTECTED]>
Index: main/grub/builtins.c
===================================================================
--- main/grub/builtins.c (revision 73)
+++ main/grub/builtins.c (working copy)
@@ -218,8 +218,10 @@
highlight = skip_to(0, arg);
new_normal_color = color_number(normal);
- if (new_normal_color < 0 && !safe_parse_maxint(&normal, &new_normal_color))
+ if (new_normal_color < 0 && !safe_parse_maxint(&normal, &new_normal_color)) {
+ errnum = ERR_BAD_ARGUMENT;
return 1;
+ }
/* The second argument is optional, so set highlight_color to inverted NORMAL_COLOR. */
if (!*highlight)
@@ -227,8 +229,10 @@
| ((new_normal_color & 0xf) << 4));
else {
new_highlight_color = color_number(highlight);
- if (new_highlight_color < 0 && !safe_parse_maxint(&highlight, &new_highlight_color))
+ if (new_highlight_color < 0 && !safe_parse_maxint(&highlight, &new_highlight_color)) {
+ errnum = ERR_BAD_ARGUMENT;
return 1;
+ }
}
console_setcolor(new_normal_color, new_highlight_color);
--
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot