summaryrefslogtreecommitdiffstats
path: root/cli_classic.c
diff options
context:
space:
mode:
authorStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2014-06-02 00:12:23 +0000
committerStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2014-06-02 00:12:23 +0000
commit9f6c5fc7f7515e290a4821e52ee055d39bec4c24 (patch)
tree2024a49710df58beb390dd05b425bf1b686a3eb8 /cli_classic.c
parent30edfdd46aa6fe37849d54f421132fa208040241 (diff)
downloadflashrom-9f6c5fc7f7515e290a4821e52ee055d39bec4c24.zip
flashrom-9f6c5fc7f7515e290a4821e52ee055d39bec4c24.tar.gz
Add default arguments for the default programmer (only)
This code exists thanks to food for thought from Urja Rannikko. Corresponding to flashrom svn r1814. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Diffstat (limited to 'cli_classic.c')
-rw-r--r--cli_classic.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/cli_classic.c b/cli_classic.c
index a32d55b..fc1b9ba 100644
--- a/cli_classic.c
+++ b/cli_classic.c
@@ -396,8 +396,10 @@ int main(int argc, char *argv[])
if (prog == PROGRAMMER_INVALID) {
if (CONFIG_DEFAULT_PROGRAMMER != PROGRAMMER_INVALID) {
prog = CONFIG_DEFAULT_PROGRAMMER;
- msg_pinfo("Using default programmer \"%s\".\n",
- programmer_table[CONFIG_DEFAULT_PROGRAMMER].name);
+ /* We need to strdup here because we free(pparam) unconditionally later. */
+ pparam = strdup(CONFIG_DEFAULT_PROGRAMMER_ARGS);
+ msg_pinfo("Using default programmer \"%s\" with arguments \"%s\".\n",
+ programmer_table[CONFIG_DEFAULT_PROGRAMMER].name, pparam);
} else {
msg_perr("Please select a programmer with the --programmer parameter.\n"
"Previously this was not necessary because there was a default set.\n"
OpenPOWER on IntegriCloud