Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Jan 2004 00:20:30 -0800 (PST)
From:      Michael Haro <mharo@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        mharo@FreeBSD.org
Subject:   bin/61234: usbhidaction doesn't support using an alternate table file
Message-ID:  <200401120820.i0C8KU7U024045@burrito.bitsurf.net>
Resent-Message-ID: <200401120830.i0C8U6fx061856@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         61234
>Category:       bin
>Synopsis:       usbhidaction doesn't support using an alternate table file
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 12 00:30:06 PST 2004
>Closed-Date:
>Last-Modified:
>Originator:     Michael Haro
>Release:        FreeBSD 5.1-RELEASE-p10 i386
>Organization:
>Environment:
System: FreeBSD burrito.bitsurf.net 5.1-RELEASE-p10 FreeBSD 5.1-RELEASE-p10 #2: Sat Oct 4 21:04:37 PDT 2003 root@burrito.bitsurf.net:/usr/obj/usr/src/sys/BURRITO i386


	
>Description:
usbhidctl supports an alternate table file, so should usbhidaction.

>How-To-Repeat:

>Fix:

Index: usbhidaction.c
===================================================================
RCS file: /home/ncvs/src/usr.bin/usbhidaction/usbhidaction.c,v
retrieving revision 1.3
diff -u -r1.3 usbhidaction.c
--- usbhidaction.c	10 Apr 2003 08:06:56 -0000	1.3
+++ usbhidaction.c	12 Jan 2004 08:17:16 -0000
@@ -100,11 +100,12 @@
 	char devnamebuf[PATH_MAX];
 	struct command *cmd;
 	int reportid;
+	char *table = 0;
 
 	demon = 1;
 	ignore = 0;
 	dieearly = 0;
-	while ((ch = getopt(argc, argv, "c:def:ip:v")) != -1) {
+	while ((ch = getopt(argc, argv, "c:def:ip:t:v")) != -1) {
 		switch(ch) {
 		case 'c':
 			conf = optarg;
@@ -124,6 +125,9 @@
 		case 'p':
 			pidfile = optarg;
 			break;
+		case 't':
+			table = optarg;
+			break;
 		case 'v':
 			demon = 0;
 			verbose++;
@@ -139,7 +143,7 @@
 	if (conf == NULL || dev == NULL)
 		usage();
 
-	hid_init(NULL);
+	hid_init(table);
 
 	if (dev[0] != '/') {
 		snprintf(devnamebuf, sizeof(devnamebuf), "/dev/%s%s",
@@ -241,7 +245,7 @@
 usage(void)
 {
 
-	fprintf(stderr, "Usage: %s [-deiv] -c config_file -f hid_dev "
+	fprintf(stderr, "Usage: %s [-deiv] [-t tablefile] -c config_file -f hid_dev "
 		"[-p pidfile]\n", getprogname());
 	exit(1);
 }

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200401120820.i0C8KU7U024045>