CHANGES IN CUPS V1.5b1
+ - The lpadmin command now allows the cupsIPPSupplies and
+ cupsSNMPSupplies keywords to be set in a PPD file (STR #3825)
- Moving a held job no longer releases it (STR #3839)
- Restored support for GNU TLS and OpenSSL with threading enabled
(STR #3605)
.\" which should have been included with this file. If this file is
.\" file is missing or damaged, see the license at "http://www.cups.org/".
.\"
-.TH lpadmin 8 "CUPS" "7 January 2011" "Apple Inc."
+.TH lpadmin 8 "CUPS" "10 May 2011" "Apple Inc."
.SH NAME
lpadmin \- configure cups printers and classes
.SH SYNOPSIS
\fImodel\fR directory or using one of the driver interfaces. Use the \fI-m\fR
option with the \fIlpinfo(8)\fR command to get a list of supported models.
.TP 5
+-o cupsIPPSupplies=true
+.TP 5
+-o cupsIPPSupplies=false
+.br
+Specifies whether IPP supply level values should be reported.
+.TP 5
+-o cupsSNMPSupplies=true
+.TP 5
+-o cupsSNMPSupplies=false
+.br
+Specifies whether SNMP supply level (RFC 3805) values should be reported.
+.TP 5
-o job-k-limit=value
.br
Sets the kilobyte limit for per-user quotas. The value is an
.TP 5
-o printer-error-policy=name
.br
-Sets the error policy to be used when the printer backend is
-unable to send the job to the printer. The name must be one of
+Sets the error policy to be used when the printer backend is
+unable to send the job to the printer. The name must be one of
"abort-job", "retry-job", "retry-current-job", or "stop-printer". The default
error policy is "stop-printer" for printers and "retry-current-job" for
classes.
cups_file_t *in, /* PPD file */
*out; /* Temporary file */
const char *protocol, /* Old protocol option */
- *customval; /* Custom option value */
+ *customval, /* Custom option value */
+ *boolval; /* Boolean value */
+ int wrote_ipp_supplies = 0, /* Wrote cupsIPPSupplies keyword? */
+ wrote_snmp_supplies = 0;/* Wrote cupsSNMPSupplies keyword? */
DEBUG_printf(("set_printer_options(http=%p, printer=\"%s\", num_options=%d, "
while (cupsFileGets(in, line, sizeof(line)))
{
- if (strncmp(line, "*Default", 8))
+ if (!strncmp(line, "*cupsIPPSupplies:", 17) &&
+ (boolval = cupsGetOption("cupsIPPSupplies", num_options,
+ options)) != NULL)
+ {
+ wrote_ipp_supplies = 1;
+ cupsFilePrintf(out, "*cupsIPPSupplies: %s\n",
+ (!strcasecmp(boolval, "true") ||
+ !strcasecmp(boolval, "yes") ||
+ !strcasecmp(boolval, "on")) ? "True" : "False");
+ }
+ else if (!strncmp(line, "*cupsSNMPSupplies:", 18) &&
+ (boolval = cupsGetOption("cupsSNMPSupplies", num_options,
+ options)) != NULL)
+ {
+ wrote_snmp_supplies = 1;
+ cupsFilePrintf(out, "*cupsSNMPSupplies: %s\n",
+ (!strcasecmp(boolval, "true") ||
+ !strcasecmp(boolval, "yes") ||
+ !strcasecmp(boolval, "on")) ? "True" : "False");
+ }
+ else if (strncmp(line, "*Default", 8))
cupsFilePrintf(out, "%s\n", line);
else
{
}
}
+ if (!wrote_ipp_supplies &&
+ (boolval = cupsGetOption("cupsIPPSupplies", num_options,
+ options)) != NULL)
+ {
+ cupsFilePrintf(out, "*cupsIPPSupplies: %s\n",
+ (!strcasecmp(boolval, "true") ||
+ !strcasecmp(boolval, "yes") ||
+ !strcasecmp(boolval, "on")) ? "True" : "False");
+ }
+
+ if (!wrote_snmp_supplies &&
+ (boolval = cupsGetOption("cupsSNMPSupplies", num_options,
+ options)) != NULL)
+ {
+ cupsFilePrintf(out, "*cupsSNMPSupplies: %s\n",
+ (!strcasecmp(boolval, "true") ||
+ !strcasecmp(boolval, "yes") ||
+ !strcasecmp(boolval, "on")) ? "True" : "False");
+ }
+
cupsFileClose(in);
cupsFileClose(out);
ppdClose(ppd);
/* Begin PBXFileReference section */
270CCDA7135E3C9E00007BE2 /* testmime */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testmime; sourceTree = BUILT_PRODUCTS_DIR; };
270CCDBB135E3D3E00007BE2 /* testmime.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testmime.c; path = ../scheduler/testmime.c; sourceTree = "<group>"; };
+ 2732E089137A3F5200FAFEF6 /* cancel.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = cancel.c; path = ../systemv/cancel.c; sourceTree = "<group>"; };
+ 2732E08A137A3F5200FAFEF6 /* cupsaccept.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = cupsaccept.c; path = ../systemv/cupsaccept.c; sourceTree = "<group>"; };
+ 2732E08B137A3F5200FAFEF6 /* cupstestdsc.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = cupstestdsc.c; path = ../systemv/cupstestdsc.c; sourceTree = "<group>"; };
+ 2732E08C137A3F5200FAFEF6 /* lp.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = lp.c; path = ../systemv/lp.c; sourceTree = "<group>"; };
+ 2732E08D137A3F5200FAFEF6 /* lpadmin.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = lpadmin.c; path = ../systemv/lpadmin.c; sourceTree = "<group>"; };
+ 2732E08E137A3F5200FAFEF6 /* lpinfo.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = lpinfo.c; path = ../systemv/lpinfo.c; sourceTree = "<group>"; };
+ 2732E08F137A3F5200FAFEF6 /* lpmove.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = lpmove.c; path = ../systemv/lpmove.c; sourceTree = "<group>"; };
+ 2732E090137A3F5200FAFEF6 /* lpoptions.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = lpoptions.c; path = ../systemv/lpoptions.c; sourceTree = "<group>"; };
+ 2732E091137A3F5200FAFEF6 /* lppasswd.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = lppasswd.c; path = ../systemv/lppasswd.c; sourceTree = "<group>"; };
+ 2732E092137A3F5200FAFEF6 /* lpstat.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = lpstat.c; path = ../systemv/lpstat.c; sourceTree = "<group>"; };
273BF6BD1333B5000022CAAB /* testcups */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testcups; sourceTree = BUILT_PRODUCTS_DIR; };
273BF6C61333B5370022CAAB /* testcups.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testcups.c; path = ../cups/testcups.c; sourceTree = "<group>"; };
273BF6CB1333B5950022CAAB /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreFoundation.framework; sourceTree = DEVELOPER_DIR; };
274FF67313333B0A00317ECB /* commands */ = {
isa = PBXGroup;
children = (
+ 2732E089137A3F5200FAFEF6 /* cancel.c */,
+ 2732E08A137A3F5200FAFEF6 /* cupsaccept.c */,
276684101337FA7C000D33D0 /* cupsaddsmb.c */,
276683681337AA00000D33D0 /* cupsctl.c */,
274FF68713333B6E00317ECB /* cupsfilter.c */,
+ 2732E08B137A3F5200FAFEF6 /* cupstestdsc.c */,
72F75A5B1336F988004BB496 /* cupstestppd.c */,
726AD701135E8A90002C930D /* ippserver.c */,
276683F91337F7A9000D33D0 /* ipptool.c */,
+ 2732E08C137A3F5200FAFEF6 /* lp.c */,
+ 2732E08D137A3F5200FAFEF6 /* lpadmin.c */,
+ 2732E08E137A3F5200FAFEF6 /* lpinfo.c */,
+ 2732E08F137A3F5200FAFEF6 /* lpmove.c */,
+ 2732E090137A3F5200FAFEF6 /* lpoptions.c */,
+ 2732E091137A3F5200FAFEF6 /* lppasswd.c */,
+ 2732E092137A3F5200FAFEF6 /* lpstat.c */,
);
name = commands;
sourceTree = "<group>";