Subject: Re: kern/36673: dubious code in sysmon_envsys
To: None <,,>
From: Juan RP <>
List: netbsd-bugs
Date: 07/21/2007 15:35:02
The following reply was made to PR kern/36673; it has been noted by GNATS.

From: Juan RP <>
Subject: Re: kern/36673: dubious code in sysmon_envsys
Date: Sat, 21 Jul 2007 17:33:02 +0200

 On Sat, 21 Jul 2007 11:35:00 +0000 (UTC) wrote:
 Ok, I've made a few changes... let's see what's missing now.
 > 	- 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 on errors.)
 > 	 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.
 I believe they are used ok, correct me if I'm wrong.
 > 	- 'obj' argument of sme_sensor_upstring (and similar
 > functions) is useless.
 > 	- '--sme->sme_nsensors' in sme_update_dictionary seems quite
 > dubious.
 This is the only one that I'm not sure why you are complaining, it
 works ok... do you know any other way to skip sensors with duplicate
 > 	- 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.
 It returns the error if there's any now.
 Juan Romero Pardines 	- The NetBSD Project 	- NetBSD/pkgsrc news in Spanish