Index: head/usr.bin/backlight/backlight.8 =================================================================== --- head/usr.bin/backlight/backlight.8 +++ head/usr.bin/backlight/backlight.8 @@ -22,7 +22,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 02, 2020 +.Dd October 06, 2020 .Dt BACKLIGHT 8 .Os .Sh NAME @@ -63,6 +63,7 @@ Query information about the backlight (name, type). .It Ar value Set the brightness level to this value, must be between 0 and 100. +A trailing '%' is valid. .It Ar incr | + .Op Ar value Decrement the backlight level. Index: head/usr.bin/backlight/backlight.c =================================================================== --- head/usr.bin/backlight/backlight.c +++ head/usr.bin/backlight/backlight.c @@ -144,6 +144,9 @@ action = BACKLIGHT_SET_BRIGHTNESS; if (argc == 1) { + /* ignore a trailing % for user friendlyness */ + if (argv[0][strlen(argv[0]) - 1] == '%') + argv[0][strlen(argv[0]) - 1] = '\0'; percent = strtonum(argv[0], 0, 100, &percent_error); if (percent_error) errx(1, "Cannot parse brightness level %s: %s",