[flashrom] [PATCH] No default driver if more than one driver is available
Stefan Tauner
stefan.tauner at student.tuwien.ac.at
Fri Jul 6 05:42:38 CEST 2012
On Fri, 06 Jul 2012 03:28:35 +0200
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net> wrote:
> If only one programmer driver is compiled in, make that driver the
> default. If more than one driver is compiled in, require --programmer
> specification at the command line.
>
> 3 results from a default flashrom configuration:
> […]
> This patch represents rough consensus from IRC. I would like to require
> --programmer in all cases to make sure nobody gets bitten by two
> different single-programmer builds (e.g. dediprog and internal), but
> this patch is already a step in the right direction.
Unlikely situation, but i would ack such a patch too.
OTOH >90% of the users would just require the internal programmer,
but out of those 90%, 99% probably use pre-compiled versions with
the default config...
> Please check that the printed error messages make sense. I took the
> liberty of removing "flashrom is free software..." from the output to
> keep this mail readable.
there is an easier way to get rid of that line than deleting it manually...
just saying :)
> Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>
>
> Index: flashrom-programmer_no_default/cli_classic.c
> ===================================================================
> --- flashrom-programmer_no_default/cli_classic.c (Revision 1547)
> +++ flashrom-programmer_no_default/cli_classic.c (Arbeitskopie)
> […]
> if (prog == PROGRAMMER_INVALID)
> - prog = default_programmer;
> + if (default_programmer == PROGRAMMER_INVALID) {
> + /* More than one programmer compiled in, there is no default choice. */
> + msg_perr("Please select a programmer with --programmer . Valid choices are:\n");
^ while i see your point (pun intended), the space is still wrong imho.
What about "Please select a programmer with the --programmer parameter. Valid choices are:\n"?
if the 80 column limit would be a problem (it is not afaics) then it could become...
"Please select a programmer with the --programmer parameter.\nValid choices are: "
that may look nicer anyway.
Acked-by: Stefan Tauner <stefan.tauner at student.tuwien.ac.at>
iff 2 out of idwer, uwe, twice11 agree with it.
--
Kind regards/Mit freundlichen Grüßen, Stefan Tauner
More information about the flashrom
mailing list