Re: [lsusb PATCH] Verbose flag in tree mode shows vendor and product name.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



My apologies for the line-wrapping - Gmail is crap for sending this
stuff :-( I'll try mailing it through something else.

I'll fix up this patch ASAP. Thanks for the tips!

-Dafydd

On Fri, May 13, 2011 at 4:46 PM, Greg KH <greg@xxxxxxxxx> wrote:
> On Fri, May 13, 2011 at 03:37:44PM -0600, Dafydd Crosby wrote:
>> Verbose flag in tree mode shows vendor and product name.
>> When running `lsusb -tv`, devices should have the vendor and
>> product name appended to the row.
>>
>> ÂSigned-off-by: Dafydd Crosby <dtcrsby@xxxxxxxxx>
>>
>> ---
>> Âdevtree.c | Â 47 ++++++++++++++++++++++++++++++++++++++++-------
>> Âdevtree.h | Â Â2 +-
>> Âlsusb.c  |  Â2 +-
>> Â3 files changed, 42 insertions(+), 9 deletions(-)
>>
>> diff --git a/devtree.c b/devtree.c
>> index 69c93ac..12faeca 100644
>> --- a/devtree.c
>> +++ b/devtree.c
>> @@ -58,6 +58,30 @@ static void freebus(struct usbbusnode *bus)
>>
>> Â/* ---------------------------------------------------------------------- */
>>
>> +static int get_vendor_string(char *buf, size_t size, u_int16_t vid)
>> +{
>> + Â Â Â Âconst char *cp;
>> +
>
> You forgot to use tabs here and in the other new functions you created :(
>
>> + Â Â Â Âif (size < 1)
>> + Â Â Â Â Â Â Â Âreturn 0;
>> + Â Â Â Â*buf = 0;
>> + Â Â Â Âif (!(cp = names_vendor(vid)))
>> + Â Â Â Â Â Â Â Âreturn 0;
>> + Â Â Â Âreturn snprintf(buf, size, "%s", cp);
>> +}
>> +
>> +static int get_product_string(char *buf, size_t size, u_int16_t vid,
>> u_int16_t pid)
>
> Patch is line-wrapped :(
>
> Anyway, I hand edited these things, and applied the patch, but now get a
> bunch of build warnings that were not there prior to your patch:
>
> devtree.c: In function âget_vendor_stringâ:
> devtree.c:68:2: warning: implicit declaration of function ânames_vendorâ
> devtree.c:68:2: warning: nested extern declaration of ânames_vendorâ
> devtree.c:68:11: warning: assignment makes pointer from integer without a cast
> devtree.c: In function âget_product_stringâ:
> devtree.c:80:2: warning: implicit declaration of function ânames_productâ
> devtree.c:80:2: warning: nested extern declaration of ânames_productâ
> devtree.c:80:11: warning: assignment makes pointer from integer without a cast
>
> Please redo this patch so it builds clean, and actually works.
>
> thanks,
>
> greg k-h
>



-- 
http://dafyddcrosby.com - my programming blog
http://lonesomecosmonaut.com - my fun blog
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux