~sircmpwn/powerctl

all: updates for for-each

Signed-off-by: Drew DeVault <sir@cmpwn.com>
update for hare stdlib changes
Fix build with Hare ^HEAD

Signed-off-by: Carlos Une <une@fastmail.fm>
Phony target unintall -> uninstall
Fix chmod permissions
Minor style improvement
sysfs: s/write_state/write_sysfs_file

Rename write_state() to write_sysfs_file() and use it everywhere.

Signed-off-by: Jose Lombera <jose@lombera.dev>
sysfs: reuse parsing logic in several places

Signed-off-by: Jose Lombera <jose@lombera.dev>
sysfs: use simple unbuffered writes

Signed-off-by: Jose Lombera <jose@lombera.dev>
Makefile: small enhancements

- powerctl is not a PHONY target.
- Add dependencies to targets powerctl and install.
- Add clean and uninstall targets.

Signed-off-by: Jose Lombera <jose@lombera.dev>
README: reference powerctl(8)

Signed-off-by: Jose Lombera <jose@lombera.dev>
checkgroup: fix error message
Makefile: set PREFIX to /usr/local by default
set_sleep_state: drop rt::sync

The kernel does this for us via /sys/power/sync_on_suspend.
sysfs: streamline buffer usage
set_sleep_state: rt::sync always succeeds
Makefile: specificy hare build output
checkgroup: simplify implementation

This also improves performance by avoiding repeated scans over
/etc/group
Implement set image size
Next