From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Zeuthen Date: Fri, 02 Jan 2009 16:17:35 +0000 Subject: Re: [PATCH] libudev: device - add devtype support Message-Id: <1230913055.26677.2.camel@localhost.localdomain> List-Id: References: <1230866522.14544.4.camel@californication> In-Reply-To: <1230866522.14544.4.camel@californication> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org On Fri, 2009-01-02 at 09:22 +0100, Marcel Holtmann wrote: > Hi Kay, >=20 > > > I was playing a little bit with libudev and I actually need the DEVTY= PE > > > from uevent for various tasks. Especially with USB and Bluetooth, the > > > subsystem value is too generic. > > > > > > Attached is a patch that implements udev_device_get_devtype() and also > > > udev_device_get_parent_with_devtype(). Please double check that I did= it > > > the right way. > >=20 > > Looks good. Applied. >=20 > one minor thing that came to my mind is that DEVTYPE and subsystem are > actually kinda coupled. So a DEVTYPE=3D"host" has a different semantic for > USB than for Bluetooth subsystem for example. Not sure if we actually > care or just add a udev_device_get_parent_with_subsystem_devtype() > function to give applications a choice if they wanna care. Isn't DEVTYPE in the environment already? If so, just use the new API added here http://git.kernel.org/?p=3Dlinux/hotplug/udev.git;a=3Dcommit;h=F089350234e3= 9b868a5e3df71a8f8c036aaae4fd instead of Marcel's patch? David