diff options
Diffstat (limited to 'usr/src/cmd/print/bsd-sysv-commands')
-rw-r--r-- | usr/src/cmd/print/bsd-sysv-commands/accept.c | 12 | ||||
-rw-r--r-- | usr/src/cmd/print/bsd-sysv-commands/disable.c | 11 | ||||
-rw-r--r-- | usr/src/cmd/print/bsd-sysv-commands/enable.c | 10 | ||||
-rw-r--r-- | usr/src/cmd/print/bsd-sysv-commands/reject.c | 10 |
4 files changed, 34 insertions, 9 deletions
diff --git a/usr/src/cmd/print/bsd-sysv-commands/accept.c b/usr/src/cmd/print/bsd-sysv-commands/accept.c index 903d7728ba..74f392c9c3 100644 --- a/usr/src/cmd/print/bsd-sysv-commands/accept.c +++ b/usr/src/cmd/print/bsd-sysv-commands/accept.c @@ -1,3 +1,4 @@ + /* * CDDL HEADER START * @@ -99,9 +100,14 @@ main(int ac, char *av[]) "accepting requests.\n"), printer); exit_status = 1; } else { - fprintf(stderr, gettext("accept: %s: %s\n"), printer, - verbose_papi_message(svc, status)); - exit_status = 1; + if (status == PAPI_OPERATION_NOT_SUPPORTED) { + fprintf(stderr, + verbose_papi_message(svc, status)); + } else { + fprintf(stderr, gettext("accept: %s: %s\n"), + printer, verbose_papi_message(svc, status)); + exit_status = 1; + } } papiServiceDestroy(svc); diff --git a/usr/src/cmd/print/bsd-sysv-commands/disable.c b/usr/src/cmd/print/bsd-sysv-commands/disable.c index 95f6dbd230..0b3cb71f0c 100644 --- a/usr/src/cmd/print/bsd-sysv-commands/disable.c +++ b/usr/src/cmd/print/bsd-sysv-commands/disable.c @@ -1,3 +1,4 @@ + /* * CDDL HEADER START * @@ -141,8 +142,14 @@ main(int ac, char *av[]) printer); exit_status = 1; } else { - fprintf(stderr, gettext("disable: %s: %s\n"), printer, - verbose_papi_message(svc, status)); + /* The operation is not supported in lpd protocol */ + if (status == PAPI_OPERATION_NOT_SUPPORTED) { + fprintf(stderr, + verbose_papi_message(svc, status)); + } else { + fprintf(stderr, gettext("disable: %s: %s\n"), + printer, verbose_papi_message(svc, status)); + } exit_status = 1; } diff --git a/usr/src/cmd/print/bsd-sysv-commands/enable.c b/usr/src/cmd/print/bsd-sysv-commands/enable.c index f67ace102c..c197337e1e 100644 --- a/usr/src/cmd/print/bsd-sysv-commands/enable.c +++ b/usr/src/cmd/print/bsd-sysv-commands/enable.c @@ -99,8 +99,14 @@ main(int ac, char *av[]) printer); exit_status = 1; } else { - fprintf(stderr, gettext("enable: %s: %s\n"), printer, - verbose_papi_message(svc, status)); + /* The operation is not supported in lpd protocol */ + if (status == PAPI_OPERATION_NOT_SUPPORTED) { + fprintf(stderr, + verbose_papi_message(svc, status)); + } else { + fprintf(stderr, gettext("enable: %s: %s\n"), + printer, verbose_papi_message(svc, status)); + } exit_status = 1; } diff --git a/usr/src/cmd/print/bsd-sysv-commands/reject.c b/usr/src/cmd/print/bsd-sysv-commands/reject.c index 777172f2fa..2952bafba6 100644 --- a/usr/src/cmd/print/bsd-sysv-commands/reject.c +++ b/usr/src/cmd/print/bsd-sysv-commands/reject.c @@ -104,8 +104,14 @@ main(int ac, char *av[]) "accepting requests.\n"), printer); exit_status = 1; } else { - fprintf(stderr, gettext("reject: %s: %s\n"), printer, - verbose_papi_message(svc, status)); + /* The operation is not supported in lpd protocol */ + if (status == PAPI_OPERATION_NOT_SUPPORTED) { + fprintf(stderr, + verbose_papi_message(svc, status)); + } else { + fprintf(stderr, gettext("reject: %s: %s\n"), + printer, verbose_papi_message(svc, status)); + } exit_status = 1; } |