sysmon(4) messages

Valery Ushakov <[email protected]>
Newsgroups gmane.os.netbsd.devel.kernel
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.