From 025c75d05cf16c0f53c2bafb73c660c867572db9 Mon Sep 17 00:00:00 2001 From: Daniel Campello Date: Mon, 14 Mar 2022 11:43:16 -0600 Subject: flashrom.8.tmpl: Clarify man entries for -w/-v/-x This change adds follow up changes to the man page: - Explain (-) argument for -w/-v operations - Expand on region name handling of -x operation Also updates cli_classic.c to match with --help output. BUG=b:224364316 Change-Id: I0cba593da3926c8587027789f4e1e89a2329ca7f Signed-off-by: Daniel Campello Reviewed-on: https://review.coreboot.org/c/flashrom/+/62794 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan --- cli_classic.c | 4 ++-- flashrom.8.tmpl | 16 +++++++++++----- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/cli_classic.c b/cli_classic.c index b3930d21..0b6e79c3 100644 --- a/cli_classic.c +++ b/cli_classic.c @@ -47,9 +47,9 @@ static void cli_classic_usage(const char *name) printf(" -h | --help print this help text\n" " -R | --version print version (release)\n" " -r | --read read flash and save to \n" - " -w | --write write or the content provided\n" + " -w | --write (|-) write or the content provided\n" " on the standard input to flash\n" - " -v | --verify verify flash against \n" + " -v | --verify (|-) verify flash against \n" " or the content provided on the standard input\n" " -E | --erase erase flash memory\n" " -V | --verbose more verbose output\n" diff --git a/flashrom.8.tmpl b/flashrom.8.tmpl index fe2d9d6f..3e4bc5e4 100644 --- a/flashrom.8.tmpl +++ b/flashrom.8.tmpl @@ -82,11 +82,13 @@ Read flash ROM contents and save them into the given .BR . If the file already exists, it will be overwritten. .TP -.B "\-w, \-\-write " +.B "\-w, \-\-write (|-)" Write .B -into flash ROM. This will first automatically -.B erase +into flash ROM. If +.B - +is provided instead, contents will be read from stdin. This will first automatically + B erase the chip, then write to it. .sp In the process the chip is also read several times. First an in-memory backup @@ -124,16 +126,20 @@ region using the .BR internal programmer. It may be enabled by default in this case in the future. .TP -.B "\-v, \-\-verify " +.B "\-v, \-\-verify (|-)" Verify the flash ROM contents against the given .BR . +If +.BR - +is provided instead, contents will be written to the stdout. .TP .B "\-E, \-\-erase" Erase the flash ROM chip. .TP .B "\-x, \-\-extract" Extract every region defined on the layout from flash ROM chip to a -file with the same name as the extracted region. +file with the same name as the extracted region (replacing spaces with +underscores). .TP .B "\-V, \-\-verbose" More verbose output. This option can be supplied multiple times -- cgit v1.2.3