Subject: kern/36673: dubious code in sysmon_envsys
To: None <email@example.com, firstname.lastname@example.org,>
From: None <email@example.com>
Date: 07/21/2007 11:35:00
>Synopsis: dubious code is sysmon_envsys
>Arrival-Date: Sat Jul 21 11:35:00 +0000 2007
>Originator: YAMAMOTO Takashi <firstname.lastname@example.org>
>Release: NetBSD 4.99.24
- sme_register_sensorname doesn't need to handle EMPTY case specially.
- sme_make_dictionary should fully set up a dictionary before
adding it to the array. (instead of leaving a partial dictionary
same for sysmon_envsys_createplist and its array.
- ENVSYS_FDUPDESC seems broken for compat ioctls.
- what global mutexes like sme_mtx protect is not clear.
- 'obj' argument of sme_sensor_upstring (and similar functions)
- '--sme->sme_nsensors' in sme_update_dictionary seems quite dubious.
- sysmon_envsys_createplist seems to ignore most errors
unless it was for the last sensor in sme_sensor_data.
i don't understand why the last one is special.