Source-Changes archive

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

CVS commit: src



Module Name:    src
Committed By:   xtraeme
Date:           Sun Sep  2 19:37:00 UTC 2007

Modified Files:
        src/sys/dev/sysmon: sysmon_envsys.c
        src/sys/sys: envsys.h
        src/usr.sbin/envstat: envstat.c

Log Message:
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
$


To generate a diff of this commit:
cvs rdiff -r1.53 -r1.54 src/sys/dev/sysmon/sysmon_envsys.c
cvs rdiff -r1.14 -r1.15 src/sys/sys/envsys.h
cvs rdiff -r1.43 -r1.44 src/usr.sbin/envstat/envstat.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index