forked from Miroirs/x49gp
fix loading firmware from command-line
This commit is contained in:
parent
93132e2702
commit
846402e9dc
1 changed files with 1 additions and 4 deletions
|
@ -216,6 +216,7 @@ void config_init( char* progname, int argc, char* argv[] )
|
||||||
break;
|
break;
|
||||||
case 'f':
|
case 'f':
|
||||||
do_reflash = true;
|
do_reflash = true;
|
||||||
|
opt.firmware = strdup( optarg );
|
||||||
break;
|
break;
|
||||||
case 'F':
|
case 'F':
|
||||||
do_reflash_full = true;
|
do_reflash_full = true;
|
||||||
|
@ -337,10 +338,6 @@ void config_init( char* progname, int argc, char* argv[] )
|
||||||
if ( opt.reinit < X49GP_REINIT_FLASH )
|
if ( opt.reinit < X49GP_REINIT_FLASH )
|
||||||
opt.reinit = X49GP_REINIT_FLASH;
|
opt.reinit = X49GP_REINIT_FLASH;
|
||||||
|
|
||||||
if ( opt.firmware != NULL )
|
|
||||||
fprintf( stderr, "Additional firmware file \"%s\" specified, overriding\n", optarg );
|
|
||||||
opt.firmware = optarg;
|
|
||||||
|
|
||||||
if ( do_reflash_full )
|
if ( do_reflash_full )
|
||||||
opt.reinit = X49GP_REINIT_FLASH_FULL;
|
opt.reinit = X49GP_REINIT_FLASH_FULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue