* getting device info from device node
@ 2002-06-04 22:13 Oliver Neukum
2002-06-04 22:19 ` Greg KH
2002-06-05 8:13 ` Oliver Neukum
0 siblings, 2 replies; 3+ messages in thread
From: Oliver Neukum @ 2002-06-04 22:13 UTC (permalink / raw)
To: linux-hotplug
Hi Greg,
I must disagree. The most basic thing about configuring
a device is identifying it. You must be able to tell what it is.
However I think I found a relatively clean way.
You can return a name from an ioctl().
You just can't return the one human readable name.
You can return a name which is unique and can only
be used while the device is still plugged in.
Regards
Oliver
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: getting device info from device node
2002-06-04 22:13 getting device info from device node Oliver Neukum
@ 2002-06-04 22:19 ` Greg KH
2002-06-05 8:13 ` Oliver Neukum
1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2002-06-04 22:19 UTC (permalink / raw)
To: linux-hotplug
On Wed, Jun 05, 2002 at 12:13:18AM +0200, Oliver Neukum wrote:
> Hi Greg,
>
> I must disagree. The most basic thing about configuring
> a device is identifying it. You must be able to tell what it is.
>
> However I think I found a relatively clean way.
> You can return a name from an ioctl().
> You just can't return the one human readable name.
> You can return a name which is unique and can only
> be used while the device is still plugged in.
Great, how does the kernel create this "name"?
thanks,
greg k-h
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: getting device info from device node
2002-06-04 22:13 getting device info from device node Oliver Neukum
2002-06-04 22:19 ` Greg KH
@ 2002-06-05 8:13 ` Oliver Neukum
1 sibling, 0 replies; 3+ messages in thread
From: Oliver Neukum @ 2002-06-05 8:13 UTC (permalink / raw)
To: linux-hotplug
Am Mittwoch, 5. Juni 2002 00:19 schrieben Sie:
> On Wed, Jun 05, 2002 at 12:13:18AM +0200, Oliver Neukum wrote:
> > Hi Greg,
> >
> > I must disagree. The most basic thing about configuring
> > a device is identifying it. You must be able to tell what it is.
> >
> > However I think I found a relatively clean way.
> > You can return a name from an ioctl().
> > You just can't return the one human readable name.
> > You can return a name which is unique and can only
> > be used while the device is still plugged in.
>
> Great, how does the kernel create this "name"?
I'd suggest a fixed prefix+pid+counter.
What it actually is doesn't matter if it's unique.
It's simply a directory with the files in it hard links
to the files in the persistent directory.
The trick is that we refuse to open files in it, if the
name has been invalidated by device removal.
I am not sure how much of the vfs locking we could use.
I am not Al Viro, that's why it didn't occur to me earlier.
Regards
Oliver
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-06-05 8:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-04 22:13 getting device info from device node Oliver Neukum
2002-06-04 22:19 ` Greg KH
2002-06-05 8:13 ` Oliver Neukum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).