diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2019-02-14 18:13:21 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-02-19 22:15:19 -0800 |
commit | a6f8b01d0c7eaa2b19d1ad0611f3afcad47ac061 (patch) | |
tree | e1b1c98d75466a44c4068c1bfd0b3d07987a1ede /util/iteflash.c | |
parent | 3e9fe80cd030bd72d831f763f2ac873fe3f4c339 (diff) | |
download | chrome-ec-a6f8b01d0c7eaa2b19d1ad0611f3afcad47ac061.tar.gz |
util: improve iteflash help output
Some lines in 'itflash --help' output got quite long. This patch
modifies the code so that the output looks as follows:
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
Usage: ./build/host/util/iteflash [-d] [-v <VID>] [-p <PID>] \
[-c <ccd|ftdi>] [-i <1|2>] [-s <serial>] [-u] \
[-e] [-r <file>] [-W <0|1|false|true>] [-w <file>] \
[-R base[:size]]
--d[ebug] : output debug traces
--e[rase] : erase all the flash content
-c, --i2c-interface <ccd|ftdi> : I2C interface to use
--i[interface] <1> : FTDI interface: A=1, B=2, ...
--p[roduct] <0x1234> : USB product ID
[-R|--range base[:size]] - allow to read or write just a slice of the file,
starting at <base>:<size> bytes, or til the end of the file if <size>
is not specified, expressed in hex
--r[ead] <file> : read the flash content and write it into <file>
--s[erial] <serialname> : USB serial string
--u[nprotect] : remove flash write protect
--v[endor] <0x1234> : USB vendor ID
-W, --send-waveform <0|1|false|true> : Send the special waveform?
Default is true. Set to false if ITE direct firmware update
mode has already been enabled.
--w[rite] <file> : read <file> and write it to flash
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
BRANCH=none
BUG=none
TEST=ran 'make BOARD=host utils' and verified that iteflash --help
output matches the above.
Change-Id: If10f62eb1050f3a92bca612ea854a3d30c0856f7
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1474894
Reviewed-by: Namyoon Woo <namyoon@chromium.org>
Reviewed-by: Matthew Blecker <matthewb@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'util/iteflash.c')
-rw-r--r-- | util/iteflash.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/util/iteflash.c b/util/iteflash.c index 1cecf11184..d0bfa745ee 100644 --- a/util/iteflash.c +++ b/util/iteflash.c @@ -1610,9 +1610,10 @@ static const struct option longopts[] = { static void display_usage(char *program) { - fprintf(stderr, "Usage: %s [-d] [-v <VID>] [-p <PID>] " - "[-c <ccd|ftdi>] [-i <1|2>] [-s <serial>] [-u] [-e] [-r <file>]" - "[-W <0|1|false|true>] [-w <file>] [-R base[:size]]\n", + fprintf(stderr, "Usage: %s [-d] [-v <VID>] [-p <PID>] \\\n" + " [-c <ccd|ftdi>] [-i <1|2>] [-s <serial>] [-u] \\\n" + " [-e] [-r <file>] [-W <0|1|false|true>] [-w <file>] \\\n" + " [-R base[:size]]\n", program); fprintf(stderr, "--d[ebug] : output debug traces\n"); fprintf(stderr, "--e[rase] : erase all the flash content\n"); @@ -1621,18 +1622,18 @@ static void display_usage(char *program) fprintf(stderr, "--i[interface] <1> : FTDI interface: A=1, B=2, ...\n"); fprintf(stderr, "--p[roduct] <0x1234> : USB product ID\n"); fprintf(stderr, "[-R|--range base[:size]] - allow to read or write " - "just a slice of the file, starting at <base>. <size> bytes, or" - " til the end of the file if <size> is not specified, expressed" - " in hex\n"); + "just a slice of the file,\n starting at <base>:<size> " + "bytes, or til the end of the file if <size>\n is not " + "specified, expressed in hex\n"); fprintf(stderr, "--r[ead] <file> : read the flash content and " "write it into <file>\n"); fprintf(stderr, "--s[erial] <serialname> : USB serial string\n"); fprintf(stderr, "--u[nprotect] : remove flash write protect\n"); fprintf(stderr, "--v[endor] <0x1234> : USB vendor ID\n"); fprintf(stderr, "-W, --send-waveform <0|1|false|true> : Send the " - "specal waveform? Default is true." - " Set to false if ITE direct firmware update mode has " - "already been enabled.\n"); + "special waveform?\n Default is true. Set to false if ITE" + " direct firmware update\n mode has already been enabled.\n" + ); fprintf(stderr, "--w[rite] <file> : read <file> and " "write it to flash\n"); exit(2); |