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.
Jordan
On Tue, Oct 02, 2007 at 11:53:46AM -0600, Jordan Crouse wrote:
[FLASHROM] Fix the help, and print a message when nothing happens
The help implied that writes happen by default, which they don't. Fix the text, and say something when we get to the bottom and nothing happened.
Signed-off-by: Jordan Crouse jordan.crouse@amd.com
Acked-by: Ward Vandewege ward@gnu.org
Thanks! Ward.
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@hermann-uwe.de
Uwe.
Just for the record, this is r2820.
Uwe.