On Sat, Dec 01, 2018 at 08:01:00AM +0100, Martijn van Duren wrote:
> On 12/1/18 1:44 AM, Klemens Nanni wrote:
> > # ./obj/apmd -dt -1
> > apmd: too small seconds: -1
> > # ./obj/apmd -dt 0
> > apmd: too small seconds: 0
This looks odd, seconds aren't too big or too small.
> If you change the -t case to errc like the rest OK martijn@
I'm not sure the EINVAL error string adds valuable information. I would
prefer if all these used variants of the idiom suggested in the strtonum
manual, something like:
errx("number of seconds is %s: %s", errstr, optarg);
errx("battery percentage is %s: %s", errstr, optarg);