Date: Fri, 29 Nov 2002 11:53:27 -0500 (EST) From: Mathew Kanner <mat@cnd.mcgill.ca> To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/45838: libusbhid needs small patch to report name right Message-ID: <200211291653.gATGrRp3060173@cnd184.cnd.mcgill.ca>
next in thread | raw e-mail | index | archive | help
>Number: 45838 >Category: bin >Synopsis: libusbhid needs small patch to report name right >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Nov 29 09:00:02 PST 2002 >Closed-Date: >Last-Modified: >Originator: Mathew Kanner >Release: FreeBSD 4.7-RELEASE i386 >Organization: The Centre for Nonlinear Dynamics in Physiology and Medicine >Environment: System: FreeBSD cnd184.cnd.mcgill.ca 4.7-RELEASE FreeBSD 4.7-RELEASE #0: Thu Nov 7 13:08:56 EST 2002 mat@cnd184.cnd.mcgill.ca:/usr/src/sys/compile/CND47 i386 >Description: Small patch taken from NetBSD so that libusbhid can report and find buttons and so forth that need formating in the name. usbhidctl reports things like ...Button_%d 1, without it, and Button_1 with the patch. This is needed so that I can use usbaction from NetBSD and control my sound card from my usb wignman :) >How-To-Repeat: Don't do anything and use usbhictl -a on a Joystick >Fix: --- /home/mat/usage.c Fri Nov 29 11:42:36 2002 +++ lib/libusbhid/usage.c Fri Nov 29 11:44:12 2002 @@ -185,8 +185,9 @@ for (j = 0; j < pages[k].pagesize; j++) { us = pages[k].page_contents[j].usage; if (us == -1) { - sprintf(b, "%s %d", - pages[k].page_contents[j].name, i); + sprintf(b, + fmtcheck(pages[k].page_contents[j].name, "%d"), + i); return b; } if (us == i) >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200211291653.gATGrRp3060173>