<div class="gmail_quote">On Tue, May 11, 2010 at 10:16 PM, Carl-Daniel Hailfinger <span dir="ltr"><<a href="mailto:c-d.hailfinger.devel.2006@gmx.net">c-d.hailfinger.devel.2006@gmx.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi,<br>
<br>
[please followup to <a href="mailto:flashrom@flashrom.org">flashrom@flashrom.org</a>]<br>
<br>
since I didn't get any answers except "hmm..." on IRC, I hope that list<br>
feedback will be more verbose.<br>
<br>
In the past, flashrom served one purpose (developers writing LinuxBIOS<br>
images or parts thereof to onboard flash), but nowadays it can handle<br>
external programmers, graphics/network/storage cards and other hardware<br>
as well. Given that the flashrom user base is growing rapidly especially<br>
among less technically inclined people, we changed the flashrom command<br>
line interface in various ways to eliminate nasty surprises.<br>
<br>
The flashrom 0.9.2 release is impending (only one small bugfix and one<br>
big frontend/documentation patch left), and this is why I'd like<br>
comments about the following change:<br>
<br>
-r and -w and -v currently take a filename argument, but that filename<br>
can be anywhere on the command line. Examples:<br>
<br>
flashrom -p dummy backup.rom -r<br>
flashrom -rp dummy backup.rom<br>
flashrom -rV backup.rom<br>
flashrom -p dummy -r backup.rom<br>
<br>
This flashrom behaviour is confusing and contradicts the man page which<br>
says that -r/-w/-v are followed by a filename. Besides that, all other<br>
options with arguments want their arguments directly after the option.<br>
<br>
I posted a patch which will make the accepted command line syntax<br>
conform to the man page, but I'd like to hear about any problems this<br>
change may cause.<br>
The patch is at <a href="http://patchwork.coreboot.org/patch/1298/" target="_blank">http://patchwork.coreboot.org/patch/1298/</a> (click on<br>
"patch" to download it in raw form) and applies cleanly against latest<br>
flashrom from svn.<br>
<br>
Tests of current svn flashrom with the patch applied are really<br>
appreciated, and feedback about the interface change will be taken<br>
seriously.</blockquote><div><br></div><div>I like the suggestion.</div><div><br></div><div>There are lots of programs out there which presume that the first string encountered that does not have a flag assigned to it, e.g. -p or -c or whatever, is the filename to operate on. That behavior is nice when the program does not require arguments to behave in a sane manner, e.g. <i>mplayer foo.ogg</i>. This usage model doesn't make sense for Flashrom, so it makes sense to treat the filename as any other argument and require that it has a flag preceding it to define the behavior.</div>

<div><br></div><div>/my $0.02</div><div><br></div></div>-- <br>David Hendricks (dhendrix)<br>Systems Software Engineer, Google Inc.<br>