Ensure default_programmer from config files is used
This commit is contained in:
parent
4c92030e3a
commit
4c4952d4f6
|
@ -482,7 +482,7 @@ int main(int argc, char * argv [])
|
||||||
char * port; /* device port (/dev/xxx) */
|
char * port; /* device port (/dev/xxx) */
|
||||||
int terminal; /* 1=enter terminal mode, 0=don't */
|
int terminal; /* 1=enter terminal mode, 0=don't */
|
||||||
const char *exitspecs; /* exit specs string from command line */
|
const char *exitspecs; /* exit specs string from command line */
|
||||||
char * programmer; /* programmer id */
|
const char *programmer; /* programmer id */
|
||||||
char sys_config[PATH_MAX]; /* system wide config file */
|
char sys_config[PATH_MAX]; /* system wide config file */
|
||||||
char usr_config[PATH_MAX]; /* per-user config file */
|
char usr_config[PATH_MAX]; /* per-user config file */
|
||||||
char executable_abspath[PATH_MAX]; /* absolute path to avrdude executable */
|
char executable_abspath[PATH_MAX]; /* absolute path to avrdude executable */
|
||||||
|
@ -568,7 +568,7 @@ int main(int argc, char * argv [])
|
||||||
quell_progress = 0;
|
quell_progress = 0;
|
||||||
exitspecs = NULL;
|
exitspecs = NULL;
|
||||||
pgm = NULL;
|
pgm = NULL;
|
||||||
programmer = cfg_strdup("main()", default_programmer);
|
programmer = "";
|
||||||
verbose = 0;
|
verbose = 0;
|
||||||
baudrate = 0;
|
baudrate = 0;
|
||||||
bitclock = 0.0;
|
bitclock = 0.0;
|
||||||
|
@ -954,6 +954,9 @@ int main(int argc, char * argv [])
|
||||||
bitclock = default_bitclock;
|
bitclock = default_bitclock;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!(programmer && *programmer) && *default_programmer)
|
||||||
|
programmer = cache_string(default_programmer);
|
||||||
|
|
||||||
// Developer options to print parts and/or programmer entries of avrdude.conf
|
// Developer options to print parts and/or programmer entries of avrdude.conf
|
||||||
int dev_opt_c = dev_opt(programmer); // -c <wildcard>/[sSArt]
|
int dev_opt_c = dev_opt(programmer); // -c <wildcard>/[sSArt]
|
||||||
int dev_opt_p = dev_opt(partdesc); // -p <wildcard>/[dsSArcow*t]
|
int dev_opt_p = dev_opt(partdesc); // -p <wildcard>/[dsSArcow*t]
|
||||||
|
|
Loading…
Reference in New Issue