summaryrefslogtreecommitdiff
path: root/usr/src/cmd/print/bsd-sysv-commands/disable.c
diff options
context:
space:
mode:
authorGowtham Thommandra <Gowtham.Thommandra@Sun.COM>2009-04-16 12:29:02 +0530
committerGowtham Thommandra <Gowtham.Thommandra@Sun.COM>2009-04-16 12:29:02 +0530
commit98f04078d5fc5800e80b21e0b18abe0024af1cbe (patch)
treecc0a3ec30ce5dfe5d659364868690b9a43366c5b /usr/src/cmd/print/bsd-sysv-commands/disable.c
parentc3c82186300a3bf11cfdda43b1cca3cd6b333629 (diff)
downloadillumos-joyent-98f04078d5fc5800e80b21e0b18abe0024af1cbe.tar.gz
6739383 print commands accept, reject, disable enable don't report status after execution.
Diffstat (limited to 'usr/src/cmd/print/bsd-sysv-commands/disable.c')
-rw-r--r--usr/src/cmd/print/bsd-sysv-commands/disable.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/usr/src/cmd/print/bsd-sysv-commands/disable.c b/usr/src/cmd/print/bsd-sysv-commands/disable.c
index d57abe5728..95f6dbd230 100644
--- a/usr/src/cmd/print/bsd-sysv-commands/disable.c
+++ b/usr/src/cmd/print/bsd-sysv-commands/disable.c
@@ -132,7 +132,15 @@ main(int ac, char *av[])
}
status = papiPrinterDisable(svc, printer, reason);
- if (status != PAPI_OK) {
+ if (status == PAPI_OK) {
+ printf(gettext("printer \"%s\" now disabled\n"),
+ printer);
+ } else if (status == PAPI_NOT_ACCEPTING) {
+ fprintf(stderr, gettext(
+ "Destination \"%s\" was already disabled.\n"),
+ printer);
+ exit_status = 1;
+ } else {
fprintf(stderr, gettext("disable: %s: %s\n"), printer,
verbose_papi_message(svc, status));
exit_status = 1;