From 86a06bed757ecac4e7f37a439117bd51de6a1f5c Mon Sep 17 00:00:00 2001 From: Andrew Thompson Date: Sun, 10 Jan 2010 19:21:23 +0000 Subject: [PATCH] Print error messages to stderr. Submitted by: Hans Petter Selasky --- usr.sbin/usbconfig/usbconfig.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/usr.sbin/usbconfig/usbconfig.c b/usr.sbin/usbconfig/usbconfig.c index fd701a7a8b05..2bd3668223bf 100644 --- a/usr.sbin/usbconfig/usbconfig.c +++ b/usr.sbin/usbconfig/usbconfig.c @@ -175,7 +175,7 @@ be_dev_remove_quirk(struct libusb20_backend *pbe, 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 @@ be_dev_add_quirk(struct libusb20_backend *pbe, 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 @@ get_int(const char *s) 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 @@ duplicate_option(const char *ptr) static void usage(void) { - printf("" + fprintf(stderr, "" "usbconfig - configure the USB subsystem" "\n" "usage: usbconfig -u -a -i [cmds...]" "\n" "usage: usbconfig -d [ugen]. -i [cmds...]" "\n" @@ -349,7 +349,7 @@ flush_command(struct libusb20_backend *pbe, struct options *opt) 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); } }