From 0cd11d8919c66351b9508f58ca0a7f7aaad6dd59 Mon Sep 17 00:00:00 2001 From: Edward O'Callaghan Date: Mon, 23 Sep 2019 22:46:12 +1000 Subject: cli_classic: Add convenient '--flash-name' cli opt We have this in the ChromiumOS fork of flashrom which we rely on to obtain the current flash chip in use. This ports it for upstream consumption. V.2: Constrain number_of_operations to one as per Nico's comment. V.3: Move two goto's outside inner if-else block. V.4: Add missing --help line. V.5: Add man page entry. v.6: Use printf() directly. Change-Id: I23d574a2f8eaf809a5c0524490db9e3a560ede56 Signed-off-by: Edward O'Callaghan Reviewed-on: https://review.coreboot.org/c/flashrom/+/35591 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber --- flashrom.8.tmpl | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'flashrom.8.tmpl') diff --git a/flashrom.8.tmpl b/flashrom.8.tmpl index 30dc97d19..7002c7230 100644 --- a/flashrom.8.tmpl +++ b/flashrom.8.tmpl @@ -44,10 +44,12 @@ .SH NAME flashrom \- detect, read, write, verify and erase flash chips .SH SYNOPSIS -.B flashrom \fR[\fB\-h\fR|\fB\-R\fR|\fB\-L\fR|\fB\-z\fR|\fB\-p\fR [:] - [\fB\-E\fR|\fB\-r\fR |\fB\-w\fR |\fB\-v\fR ] [\fB\-c\fR ] - [(\fB\-l\fR |\fB\-\-ifd|\fB \-\-fmap\fR|\fB\-\-fmap-file\fR ) [\fB\-i\fR ]] - [\fB\-n\fR] [\fB\-N\fR] [\fB\-f\fR]] +.B flashrom \fR[\fB\-h\fR|\fB\-R\fR|\fB\-L\fR|\fB\-z\fR| + \fB\-p\fR [:] [\fB\-c\fR ] + (\fB\-\-flash\-name\fR| + [\fB\-E\fR|\fB\-r\fR |\fB\-w\fR |\fB\-v\fR ] + [(\fB\-l\fR |\fB\-\-ifd|\fB \-\-fmap\fR|\fB\-\-fmap-file\fR ) [\fB\-i\fR ]] + [\fB\-n\fR] [\fB\-N\fR] [\fB\-f\fR])] [\fB\-V\fR[\fBV\fR[\fBV\fR]]] [\fB-o\fR ] .SH DESCRIPTION .B flashrom @@ -242,6 +244,9 @@ Only flash region/image .B from flash layout. .TP +.B "\-\-flash\-name" +Prints out the detected flash chips name. +.TP .B "\-L, \-\-list\-supported" List the flash chips, chipsets, mainboards, and external programmers (including PCI, USB, parallel port, and serial port based devices) @@ -1335,6 +1340,8 @@ David Hendricks .br Dominik Geyer .br +Edward O'Callaghan +.br Eric Biederman .br Giampiero Giancipoli -- cgit v1.2.3