diff options
author | jacobs <none@none> | 2008-05-27 14:53:29 -0700 |
---|---|---|
committer | jacobs <none@none> | 2008-05-27 14:53:29 -0700 |
commit | 43b9c05035ac59f7f7a8e7827598db5a15f30ed3 (patch) | |
tree | 56acec6855e6d9ed3f7770900436aec472d430eb /usr/src/cmd/print/bsd-sysv-commands/lp.c | |
parent | cdfc78ad277d82b1080e7c86213063d1b73e7789 (diff) | |
download | illumos-joyent-43b9c05035ac59f7f7a8e7827598db5a15f30ed3.tar.gz |
6698648 127127/127128-11 break lp -P
6698649 127127/127128-11 break lp -H hold
6698650 127127/127128-11 break lp -q
6704910 S10_u5 printing not properly parsing options
6705311 Can not give privilege to change properties for snmp
Diffstat (limited to 'usr/src/cmd/print/bsd-sysv-commands/lp.c')
-rw-r--r-- | usr/src/cmd/print/bsd-sysv-commands/lp.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/usr/src/cmd/print/bsd-sysv-commands/lp.c b/usr/src/cmd/print/bsd-sysv-commands/lp.c index 5abe7ae7e8..aeec532e54 100644 --- a/usr/src/cmd/print/bsd-sysv-commands/lp.c +++ b/usr/src/cmd/print/bsd-sysv-commands/lp.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * */ @@ -89,22 +89,22 @@ main(int ac, char *av[]) papiAttributeListAddString(&list, PAPI_ATTR_EXCL, "job-hold-until", "indefinite"); - else if (strcasecmp(optarg, "release") == 0) + else if (strcasecmp(optarg, "immediate") == 0) papiAttributeListAddString(&list, PAPI_ATTR_EXCL, "job-hold-until", "no-hold"); - else if (strcasecmp(optarg, "immediate") == 0) - papiAttributeListAddInteger(&list, - PAPI_ATTR_EXCL, - "job-priority", 100); else papiAttributeListAddString(&list, PAPI_ATTR_EXCL, "job-hold-until", optarg); break; - case 'P': /* page list */ - papiAttributeListAddString(&list, PAPI_ATTR_EXCL, - "page-ranges", optarg); + case 'P': { /* page list */ + char buf[BUFSIZ]; + + snprintf(buf, sizeof (buf), "page-ranges=%s", optarg); + papiAttributeListFromString(&list, + PAPI_ATTR_EXCL, buf); + } break; case 'S': /* charset */ papiAttributeListAddString(&list, PAPI_ATTR_EXCL, @@ -156,14 +156,14 @@ main(int ac, char *av[]) case 'q': { /* priority */ int i = atoi(optarg); - i = 99 * (39 - i) / 39 + 1; + i = 100 - (i * 2.5); if ((i < 1) || (i > 100)) { fprintf(stderr, gettext( "priority must be between 0 and 39.\n")); exit(1); } papiAttributeListAddInteger(&list, PAPI_ATTR_EXCL, - "priority", i); + "job-priority", i); } break; case 'r': /* "raw" mode */ |