[coreboot] flashrom: Move options -s -e to -S -E and -E to -e.

Peter Stuge peter at stuge.se
Fri May 2 20:12:59 CEST 2008


NOTE! This will break all scripts that erase flash chips
automatically.

But better now than post 1.0.


//Peter
-------------- next part --------------
flashrom: Change start/end -s and -e to -S and -E, and change erase -E to -e.

Signed-off-by: Peter Stuge <peter at stuge.se>


Index: flashrom.5.swapopts/flashrom.8
===================================================================
--- flashrom.5.swapopts/flashrom.8	(revision 3276)
+++ flashrom.5.swapopts/flashrom.8	(working copy)
@@ -2,7 +2,7 @@
 .SH NAME
 flashrom \- a universal BIOS/ROM/flash programming utility
 .SH SYNOPSIS
-.B flashrom \fR[\fB\-rwvEVfLhR\fR] [\fB\-c\fR chipname] [\fB\-s\fR exclude_start] [\fB\-e\fR exclude_end]
+.B flashrom \fR[\fB\-rwveVfLhR\fR] [\fB\-c\fR chipname] [\fB\-S\fR exclude_start] [\fB\-E\fR exclude_end]
          [\fB-m\fR vendor:part] [\fB-l\fR file.layout] [\fB-i\fR image_name] [file]
 .SH DESCRIPTION
 .B flashrom
@@ -25,7 +25,7 @@
 .B "\-v, \-\-verify"
 Verify the flash ROM contents against the given file.
 .TP
-.B "\-E, \-\-erase"
+.B "\-e, \-\-erase"
 Erase the flash ROM device.
 .TP
 .B "\-V, \-\-verbose"
@@ -34,10 +34,10 @@
 .B "\-c, \-\-chip" <chipname>
 Probe only for specified flash ROM chip.
 .TP
-.B "\-s, \-\-estart" <addr>
+.B "\-S, \-\-estart" <addr>
 Exclude start position (obsolete).
 .TP
-.B "\-e, \-\-eend" <addr> 
+.B "\-E, \-\-eend" <addr> 
 Exclude end postion (obsolete).
 .TP
 .B "\-m, \-\-mainboard" <[vendor:]part>
Index: flashrom.5.swapopts/flashrom.c
===================================================================
--- flashrom.5.swapopts/flashrom.c	(revision 3276)
+++ flashrom.5.swapopts/flashrom.c	(working copy)
@@ -213,17 +213,17 @@
 
 void usage(const char *name)
 {
-	printf("usage: %s [-rwvEVfLhR] [-c chipname] [-s exclude_start]\n", name);
-	printf("       [-e exclude_end] [-m [vendor:]part] [-l file.layout] [-i imagename] [file]\n");
+	printf("usage: %s [-rwveVfLhR] [-c chipname] [-S exclude_start]\n", name);
+	printf("       [-E exclude_end] [-m [vendor:]part] [-l file.layout] [-i imagename] [file]\n");
 	printf
 	    ("   -r | --read:                      read flash and save into file\n"
 	     "   -w | --write:                     write file into flash\n"
 	     "   -v | --verify:                    verify flash against file\n"
-	     "   -E | --erase:                     erase flash device\n"
+	     "   -e | --erase:                     erase flash device\n"
 	     "   -V | --verbose:                   more verbose output\n"
 	     "   -c | --chip <chipname>:           probe only for specified flash chip\n"
-	     "   -s | --estart <addr>:             exclude start position\n"
-	     "   -e | --eend <addr>:               exclude end postion\n"
+	     "   -S | --estart <addr>:             exclude start position\n"
+	     "   -E | --eend <addr>:               exclude end postion\n"
 	     "   -m | --mainboard <[vendor:]part>: override mainboard settings\n"
 	     "   -f | --force:                     force write without checking image\n"
 	     "   -l | --layout <file.layout>:      read rom layout from file\n"
@@ -255,11 +255,11 @@
 	static struct option long_options[] = {
 		{"read", 0, 0, 'r'},
 		{"write", 0, 0, 'w'},
-		{"erase", 0, 0, 'E'},
+		{"erase", 0, 0, 'e'},
 		{"verify", 0, 0, 'v'},
 		{"chip", 1, 0, 'c'},
-		{"estart", 1, 0, 's'},
-		{"eend", 1, 0, 'e'},
+		{"estart", 1, 0, 'S'},
+		{"eend", 1, 0, 'E'},
 		{"mainboard", 1, 0, 'm'},
 		{"verbose", 0, 0, 'V'},
 		{"force", 0, 0, 'f'},
@@ -285,7 +285,7 @@
 	}
 
 	setbuf(stdout, NULL);
-	while ((opt = getopt_long(argc, argv, "rRwvVEfc:s:e:m:l:i:Lh",
+	while ((opt = getopt_long(argc, argv, "rRwvVefc:S:E:m:l:i:Lh",
 				  long_options, &option_index)) != EOF) {
 		switch (opt) {
 		case 'r':
@@ -303,14 +303,14 @@
 		case 'V':
 			verbose = 1;
 			break;
-		case 'E':
+		case 'e':
 			erase_it = 1;
 			break;
-		case 's':
+		case 'S':
 			tempstr = strdup(optarg);
 			sscanf(tempstr, "%x", &exclude_start_position);
 			break;
-		case 'e':
+		case 'E':
 			tempstr = strdup(optarg);
 			sscanf(tempstr, "%x", &exclude_end_position);
 			break;
Index: flashrom.5.swapopts/README
===================================================================
--- flashrom.5.swapopts/README	(revision 3276)
+++ flashrom.5.swapopts/README	(working copy)
@@ -22,17 +22,17 @@
 Usage
 -----
 
- $ flashrom [-rwvEVfh] [-c chipname] [-s exclude_start] [-e exclude_end]
+ $ flashrom [-rwveVfh] [-c chipname] [-S exclude_start] [-E exclude_end]
             [-m [vendor:]part] [-l file.layout] [-i imagename] [file]
    -r | --read:                      read flash and save into file
    -w | --write:                     write file into flash (default when
                                      file is specified)
    -v | --verify:                    verify flash against file
-   -E | --erase:                     erase flash device
+   -e | --erase:                     erase flash device
    -V | --verbose:                   more verbose output
    -c | --chip <chipname>:           probe only for specified flash chip
-   -s | --estart <addr>:             exclude start position
-   -e | --eend <addr>:               exclude end postion
+   -S | --estart <addr>:             exclude start position
+   -E | --eend <addr>:               exclude end postion
    -m | --mainboard <[vendor:]part>: override mainboard settings
    -f | --force:                     force write without checking image
    -l | --layout <file.layout>:      read rom layout from file
@@ -90,7 +90,7 @@
  
 Currently overlapping sections are not supported.
 
-ROM layouts should replace the -s and -e option since they are more 
+ROM layouts should replace the -S and -E option since they are more 
 flexible and they should lead to a ROM update file format with the 
 ROM layout and the ROM image in one file (cpio, zip or something?).
 


More information about the coreboot mailing list