@@ -33,7 +33,7 @@ char verbose;
33
33
char testmode ;
34
34
char first_device ;
35
35
int restart_after_program ;
36
- int force_smarteeprom_config ;
36
+ int ignore_smarteeprom_config ;
37
37
int hex_cols ;
38
38
int hex_colw ;
39
39
@@ -487,19 +487,9 @@ uint8_t configure_smarteeprom(void)
487
487
return 1 ;
488
488
}
489
489
490
- uint8_t should_reconfigure ;
491
- if (force_smarteeprom_config == FORCE_NONE )
490
+ if (ignore_smarteeprom_config )
492
491
{
493
- should_reconfigure = prompt_yes_no ("SmartEEPROM: Your settings do not match the recommended values. Update setting?" );
494
- }
495
- else
496
- {
497
- should_reconfigure = (force_smarteeprom_config == FORCE_YES );
498
- }
499
-
500
- if (!should_reconfigure )
501
- {
502
- printf ("SmartEEPROM: Skipped!\n" );
492
+ printf ("SmartEEPROM: Your settings do not match the recommended values. Skipped!" );
503
493
return 1 ;
504
494
}
505
495
@@ -531,21 +521,6 @@ void strupper(char *str)
531
521
}
532
522
}
533
523
534
- //Prompt for Yy/Nn with message
535
- uint8_t prompt_yes_no (const char * msg )
536
- {
537
- printf (msg );
538
- printf (" (y/n):\n" );
539
-
540
- char c ;
541
- do {
542
- scanf (" %c" , & c );
543
- c = toupper (c );
544
- } while (c != 'N' && c != 'Y' );
545
-
546
- return c == 'Y' ;
547
- }
548
-
549
524
//Return file size of given file
550
525
int filesize (char * fname )
551
526
{
@@ -637,7 +612,7 @@ void display_help(void)
637
612
printf (" -s --size size Read firmware size of <size>\n" );
638
613
printf (" -D --download file Write firmware from <file> into device\n" );
639
614
printf (" -t --test Test mode (download/upload writes disabled, upload outputs data to stdout, restart disabled)\n" );
640
- printf (" --forceeep answer Automatic answer to Smart EEPROM re-configuration prompt <y/n> \n" );
615
+ printf (" --ignore-eep Ignore differences in SmartEEPROM configuration \n" );
641
616
printf (" --cols count Hex listing column count <count> [%i]\n" , COLS );
642
617
printf (" --colw width Hex listing column width <width> [%i]\n" , COLW );
643
618
printf (" --restart Restart device after successful programming\n" );
@@ -646,12 +621,12 @@ void display_help(void)
646
621
647
622
#define SW_COLS 1000
648
623
#define SW_COLW 1001
649
- #define SW_FORCEEEP 1002
650
624
651
625
//Program command line options
652
626
struct option long_options [] = {
653
627
//Flags
654
- { "restart" , no_argument , & restart_after_program , 1 },
628
+ { "restart" , no_argument , & restart_after_program , 1 },
629
+ { "ignore-eep" , no_argument , & ignore_smarteeprom_config , 1 },
655
630
//Other
656
631
{ "verbose" , no_argument , 0 , 'v' },
657
632
{ "help" , no_argument , 0 , 'h' },
@@ -666,7 +641,6 @@ struct option long_options[] = {
666
641
{ "test" , no_argument , 0 , 't' },
667
642
{ "cols" , required_argument , 0 , SW_COLS },
668
643
{ "colw" , required_argument , 0 , SW_COLW },
669
- { "forceeep" , required_argument , 0 , SW_FORCEEEP },
670
644
{ 0 , 0 , 0 , 0 }
671
645
};
672
646
@@ -676,7 +650,7 @@ int main(int argc, char *argv[])
676
650
testmode = 0 ;
677
651
first_device = 0 ;
678
652
restart_after_program = 0 ;
679
- force_smarteeprom_config = FORCE_NONE ;
653
+ ignore_smarteeprom_config = 0 ;
680
654
hex_cols = COLS ;
681
655
hex_colw = COLW ;
682
656
@@ -797,11 +771,6 @@ int main(int argc, char *argv[])
797
771
}
798
772
break ;
799
773
800
- case SW_FORCEEEP :
801
- strlower (optarg );
802
- force_smarteeprom_config = (strstr (optarg , "y" ) != NULL ) ? FORCE_YES : FORCE_NO ;
803
- break ;
804
-
805
774
default :
806
775
command = CMD_ABORT ;
807
776
break ;
0 commit comments