From 7030b751433637977163233f3e79fadd338bd92b Mon Sep 17 00:00:00 2001 From: mike Date: Fri, 18 Jan 2002 16:48:01 +0000 Subject: [PATCH] Show device filenames on error. git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.2@2047 7a7537e8-13f0-0310-91df-b6672ffda945 --- backend/parallel.c | 7 ++++--- backend/serial.c | 7 ++++--- backend/usb.c | 7 ++++--- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/backend/parallel.c b/backend/parallel.c index dc60a2f58c..4ca57a7549 100644 --- a/backend/parallel.c +++ b/backend/parallel.c @@ -1,5 +1,5 @@ /* - * "$Id: parallel.c,v 1.29.2.2 2002/01/02 18:04:18 mike Exp $" + * "$Id: parallel.c,v 1.29.2.3 2002/01/18 16:48:00 mike Exp $" * * Parallel port backend for the Common UNIX Printing System (CUPS). * @@ -178,7 +178,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */ } else { - perror("ERROR: Unable to open parallel port device file"); + fprintf(stderr, "ERROR: Unable to open parallel port device file \"%s\": %s\n", + resource, strerror(errno)); return (1); } } @@ -634,5 +635,5 @@ list_devices(void) /* - * End of "$Id: parallel.c,v 1.29.2.2 2002/01/02 18:04:18 mike Exp $". + * End of "$Id: parallel.c,v 1.29.2.3 2002/01/18 16:48:00 mike Exp $". */ diff --git a/backend/serial.c b/backend/serial.c index e03f9e97a1..44c333c50f 100644 --- a/backend/serial.c +++ b/backend/serial.c @@ -1,5 +1,5 @@ /* - * "$Id: serial.c,v 1.32.2.3 2002/01/02 18:04:18 mike Exp $" + * "$Id: serial.c,v 1.32.2.4 2002/01/18 16:48:01 mike Exp $" * * Serial port backend for the Common UNIX Printing System (CUPS). * @@ -199,7 +199,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */ } else { - perror("ERROR: Unable to open serial port device file"); + fprintf(stderr, "ERROR: Unable to open serial port device file \"%s\": %s\n", + resource, strerror(errno)); return (1); } } @@ -862,5 +863,5 @@ list_devices(void) /* - * End of "$Id: serial.c,v 1.32.2.3 2002/01/02 18:04:18 mike Exp $". + * End of "$Id: serial.c,v 1.32.2.4 2002/01/18 16:48:01 mike Exp $". */ diff --git a/backend/usb.c b/backend/usb.c index 71e1a318d1..3e8b518d05 100644 --- a/backend/usb.c +++ b/backend/usb.c @@ -1,5 +1,5 @@ /* - * "$Id: usb.c,v 1.18.2.2 2002/01/02 18:04:18 mike Exp $" + * "$Id: usb.c,v 1.18.2.3 2002/01/18 16:48:01 mike Exp $" * * USB port backend for the Common UNIX Printing System (CUPS). * @@ -167,7 +167,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */ } else { - perror("ERROR: Unable to open USB port device file"); + fprintf(stderr, "ERROR: Unable to open USB port device file \"%s\": %s\n", + resource, strerror(errno)); return (1); } } @@ -445,5 +446,5 @@ list_devices(void) /* - * End of "$Id: usb.c,v 1.18.2.2 2002/01/02 18:04:18 mike Exp $". + * End of "$Id: usb.c,v 1.18.2.3 2002/01/18 16:48:01 mike Exp $". */ -- 2.47.2