Am 25.08.2011 23:45 schrieb Uwe Hermann:
On Fri, Jul 29, 2011 at 11:18:06PM +0200, Carl-Daniel Hailfinger wrote:
Am 29.07.2011 14:55 schrieb Uwe Hermann:
Make all programmer/CLI options case-insensitive.
There's no need to make life for our user unnecessarily hard, and we already have many case-insensitive options where strcasecmp() is used.
Signed-off-by: Uwe Hermann uwe@hermann-uwe.de
I'm not sure this is a good idea. Our options/commands are case-sensitive (-V is totally different from -v), and making some parameters case-insensitive might lead people to assume that all parameters are case-insensitive.
I don't think that's an issue, it's probably pretty clear to most people using CLI tools that options are almost always case-sensitive, but parameters don't have to be. We can also additionally mention that in the manpage.
The behaviour should definately be consistent for the tool, though, even if that means we convert everything to case-sensitive (though I'd much prefer case-insensitive).
It's very inconsistent for the tool to allow both $ flashrom -p ft2232_spi:type=jtagkey,port=A or $ flashrom -p ft2232_spi:type=jTAgkEy,port=A
Whereas we explicitly force the user to use
$ flashrom -p internal:boardenable=force and these will not work: $ flashrom -p internal:boardenable=Force $ flashrom -p internal:boardenable=FORCE
And also the user is forced to type/use: $ flashrom -p dummy:emulate=SST25VF032B whereas $ flashrom -p dummy:emulate=sst25vf032b will not work.
As Stefan said, force_I_want_a_brick may be the only exception (i.e., it could really be case-sensitive) as we explicitly want to make it harder for the user to type the string in this case.
Mh. Three requests: - don't document the case insensitive matching - force_I_want_a_brick keeps case sensitivity - think long and hard about supportability of the new interface for later flashrom versions.
If Stefan Tauner thinks that's OK, I retract my objection.
Regards, Carl-Daniel