CVSROOT:        /cvs
Module name:    src
Changes by:     k...@cvs.openbsd.org    2021/04/06 14:30:32

Modified files:
        usr.sbin/apmd  : apm-proto.h apmd.c apmsubr.c 
        usr.sbin/apm   : apm.c 

Log message:
Make apm(8) report apmd(8) failure

apm(8) never got the result of the requested power action carried out by
apmd(8), so apm(4) errors got silently discarded;  for example, zzz(8)
would merely print "Suspending system..." and exit zero on platforms
lacking suspend/resume support.

Enrich reply messages from apmd to apm with an error field containing the
failed ioctl(2)'s errno if need be.

Hoist apmd's power action dispatch into handle_client() so it can write the
error in the first place before replying.

OK dv

Reply via email to