summaryrefslogtreecommitdiff
path: root/futility/cmd_update.c
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2019-05-08 13:33:20 -0700
committerchrome-bot <chrome-bot@chromium.org>2019-05-14 20:13:03 -0700
commit88a47ff99952bb4f270a4e80c80c578e39fb9477 (patch)
tree9663698a08bcc5b25497c7a1c57a0ae70c468fe3 /futility/cmd_update.c
parent8cb16750dee520e2bb6c520cec17b87770d24e26 (diff)
downloadvboot-88a47ff99952bb4f270a4e80c80c578e39fb9477.tar.gz
futility: Unify logging macros
The firmware updater introduced its own logging macros, but the rest of futility already used a (smaller) set of macros previously. Unify the two so that all parts of the binary use the same system. Note that the same debug output infrastructure can (and already could before this patch, although it was less obvious) be enabled with both futility --debug update and futility update -d. This is a bit weird but shouldn't really hurt and I presume we may want it for backwards compatibility in the updater. BRANCH=None BUG=None TEST=make runtests Change-Id: I8b7c1677bcef9e9772ee666c72958d27139b36a2 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1601678 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Diffstat (limited to 'futility/cmd_update.c')
-rw-r--r--futility/cmd_update.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/futility/cmd_update.c b/futility/cmd_update.c
index da06d6fc..2c7d58c0 100644
--- a/futility/cmd_update.c
+++ b/futility/cmd_update.c
@@ -222,21 +222,21 @@ static int do_update(int argc, char *argv[])
case '?':
errorcnt++;
if (optopt)
- Error("Unrecognized option: -%c\n", optopt);
+ ERROR("Unrecognized option: -%c\n", optopt);
else if (argv[optind - 1])
- Error("Unrecognized option (possibly '%s')\n",
+ ERROR("Unrecognized option (possibly '%s')\n",
argv[optind - 1]);
else
- Error("Unrecognized option.\n");
+ ERROR("Unrecognized option.\n");
break;
default:
errorcnt++;
- Error("Failed parsing options.\n");
+ ERROR("Failed parsing options.\n");
}
}
if (optind < argc) {
errorcnt++;
- Error("Unexpected arguments.\n");
+ ERROR("Unexpected arguments.\n");
}
if (!errorcnt)
errorcnt += updater_setup_config(cfg, &args, &do_update);
@@ -246,7 +246,7 @@ static int do_update(int argc, char *argv[])
r = update_firmware(cfg);
if (r != UPDATE_ERR_DONE) {
r = Min(r, UPDATE_ERR_UNKNOWN);
- Error("%s\n", updater_error_messages[r]);
+ ERROR("%s\n", updater_error_messages[r]);
errorcnt++;
}
/* Use stdout for the final result. */