instead of depending on devd and its socket, try to use nlsysevent
instead. This makes powerd independant from devd.
Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 59807 Build 56692: arc lint + arc unit
Event Timeline
lgtm with only cosmetic issues.
BTW, I noticed that /etc/rc.d/powerd only indirectly depends on /etc/rc.d/devd (in that powerd requires DAEMON which requires NETWORKING which requires defaultroute which requires devd). Normally I would have said that this needs to be addressed, but this patch makes it unnecessary...
usr.sbin/powerd/powerd.c | ||
---|---|---|
31 | These should be sorted, unless there is a dependency between them. | |
100–101 | Is this just phab being weird or is there a tabs vs spaces issue here? (see also acline_init(), handle_sigs(), parse_mode()). | |
138 | You're missing <stdbool.h>, it's probably being pulled in by something else but it would be better to include it explicitly. | |
341 | double blank line | |
480 | I would prefer unsigned int here. | |
485 | This cast should not be needed unless the compiler is being weird. |
usr.sbin/powerd/powerd.c | ||
---|---|---|
100–101 | yes phab only |
about the rc script, powerd even before this patches can be started before devd, it has a retry mechanism to be able to connect to it once devd is up.