summaryrefslogtreecommitdiff
path: root/usr/src/cmd/print
diff options
context:
space:
mode:
authorsonam gupta - Sun Microsystems - Bangalore India <Sonam.Gupta@Sun.COM>2010-04-08 02:10:21 +0530
committersonam gupta - Sun Microsystems - Bangalore India <Sonam.Gupta@Sun.COM>2010-04-08 02:10:21 +0530
commit324104aba6acecc130e7091bab730d52f37d5a9c (patch)
tree884d585ab8be5b343a8875f5cef10f9259963729 /usr/src/cmd/print
parent6e5580c92a7a7c64dd50b768bda246808fb1ee17 (diff)
downloadillumos-gate-324104aba6acecc130e7091bab730d52f37d5a9c.tar.gz
6919673 Job can be resumed by using spool file number even though there is not such a job number
Diffstat (limited to 'usr/src/cmd/print')
-rw-r--r--usr/src/cmd/print/bsd-sysv-commands/lp.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/usr/src/cmd/print/bsd-sysv-commands/lp.c b/usr/src/cmd/print/bsd-sysv-commands/lp.c
index 5ea497141e..5c8b877ca4 100644
--- a/usr/src/cmd/print/bsd-sysv-commands/lp.c
+++ b/usr/src/cmd/print/bsd-sysv-commands/lp.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.
*
*/
@@ -285,13 +284,18 @@ main(int ac, char *av[])
if (((silent == 0) || (dump != 0)) &&
((list = papiJobGetAttributeList(job)) != NULL)) {
- int32_t id = 0;
+ int32_t id = -1;
if (printer == NULL)
papiAttributeListGetString(list, NULL,
"printer-name", &printer);
- papiAttributeListGetInteger(list, NULL, "job-id", &id);
+ papiAttributeListGetInteger(list, NULL,
+ "job-id-requested", &id);
+ if (id == -1) {
+ papiAttributeListGetInteger(list, NULL, "job-id", &id);
+ }
+
printf(gettext("request id is %s-%d "), printer, id);
if (ac != optind)
printf("(%d file(s))\n", ac - optind);