Subject: Re: kern/36660: envsys sensor names are not unique
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: netbsd-bugs
Date: 07/21/2007 10:50:02
The following reply was made to PR kern/36660; it has been noted by GNATS.
From: yamt@mwd.biglobe.ne.jp (YAMAMOTO Takashi)
To: juan@xtrarom.org
Cc: gnats-bugs@NetBSD.org
Subject: Re: kern/36660: envsys sensor names are not unique
Date: Sat, 21 Jul 2007 19:45:33 +0900 (JST)
> On Thu, 19 Jul 2007 07:10:03 +0000 (UTC)
> yamt@mwd.biglobe.ne.jp (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.
you asked what i meant, so i explained.
> And envstat requires to use -d with -s, so the restriction only needs
> to be per device.
really? "envstat -s Temp" without -d seems working.
> > 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.
don't you agree that identifiers and descriptions should be separated?
> You can find this sensor looking at its index (edata->sensor).
is it usable with the new interface?
YAMAMOTO Takashi
>
> --
> Juan Romero Pardines - The NetBSD Project
> http://plog.xtrarom.org - NetBSD/pkgsrc news in Spanish