summaryrefslogtreecommitdiff
path: root/usr/src/cmd/print/bsd-sysv-commands/lpstat.c
diff options
context:
space:
mode:
authorjacobs <none@none>2007-04-18 21:01:55 -0700
committerjacobs <none@none>2007-04-18 21:01:55 -0700
commit022ba35cdbb5905f91897d5ebec60427a5bc8a16 (patch)
tree8092642c10eb6a35206d588cc788944d37fc3c84 /usr/src/cmd/print/bsd-sysv-commands/lpstat.c
parent7941757c1241fe30e30f921910595c8ac6af9ef1 (diff)
downloadillumos-joyent-022ba35cdbb5905f91897d5ebec60427a5bc8a16.tar.gz
6526418 netpr dumps core when protocol is tcp and port number is missing
6530757 creating print queue with lexmarks print driver
Diffstat (limited to 'usr/src/cmd/print/bsd-sysv-commands/lpstat.c')
-rw-r--r--usr/src/cmd/print/bsd-sysv-commands/lpstat.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/usr/src/cmd/print/bsd-sysv-commands/lpstat.c b/usr/src/cmd/print/bsd-sysv-commands/lpstat.c
index 4d0b350fd4..803ddfa6b6 100644
--- a/usr/src/cmd/print/bsd-sysv-commands/lpstat.c
+++ b/usr/src/cmd/print/bsd-sysv-commands/lpstat.c
@@ -20,7 +20,7 @@
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
*/
@@ -533,10 +533,14 @@ printer_query(char *name, int (*report)(papi_service_t, char *, papi_printer_t,
status = papiServiceCreate(&svc, name, NULL, NULL, cli_auth_callback,
encryption, NULL);
if (status != PAPI_OK) {
- fprintf(stderr, gettext(
- "Failed to contact service for %s: %s\n"),
- name ? name : "(NULL)",
- verbose_papi_message(svc, status));
+ if (status == PAPI_NOT_FOUND)
+ fprintf(stderr, gettext("%s: unknown printer\n"),
+ name ? name : "(NULL)");
+ else
+ fprintf(stderr, gettext(
+ "Failed to contact service for %s: %s\n"),
+ name ? name : "(NULL)",
+ verbose_papi_message(svc, status));
papiServiceDestroy(svc);
return (-1);
}