1
0
Fork 0
forked from Miroirs/x49gp

fix loading firmware from command-line

This commit is contained in:
Gwenhael Le Moine 2024-11-14 15:46:52 +01:00
parent 93132e2702
commit 846402e9dc
No known key found for this signature in database
GPG key ID: FDFE3669426707A7

View file

@ -216,6 +216,7 @@ void config_init( char* progname, int argc, char* argv[] )
break;
case 'f':
do_reflash = true;
opt.firmware = strdup( optarg );
break;
case 'F':
do_reflash_full = true;
@ -337,10 +338,6 @@ void config_init( char* progname, int argc, char* argv[] )
if ( 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 )
opt.reinit = X49GP_REINIT_FLASH_FULL;
}