Subject: Re: kern/36660: envsys sensor names are not unique
To: None <,,>
From: Juan RP <>
List: netbsd-bugs
Date: 07/19/2007 09:35:02
The following reply was made to PR kern/36660; it has been noted by GNATS.

From: Juan RP <>
Cc: (YAMAMOTO Takashi)
Subject: Re: kern/36660: envsys sensor names are not unique
Date: Thu, 19 Jul 2007 11:33:05 +0200

 On Thu, 19 Jul 2007 07:10:03 +0000 (UTC) (YAMAMOTO Takashi) wrote:
 >  it should be unique enough so that an sensor can be specified
 > unambiguously. isn't "envstat -s foo" ambiguous if there are two sensors
 > called "foo" in a system, even if they belong to different devices?
 It's unique enough already... please see latest code.
 And envstat requires to use -d with -s, so the restriction only needs
 to be per device.
 >  keeping user-defined descriptions in kernel is a bad idea in the first
 > place. 
 >  besides, because they are used as identifiers as well (it's a bad design
 > IMO), changing them just for user's preference is rather confusing than
 > useful. do you have a way to know what your sensor with name "foo"
 > actually was? 
 When the description is changed, edata->desc is also changed. I don't see
 how you need to know its previous description.
 You can find this sensor looking at its index (edata->sensor).
 Juan Romero Pardines	- The NetBSD Project	- NetBSD/pkgsrc news in Spanish