Ticket #100: fr.5.swapopts.patch
| File fr.5.swapopts.patch, 5.6 KB (added by stuge, 5 months ago) |
|---|
-
flashrom.5.swapopts/flashrom.8
flashrom: Change start/end -s and -e to -S and -E, and change erase -E to -e. Signed-off-by: Peter Stuge <peter@stuge.se>
2 2 .SH NAME 3 3 flashrom \- a universal BIOS/ROM/flash programming utility 4 4 .SH SYNOPSIS 5 .B flashrom \fR[\fB\-rwv EVfLhR\fR] [\fB\-c\fR chipname] [\fB\-s\fR exclude_start] [\fB\-e\fR exclude_end]5 .B flashrom \fR[\fB\-rwveVfLhR\fR] [\fB\-c\fR chipname] [\fB\-S\fR exclude_start] [\fB\-E\fR exclude_end] 6 6 [\fB-m\fR vendor:part] [\fB-l\fR file.layout] [\fB-i\fR image_name] [file] 7 7 .SH DESCRIPTION 8 8 .B flashrom … … 25 25 .B "\-v, \-\-verify" 26 26 Verify the flash ROM contents against the given file. 27 27 .TP 28 .B "\- E, \-\-erase"28 .B "\-e, \-\-erase" 29 29 Erase the flash ROM device. 30 30 .TP 31 31 .B "\-V, \-\-verbose" … … 34 34 .B "\-c, \-\-chip" <chipname> 35 35 Probe only for specified flash ROM chip. 36 36 .TP 37 .B "\- s, \-\-estart" <addr>37 .B "\-S, \-\-estart" <addr> 38 38 Exclude start position (obsolete). 39 39 .TP 40 .B "\- e, \-\-eend" <addr>40 .B "\-E, \-\-eend" <addr> 41 41 Exclude end postion (obsolete). 42 42 .TP 43 43 .B "\-m, \-\-mainboard" <[vendor:]part> -
flashrom.5.swapopts/flashrom.c
213 213 214 214 void usage(const char *name) 215 215 { 216 printf("usage: %s [-rwv EVfLhR] [-c chipname] [-sexclude_start]\n", name);217 printf(" [- eexclude_end] [-m [vendor:]part] [-l file.layout] [-i imagename] [file]\n");216 printf("usage: %s [-rwveVfLhR] [-c chipname] [-S exclude_start]\n", name); 217 printf(" [-E exclude_end] [-m [vendor:]part] [-l file.layout] [-i imagename] [file]\n"); 218 218 printf 219 219 (" -r | --read: read flash and save into file\n" 220 220 " -w | --write: write file into flash\n" 221 221 " -v | --verify: verify flash against file\n" 222 " - E| --erase: erase flash device\n"222 " -e | --erase: erase flash device\n" 223 223 " -V | --verbose: more verbose output\n" 224 224 " -c | --chip <chipname>: probe only for specified flash chip\n" 225 " - s| --estart <addr>: exclude start position\n"226 " - e| --eend <addr>: exclude end postion\n"225 " -S | --estart <addr>: exclude start position\n" 226 " -E | --eend <addr>: exclude end postion\n" 227 227 " -m | --mainboard <[vendor:]part>: override mainboard settings\n" 228 228 " -f | --force: force write without checking image\n" 229 229 " -l | --layout <file.layout>: read rom layout from file\n" … … 255 255 static struct option long_options[] = { 256 256 {"read", 0, 0, 'r'}, 257 257 {"write", 0, 0, 'w'}, 258 {"erase", 0, 0, ' E'},258 {"erase", 0, 0, 'e'}, 259 259 {"verify", 0, 0, 'v'}, 260 260 {"chip", 1, 0, 'c'}, 261 {"estart", 1, 0, ' s'},262 {"eend", 1, 0, ' e'},261 {"estart", 1, 0, 'S'}, 262 {"eend", 1, 0, 'E'}, 263 263 {"mainboard", 1, 0, 'm'}, 264 264 {"verbose", 0, 0, 'V'}, 265 265 {"force", 0, 0, 'f'}, … … 285 285 } 286 286 287 287 setbuf(stdout, NULL); 288 while ((opt = getopt_long(argc, argv, "rRwvV Efc:s:e:m:l:i:Lh",288 while ((opt = getopt_long(argc, argv, "rRwvVefc:S:E:m:l:i:Lh", 289 289 long_options, &option_index)) != EOF) { 290 290 switch (opt) { 291 291 case 'r': … … 303 303 case 'V': 304 304 verbose = 1; 305 305 break; 306 case ' E':306 case 'e': 307 307 erase_it = 1; 308 308 break; 309 case ' s':309 case 'S': 310 310 tempstr = strdup(optarg); 311 311 sscanf(tempstr, "%x", &exclude_start_position); 312 312 break; 313 case ' e':313 case 'E': 314 314 tempstr = strdup(optarg); 315 315 sscanf(tempstr, "%x", &exclude_end_position); 316 316 break; -
flashrom.5.swapopts/README
22 22 Usage 23 23 ----- 24 24 25 $ flashrom [-rwv EVfh] [-c chipname] [-s exclude_start] [-eexclude_end]25 $ flashrom [-rwveVfh] [-c chipname] [-S exclude_start] [-E exclude_end] 26 26 [-m [vendor:]part] [-l file.layout] [-i imagename] [file] 27 27 -r | --read: read flash and save into file 28 28 -w | --write: write file into flash (default when 29 29 file is specified) 30 30 -v | --verify: verify flash against file 31 - E| --erase: erase flash device31 -e | --erase: erase flash device 32 32 -V | --verbose: more verbose output 33 33 -c | --chip <chipname>: probe only for specified flash chip 34 - s| --estart <addr>: exclude start position35 - e| --eend <addr>: exclude end postion34 -S | --estart <addr>: exclude start position 35 -E | --eend <addr>: exclude end postion 36 36 -m | --mainboard <[vendor:]part>: override mainboard settings 37 37 -f | --force: force write without checking image 38 38 -l | --layout <file.layout>: read rom layout from file … … 90 90 91 91 Currently overlapping sections are not supported. 92 92 93 ROM layouts should replace the - s and -eoption since they are more93 ROM layouts should replace the -S and -E option since they are more 94 94 flexible and they should lead to a ROM update file format with the 95 95 ROM layout and the ROM image in one file (cpio, zip or something?). 96 96
