diff options
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/testprns.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/source3/utils/testprns.c b/source3/utils/testprns.c index 7e52b86afb..1525ab11d0 100644 --- a/source3/utils/testprns.c +++ b/source3/utils/testprns.c @@ -32,14 +32,17 @@ #include "includes.h" +/* + * NOTE: this code is likely to be removed, and no longer supports + * checking against non-configured printcap files. -Rob + */ + int main(int argc, char *argv[]) { - const char *pszTemp; - setup_logging(argv[0],True); - if (argc < 2 || argc > 3) - printf("Usage: testprns printername [printcapfile]\n"); + if (argc != 2) + printf("Usage: testprns printername\n"); else { dbf = x_fopen("test.log", O_WRONLY|O_CREAT|O_TRUNC, 0644); @@ -47,10 +50,9 @@ int main(int argc, char *argv[]) printf("Unable to open logfile.\n"); } else { DEBUGLEVEL = 3; - pszTemp = (argc < 3) ? PRINTCAP_NAME : argv[2]; - printf("Looking for printer %s in printcap file %s\n", - argv[1], pszTemp); - if (!pcap_printername_ok(argv[1], pszTemp)) + printf("Looking for printer %s\n", argv[1]); + load_printers(); + if (!pcap_printername_ok(argv[1])) printf("Printer name %s is not valid.\n", argv[1]); else printf("Printer name %s is valid.\n", argv[1]); |