tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

sysmon(4) messages



I test-booted netbsd on an old laptop and got

  acpibat1: state changed on 'charge state' to 'CRITICAL'

which took me a bit of time to parse ("uhm, state changed on state?
*sounds of modem handshake*...").


I gather, it's meant to say

  $dev: state changed on '$sensor' to '$state'

sys/dev/sysmon/sysmon_power.c:866

  case PENVSYS_EVENT_STATE_CHANGED:
          printf("%s: state changed on '%s' to '%s'\n",
              pes->pes_dvname, pes->pes_sensname,
              pes->pes_statedesc);


Would it make more sense to change this to either

  $dev: $sensor changed to $state

and hope for the best (at least now there are no extra nouns that come
from the message template), or make things verbose and very explicit
with something like

  $dev: sensor '$sensor' changed state to '$state'

Thoughts?

-uwe


Home | Main Index | Thread Index | Old Index