Bladeren bron

Missing support for --exec

Added missing support for option --exec / -e
Mateusz Bugdalski 13 jaren geleden
bovenliggende
commit
eaafc56a10
1 gewijzigde bestanden met toevoegingen van 2 en 1 verwijderingen
  1. 2 1
      main.c

+ 2 - 1
main.c

@@ -9,6 +9,7 @@ struct option sprog_options[] = {
   {"port", required_argument, NULL, 'p'},
   {"family", required_argument, NULL, 'f'},
   {"baud", required_argument, NULL, 'b'},
+  {"exec", required_argument, NULL, 'e'},
   {"version", no_argument, NULL, 'v'},
   {"help", no_argument, NULL, 'h'},
   {NULL, 0, NULL, 0}
@@ -30,7 +31,7 @@ int main(int argc, char *argv[]) {
   path[0] = 0;
   fam = NULL;
   
-  while((opt = getopt_long(argc, argv, "p:b:f:h", sprog_options, &option_index))!=-1) {
+  while((opt = getopt_long(argc, argv, "p:b:f:e:h", sprog_options, &option_index))!=-1) {
     switch(opt) {
       case 'p':
 	strncpy(port, optarg, sizeof(port));