summaryrefslogtreecommitdiff
path: root/utility/tpmc.c
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2013-03-07 12:54:29 -0800
committerChromeBot <chrome-bot@google.com>2013-03-11 08:38:46 -0700
commitfeb2518166b1cd181e607c611cbb610f0c7300da (patch)
tree33a22857fad5a1f2246caf064b3b4eec8867e00f /utility/tpmc.c
parent5fed2a667096341160db8643a4a057e328953a1d (diff)
downloadvboot-factory-spring-3842.B.tar.gz
Wrap all vboot utilities with futility.firmware-spring-3833.Bfactory-spring-3842.B
This moves all the old userspace utilities generated by vboot_reference into a subdirectory not in $PATH, and replaces them with symlinks to a single executable named 'futility'. At the moment that utility just execs the original utilities (optionally logging that fact first). Ultimately, the old utilities will be subsumed into a single binary instead of multiple separate executables. There is a matching CL needed to make the recovery image creation work. BUG=chromium-os:37062 BRANCH=none CQ-DEPEND=CL:44864 TEST=auto To test, build everything, test everything. It should work as before in all cases. I have built normal images, test images, factory installers, recovery images; they all seem to work. I've run trybots on daisy-paladin link-paladin lumpy-paladin and alex-paladin. Change-Id: Ie93db676f2ed2a64e4b13b3b5dc6b65a77db0f8c Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/44871 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Diffstat (limited to 'utility/tpmc.c')
-rw-r--r--utility/tpmc.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/utility/tpmc.c b/utility/tpmc.c
index 898e2552..9302dd1e 100644
--- a/utility/tpmc.c
+++ b/utility/tpmc.c
@@ -412,9 +412,16 @@ command_record command_table[] = {
static int n_commands = sizeof(command_table) / sizeof(command_table[0]);
int main(int argc, char* argv[]) {
+ char *progname;
+ progname = strrchr(argv[0], '/');
+ if (progname)
+ progname++;
+ else
+ progname = argv[0];
+
if (argc < 2) {
fprintf(stderr, "usage: %s <TPM command> [args]\n or: %s help\n",
- argv[0], argv[0]);
+ progname, progname);
return OTHER_ERROR;
} else {
command_record* c;
@@ -439,7 +446,7 @@ int main(int argc, char* argv[]) {
}
/* No command matched. */
- fprintf(stderr, "%s: unknown command: %s\n", argv[0], cmd);
+ fprintf(stderr, "%s: unknown command: %s\n", progname, cmd);
return OTHER_ERROR;
}
}