diff options
author | Michael Sweet <michael.r.sweet@gmail.com> | 2017-06-16 17:33:21 -0400 |
---|---|---|
committer | Michael Sweet <michael.r.sweet@gmail.com> | 2017-06-16 17:33:21 -0400 |
commit | 62825d3445a090e1f73619c65732a7cdc8e7cb80 (patch) | |
tree | df6bb3d9387b76242c6023b043cfd06a02061e76 /systemv | |
parent | a537431a13268b645c9e9e3dd0cd7842bb3f6fc4 (diff) | |
download | cups-62825d3445a090e1f73619c65732a7cdc8e7cb80.tar.gz |
Add queue type and printer-uri to long "lpstat -e" output.
Diffstat (limited to 'systemv')
-rw-r--r-- | systemv/lpstat.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/systemv/lpstat.c b/systemv/lpstat.c index 901cbefcb..cda457173 100644 --- a/systemv/lpstat.c +++ b/systemv/lpstat.c @@ -255,7 +255,18 @@ main(int argc, /* I - Number of command-line arguments */ fputs(dest->name, stdout); if (long_status) - printf(" %s\n", cupsGetOption("device-uri", dest->num_options, dest->options)); + { + const char *printer_uri_supported = cupsGetOption("printer-uri-supported", dest->num_options, dest->options); + const char *printer_is_temporary = cupsGetOption("printer-is-temporary", dest->num_options, dest->options); + const char *type = "network"; + + if (printer_is_temporary && !strcmp(printer_is_temporary, "true")) + type = "temporary"; + else if (printer_uri_supported) + type = "permanent"; + + printf(" %s %s %s\n", type, printer_uri_supported ? printer_uri_supported : "none", cupsGetOption("device-uri", dest->num_options, dest->options)); + } else putchar('\n'); } |