[LinuxBIOS] [FLASHROM] Fix the help, and print a message when nothing happens
Uwe Hermann
uwe at hermann-uwe.de
Wed Oct 3 02:02:26 CEST 2007
On Tue, Oct 02, 2007 at 11:53:46AM -0600, Jordan Crouse wrote:
> I have used flashrom just little enough to forget that -w isn't implied,
> and wonder why nothing happened. This fixes the help, and says something
> at the end of no operations are specified. Just a little user-friendliness
> from your good friends at LinuxBIOS.
Yep, good patch. I had some people asking me why flashrom doesn't work
and they had the same problem.
> Index: flashrom/flashrom.c
> ===================================================================
> --- flashrom.orig/flashrom.c 2007-10-02 11:43:38.000000000 -0600
> +++ flashrom/flashrom.c 2007-10-02 11:45:51.000000000 -0600
> @@ -195,8 +195,7 @@
> printf(" [-e exclude_end] [-m vendor:part] [-l file.layout] [-i imagename] [file]\n");
> printf
> (" -r | --read: read flash and save into file\n"
> - " -w | --write: write file into flash (default when\n"
> - " file is specified)\n"
> + " -w | --write: write file into flash\n"
> " -v | --verify: verify flash against file\n"
> " -E | --erase: erase flash device\n"
> " -V | --verbose: more verbose output\n"
> @@ -456,5 +455,9 @@
> if (verify_it)
> ret |= verify_flash(flash, buf);
>
> + if (!(read_it|write_it|verify_it|erase_it)) {
^ ^ ^
spaces between the entries, as per coding guidelines
> + printf("No operations were specified.\n");
> + }
> +
> return ret;
> }
Otherwise:
Acked-by: Uwe Hermann <uwe at hermann-uwe.de>
Uwe.
--
http://www.hermann-uwe.de | http://www.holsham-traders.de
http://www.crazy-hacks.org | http://www.unmaintained-free-software.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20071003/4c6c7f84/attachment.sig>
More information about the coreboot
mailing list