summaryrefslogtreecommitdiff
path: root/usr/src/cmd/print/bsd-sysv-commands
diff options
context:
space:
mode:
authorsonam gupta - Sun Microsystems - Bangalore India <Sonam.Gupta@Sun.COM>2010-04-22 19:22:14 +0530
committersonam gupta - Sun Microsystems - Bangalore India <Sonam.Gupta@Sun.COM>2010-04-22 19:22:14 +0530
commitb6c573b6170aa329dfd387cc19f32a7919c4ff4c (patch)
tree1449d66913cfea64f53614950e4c56d6b349728f /usr/src/cmd/print/bsd-sysv-commands
parent392e836b07e8da771953e4d64233b2abe4393efe (diff)
downloadillumos-gate-b6c573b6170aa329dfd387cc19f32a7919c4ff4c.tar.gz
6928330 cancel(1) does not print localized message if destination or request-id were specified.
Diffstat (limited to 'usr/src/cmd/print/bsd-sysv-commands')
-rw-r--r--usr/src/cmd/print/bsd-sysv-commands/cancel.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/usr/src/cmd/print/bsd-sysv-commands/cancel.c b/usr/src/cmd/print/bsd-sysv-commands/cancel.c
index aaa48ffa7d..23359d9b5e 100644
--- a/usr/src/cmd/print/bsd-sysv-commands/cancel.c
+++ b/usr/src/cmd/print/bsd-sysv-commands/cancel.c
@@ -20,8 +20,7 @@
*/
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
+ * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
*
*/
@@ -150,9 +149,9 @@ main(int ac, char *av[])
NULL, cli_auth_callback, encryption, NULL);
}
if (status != PAPI_OK) {
- fprintf(stderr,
- gettext("Failed to contact service for %s:"
- " %s\n"), printer,
+ fprintf(stderr, gettext(
+ "Failed to contact service for %s: %s\n"),
+ printer,
verbose_papi_message(svc, status));
exit(1);
}
@@ -164,7 +163,7 @@ main(int ac, char *av[])
#define OUT ((status == PAPI_OK) ? stdout : stderr)
if (id != -1) { /* it's a job */
- char *mesg = "cancelled";
+ char *mesg = gettext("cancelled");
/*
* Check if the job-id is job-id-requested
@@ -179,15 +178,17 @@ main(int ac, char *av[])
* not found
*/
exit_code = 1;
- fprintf(OUT, "%s-%d: not-found\n", printer, id);
+ fprintf(OUT, "%s-%d: %s\n",
+ printer, id, gettext("not-found"));
} else {
status = papiJobCancel(svc, printer, rid);
if (status == PAPI_NOT_AUTHORIZED) {
mesg = papiStatusString(status);
exit_code = 1;
} else if (status != PAPI_OK) {
- mesg =
- verbose_papi_message(svc, status);
+ mesg = gettext(
+ verbose_papi_message(
+ svc, status));
exit_code = 1;
}
fprintf(OUT, "%s-%d: %s\n", printer, id, mesg);
@@ -209,7 +210,7 @@ main(int ac, char *av[])
}
if (jobs != NULL && *jobs != NULL) {
- char *mesg = "cancelled";
+ char *mesg = gettext("cancelled");
id = papiJobGetId(*jobs);
status = papiJobCancel(svc,
@@ -219,8 +220,9 @@ main(int ac, char *av[])
mesg = papiStatusString(status);
exit_code = 1;
} else if (status != PAPI_OK) {
- mesg = verbose_papi_message(
- svc, status);
+ mesg = gettext(
+ verbose_papi_message(
+ svc, status));
exit_code = 1;
}
/*