Add a shortcut option, '-I' which is the same as '-i' but defaults the
file format type to 'immediate mode' where the filename is assumed to be the memory data itself. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@318 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
parent
7007ab14ba
commit
fa3d83df02
12
main.c
12
main.c
|
@ -375,7 +375,7 @@ int main(int argc, char * argv [])
|
|||
/*
|
||||
* process command line arguments
|
||||
*/
|
||||
while ((ch = getopt(argc,argv,"?c:C:eE:f:Fi:m:no:p:P:tvVyY:")) != -1) {
|
||||
while ((ch = getopt(argc,argv,"?c:C:eE:f:FiI:m:no:p:P:tvVyY:")) != -1) {
|
||||
|
||||
switch (ch) {
|
||||
case 'c': /* programmer id */
|
||||
|
@ -441,6 +441,16 @@ int main(int argc, char * argv [])
|
|||
inputf = optarg;
|
||||
break;
|
||||
|
||||
case 'I': /* specify input file and assume 'immediate mode' */
|
||||
if (outputf || terminal) {
|
||||
fprintf(stderr,"%s: -o, -I, and -t are incompatible\n\n", progname);
|
||||
return 1;
|
||||
}
|
||||
doread = 0;
|
||||
inputf = optarg;
|
||||
filefmt = FMT_IMM;
|
||||
break;
|
||||
|
||||
case 'f': /* specify file format */
|
||||
if (strlen(optarg) != 1) {
|
||||
fprintf(stderr, "%s: invalid file format \"%s\"\n",
|
||||
|
|
Loading…
Reference in New Issue