Re: apmd ignoring ENXIO on /dev/apmctl

2015-11-17 Thread Ted Unangst
Jan Stary wrote: > Upon startup, apmd(8) opens /dev/apmctl like this: > > if ((ctl_fd = open(fname, O_RDWR | O_CLOEXEC)) == -1) { > if (errno != ENXIO && errno != ENOENT) > error("cannot open device file `%s'", fname); > } > > Why is it that we

apmd ignoring ENXIO on /dev/apmctl

2015-11-17 Thread Jan Stary
Upon startup, apmd(8) opens /dev/apmctl like this: if ((ctl_fd = open(fname, O_RDWR | O_CLOEXEC)) == -1) { if (errno != ENXIO && errno != ENOENT) error("cannot open device file `%s'", fname); } Why is it that we ignore ENXIO and ENOENT