NetBSD/usr.sbin
xtraeme 1b3709ecde Add a new sensor type to sysmon_envsys(9): ENVSYS_GSTRING.
ENVSYS_GSTRING (aka Generic String) uses the genstr member in
the envsys_data_t struct to add a generic string that envstat(8)
will show as value or state.

It's like the ENVSYS_DRIVER, but doesn't use value_cur. Below
is the dictionary created on these sensors:

<dict>
	<key>description</key>
	<string>acpibat0 charge state</string>
	<key>generic-state-string</key>
	<string>NORMAL</string>
	<key>monitoring-supported</key>
	<false/>
	<key>state</key>
	<string>valid</string>
	<key>type</key>
	<string>Generic string</string>
</dict>

Note that it's limited to 32 chars, but we can grow it if needed.

envstat(8) will print ENVSYS_GSTRING sensors as:

$ envstat -dacpibat0 -s"acpibat0 charge state"
  acpibat0 charge state:     NORMAL
$
2007-09-02 19:36:59 +00:00
..
2007-01-14 12:30:24 +00:00
2007-07-29 14:34:45 +00:00
2007-07-29 14:34:45 +00:00
2006-10-22 20:54:38 +00:00
2007-08-09 18:50:58 +00:00
2006-06-17 04:58:14 +00:00
2006-12-18 20:11:10 +00:00
2007-03-02 20:48:50 +00:00
2007-03-05 04:56:48 +00:00
2007-06-24 23:25:13 +00:00
2006-08-09 11:57:51 +00:00
2007-01-16 17:32:04 +00:00
2007-07-11 04:59:19 +00:00
2007-06-24 16:56:48 +00:00
2007-07-29 13:17:38 +00:00
2007-07-17 21:50:07 +00:00
2007-01-16 17:32:04 +00:00
2007-01-16 17:32:04 +00:00
2007-07-17 22:00:46 +00:00
2007-03-10 01:16:17 +00:00
2006-05-25 03:17:43 +00:00
2007-01-16 17:32:04 +00:00
2007-06-24 16:56:48 +00:00
2007-07-20 18:58:14 +00:00
2007-07-24 12:01:00 +00:00
2007-07-29 14:37:25 +00:00
2006-06-24 21:04:48 +00:00