Re: [PATCH 10/10] USB: add missing fields to interface uevents

Alan Stern <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
On Fri, 24 Aug 2007, Greg KH wrote:

> On Fri, Aug 24, 2007 at 03:43:05PM -0400, Alan Stern wrote:
> > This patch (as982) adds DEVICE, PRODUCT, and TYPE fields to the
> > environment list for USB-interface uevents.  This fixes a regression
> > with respect to the user interface in earlier versions of the kernel.
> > 
> > Signed-off-by: Alan Stern <[email protected]>
> > CC: Kay Sievers <[email protected]>
> > 
> > ---
> > 
> > Kay's patch did this for 2.6.22, but nobody has written the equivalent 
> > for 2.6.23 -- so here it is.  Unlike all the previous patches in this 
> > series, this one should go into 2.6.23 since it affects the userspace 
> > interface.
> 
> Huh?  I thought I already sent this kind of fix to Linus yesterday.
> Kay's patch was for both trees.

Things are in constant flux.  In 2.6.22 and 2.6.23-current, the uevent
calls look like this:

	if (add_uevent_var(envp, num_envp, &i,
			   buffer, buffer_size, &length,
			   "DEVICE=/proc/bus/usb/%03d/%03d",
			   usb_dev->bus->busnum, usb_dev->devnum))

But in gregkh-all they look like this:

	if (add_uevent_var(env, "DEVICE=/proc/bus/usb/%03d/%03d",
			   usb_dev->bus->busnum, usb_dev->devnum))

That is, env is now a struct kobj_uevent_env * instead of a char **.  
My patch was against gregkh-all.

Maybe you have already reconciled Kay's patch with these other changes;
in that case my patch has the advantage of collecting the common
environment variables into a single subroutine.  Do whatever you think 
is best.

Alan Stern


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.