Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Jan 2010 09:44:51 GMT
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 172838 for review
Message-ID:  <201001090944.o099ip05032444@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/chv.cgi?CH=172838

Change 172838 by hselasky@hselasky_laptop001 on 2010/01/09 09:44:46

	
	usbconfig:
	  - Print some error codes and usage to stderr instead of stdout.

Affected files ...

.. //depot/projects/usb/src/usr.sbin/usbconfig/usbconfig.c#20 edit

Differences ...

==== //depot/projects/usb/src/usr.sbin/usbconfig/usbconfig.c#20 (text+ko) ====

@@ -175,7 +175,7 @@
 
 	error = libusb20_be_remove_dev_quirk(pbe, &q);
 	if (error) {
-		printf("Removing quirk '%s' failed, continuing.\n", str);
+		fprintf(stderr, "Removing quirk '%s' failed, continuing.\n", str);
 	}
 	return;
 }
@@ -198,7 +198,7 @@
 
 	error = libusb20_be_add_dev_quirk(pbe, &q);
 	if (error) {
-		printf("Adding quirk '%s' failed, continuing.\n", str);
+		fprintf(stderr, "Adding quirk '%s' failed, continuing.\n", str);
 	}
 	return;
 }
@@ -257,7 +257,7 @@
 static void
 duplicate_option(const char *ptr)
 {
-	printf("Syntax error: "
+	fprintf(stderr, "Syntax error: "
 	    "Duplicate option: '%s'\n", ptr);
 	exit(1);
 }
@@ -265,7 +265,7 @@
 static void
 usage(void)
 {
-	printf(""
+	fprintf(stderr, ""
 	    "usbconfig - configure the USB subsystem" "\n"
 	    "usage: usbconfig -u <busnum> -a <devaddr> -i <ifaceindex> [cmds...]" "\n"
 	    "usage: usbconfig -d [ugen]<busnum>.<devaddr> -i <ifaceindex> [cmds...]" "\n"
@@ -349,7 +349,7 @@
 	if (opt->got_set_template) {
 		opt->got_any--;
 		if (libusb20_be_set_template(pbe, opt->template)) {
-			printf("Setting USB template %u failed, "
+			fprintf(stderr, "Setting USB template %u failed, "
 			    "continuing.\n", opt->template);
 		}
 	}



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