>> = David Brownell
> = Greg KH
> > dev_t dev; /* major/minor */
>
> Eeek! No, don't do that! That will be going away in 2.5 :)
It's April 3, not April 1 ... ;)
I heard the idea was "typedef u32 dev_t;" and then to have
fun making that namespace couple sanely to /dev/filenames.
> I've been thinking about this for a while, and I don't think that we
> need to export anything else to userspace right now. If you want to do
> something like this it can work today in at least 2 different ways:
A third: have drivers invoke "/sbin/hotplug printer" as they
claim major/minor device numbers. I suspect that USB and
parallel printers might not share much code there (not that they
need to, with call_usermodehelper so simple).
> - using devfs
> - get the notification of a device change, which starts
> the user daemon to configure the specified printer.
This is specific to printers, for USB ... or do other devices
now export through devfs as well as usbdevfs?
Easy enough to make "devfsd" invoke "/sbin/hotplug printer".
That might be a good way to prototype things, for folk who
prefer to work with devfsd (and /devfs).
> - watching the usb/devices file or tree for a change in a user
> space program
> - it sees that something has changed, it's a printer,
> and now it configures it properly. A little mess with
> the proper device id doing this, but it is possible
Plus the option I sketched, the ioctl: just do this through
the /etc/hotplug/usb.agent extension mechanisms. That
approach has the advantage that it doesn't force use of
any of the device filesystems, and can keep working no
matter which ways those evolve over the 2.5 cycle.
> Personally I like the devfs method for system wide things, like
> configuring printers.
Or hotplugging ... why run /devfs and devfsd when the kernel can
tell you that stuff directly, and more cheaply? :)
> And the userspace program works well for things
> like Visor and Palm syncing on device insertion where you don't want to
> be running as root :)
Heh ... I just wrote up some basic stuff about hotsyncing PTP cameras:
http://jphoto.sourceforge.net/?selected=sync
Someone who was working on pilot sync suggested that approach.
It uses hotplugging AND a pure usermode driver ... :)
- Dave
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
http://lists.sourceforge.net/lists/listinfo/linux-usb-devel