diff --git a/README.txt b/README.txt index 45c5e0e..fc4b43b 100644 --- a/README.txt +++ b/README.txt @@ -1,11 +1,11 @@ ###################### - brightlight v6 + brightlight v7 ###################### Overview ======== -This is brightlight, version v6. brightlight is a program that can get and +This is brightlight, version v7. brightlight is a program that can get and set the screen backlight brightness on Linux systems using the kernel sysfs interface. I wrote this program because the backlight keys on my laptop's keyboard didn't work after I installed Linux on it, and the bash script I was @@ -94,6 +94,7 @@ v3, 31/07/2016 - Tidied up program logic and internals, added build system. v4, 08/01/2017 - Minor changes to fix bugs found by clang static analyzer. v5, 21/10/2017 - Tweak to the Makefile, contributed by Igor Gnatenko. v6, 25/07/2018 - From-scratch rewrite, relicence under an ISC licence. +v7, 08/10/2018 - Bugfix release. License ======= diff --git a/brightlight.c b/brightlight.c index 3d08c2c..02587cf 100644 --- a/brightlight.c +++ b/brightlight.c @@ -36,7 +36,7 @@ #include #define PROGNAM "brightlight" -#define PROGVER 6 +#define PROGVER 7 #define DEFAULT_CTRL_DIR "/sys/class/backlight/intel_backlight" #define MAXBRIGHT "max_brightness" @@ -228,8 +228,7 @@ int main(int argc, char *argv[]) { numarg = optarg; break; case '?': - /* getopt_long has printed an error message */ - exit(1); + errx(1, "invalid option: '%c'", optopt); break; default: errx(1, "error parsing options");