pmf(9), but they are mutually exclusive (apm(4) vs apmdev(4)).
Express pmf(9) hooks in terms of dopowerhooks(9) hook - the reverse
would be more natural, but pmf hook signature is hidden behind
PMF_FN_ARGS/PMF_FN_CALL, so just go the least intrusive way for now.
Unfortunately dev/apm/files.apm and dev/hpc/apm/files.apm cannot be
included both at the same time (they define same options and config(1)
complains), so you need to comment out old code and uncomment new code
to be able to replace "apmdev0 at hpcapm0" with "apm0 at hpcapm0" in
your kernel config.
Bring over remaining bits of logic not picked up in the first round.
Main semantic difference between the two that ramins is now basically
powerhooks vs. pmf.
Cosmetics to reduce diff noise: split apmattach into apmdevattach and
apm_attach, where the latter matches its counterpart in the real
apm.c. Change local macros names from APMDEV* to APM*
Now that apmdev.c is demonstrably congruent to apm.c it should be
easier to switch hpc* and zaurus ports to apm.c from apmdev.c.
apmdev.c is one of the only two remaining drivers that call
dopowerhooks(9), the other one being arch/arm/xscale/pxa2x0_apm.c.
Ideally I would prefer for them to be interchangeable to smooth the
transition (in pmf world order *all* devices must have pmf hooks
registered), but they are attached differently - apmdev is separate
from its backend device (like hpcapm), while apm.c backends are
attachment glue, not separate devices.
- Add a lot of missing selinit() and seldestroy() calls.
- Merge selwakeup() and selnotify() calls into a single selnotify().
- Add an additional 'events' argument to selnotify() call. It will
indicate which event (POLL_IN, POLL_OUT, etc) happen. If unknown,
zero may be used.
Note: please pass appropriate value of 'events' where possible.
Proposed on: <tech-kern>
Patch by Slava Semushin <slava.semushin@gmail.com>
Again, this was tested by comparing obj files from a pristine and a patched
source tree against an i386/ALL kernel, and also for src/sbin/fsck_ffs,
src/sbin/fsdb and src/usr.sbin/makefs. Only changes in assert() line numbers
were detected in 'objdump -d' output.
Change the keycodes in the keymaps that are currently using the OFF button
to -1 so that they will still operate the same way (i.e. do nothing).
No objection on port-hpcsh & port-hpcmips.