diff options
-rw-r--r-- | experimental/keyboard-leds-trayicons.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/experimental/keyboard-leds-trayicons.c b/experimental/keyboard-leds-trayicons.c index 9e32822..3dea691 100644 --- a/experimental/keyboard-leds-trayicons.c +++ b/experimental/keyboard-leds-trayicons.c @@ -654,7 +654,7 @@ typedef struct { } configuration; // this should be configurable with -c parameter (getopts?) -char* conffile = "NONE"; +char* conffile = "none"; int debug = 0; // slightly modified from example https://github.com/benhoyt/inih @@ -719,7 +719,7 @@ int fprint_usage(char **argv) { int main(int argc, char **argv) { - conffile = "/home/bgstack15/keyboard-leds-trayicons.conf"; + conffile = "none"; // Step 0: parse parameters int c; @@ -738,6 +738,8 @@ int main(int argc, char **argv) { fprintf(stderr, "Unknown option: %c\n", optopt); return 1; }; + // must reset this for the inner getopt/optint operations to proceed. This is somehow a globally-scoped variable. + optind = 0; // Step 1: load config configuration config; |