From: Aaron Taylor Date: Tue, 10 Sep 2019 07:01:08 +0000 (-0700) Subject: Reassigned command line flags in `nedsim` and updated print_usage(). X-Git-Url: http://git.subgeniuskitty.com/ned1/.git/commitdiff_plain/f08187ad639b5f4bf5ebc20b9f278cc87d5c7650 Reassigned command line flags in `nedsim` and updated print_usage(). --- diff --git a/nedsim/nedsim.c b/nedsim/nedsim.c index be63706..b443fc2 100644 --- a/nedsim/nedsim.c +++ b/nedsim/nedsim.c @@ -99,13 +99,13 @@ void print_usage(char ** argv) { printf( "NED Simulator v%d (www.subgeniuskitty.com)\n" - "Usage: %s -f \n" + "Usage: %s -i [-s } [-t ] [-a
-p ]\n" " -h Help (prints this message)\n" - " -f Specify a binary image file to load in RAM.\n" + " -i Specify a binary image file to load in RAM.\n" " -s Frequency of simulated system clock.\n" " Allowable values are 1 <= clock <= 1,000,000,000.\n" " -t Saves a trace of JMP and BRZ syllables to file.\n" - " -i IP address of nedfp instance. Enables front panel output.\n" + " -a IP address of nedfp instance. Enables front panel output.\n" " -p Port of nedfp instance. Required when '-i' specified.\n" , VERSION, argv[0] ); @@ -702,9 +702,9 @@ main(int argc, char ** argv) char * fp_ip = NULL; char * fp_port = NULL; uint32_t fp_ram = 0x40000000; - while ((c = getopt(argc,argv,"hi:p:t:s:f:")) != -1) { + while ((c = getopt(argc,argv,"hi:p:t:s:a:")) != -1) { switch (c) { - case 'f': + case 'i': if ((input = fopen(optarg, "r")) == NULL) { fprintf(stderr, "ERROR: %s: %s\n", optarg, strerror(errno)); exit(EXIT_FAILURE); @@ -716,7 +716,7 @@ main(int argc, char ** argv) exit(EXIT_FAILURE); } break; - case 'i': + case 'a': // TODO: What do I want to consider valid input? fp_ip = optarg; break;