diff options
author | Bill Richardson <wfrichar@chromium.org> | 2014-09-23 12:49:26 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-09-25 20:26:53 +0000 |
commit | e192e7f6cea5f2c4556b729bf57ef1f552e0242a (patch) | |
tree | 1cfcde6d0b2a6a5490f4953080849f3ec9e3ab21 /futility/cmd_sign.c | |
parent | c6fa98d2ed1816d88e8517cd988de186fd6477b8 (diff) | |
download | vboot-e192e7f6cea5f2c4556b729bf57ef1f552e0242a.tar.gz |
futility: clean up a few shared functions
Move the Debug() function into a common place instead of several
copies in different files, rename shared functions to start with
"futil_"
BUG=none
BRANCH=ToT
TEST=make runtests
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Change-Id: I6b844553dff95c24894dae611102716a8da5312d
Reviewed-on: https://chromium-review.googlesource.com/219645
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'futility/cmd_sign.c')
-rw-r--r-- | futility/cmd_sign.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/futility/cmd_sign.c b/futility/cmd_sign.c index 49ea5f00..a983a222 100644 --- a/futility/cmd_sign.c +++ b/futility/cmd_sign.c @@ -317,6 +317,7 @@ static const struct option long_opts[] = { {"flags", 1, NULL, 'f'}, {"loemdir", 1, NULL, 'd'}, {"loemid", 1, NULL, 'l'}, + {"debug", 0, &debugging_enabled, 1}, {NULL, 0, NULL, 0}, }; static char *short_opts = ":s:b:k:S:B:v:f:d:l:"; @@ -437,7 +438,7 @@ static int do_sign(int argc, char *argv[]) case 2: infile = argv[optind++]; outfile = argv[optind++]; - copy_file_or_die(infile, outfile); + futil_copy_file_or_die(infile, outfile); break; case 1: /* Stomping right on it. Errors will leave it garbled. */ @@ -468,7 +469,7 @@ static int do_sign(int argc, char *argv[]) state.in_filename = outfile ? outfile : "<none>"; state.op = FUTIL_OP_SIGN; - errorcnt += futil_traverse(fd, &state, 1); + errorcnt += futil_traverse(fd, &state, MAP_RW); if (close(fd)) { errorcnt++; |