Patch for wonky SCO OpenServer lpstat -v output

Matthew Emmerton matt at
Sun Oct 1 06:50:55 GMT 2000

[ I'm not on the list so please cc me on any discussions ]

I just got fed up with SCO's VisionFS product and downloaded the latest
samba and installed it.  (I've used Samba on FreeBSD for some time now, and
wonder why I didn't do it sooner on SCO.)

Due to general wierdness with SCO, 'lpstat -v' provides extraneous output
during printer enumeration, which the following patch fixes.  Note that I've
tested this on OpenServer 5.0.x *only*, and supposedly the #ifdefs I've used
to wrap the code are only defined on OSR5.

If there are any questions/concerns, please email me directly.

Here is the patch.

--- source/printing/print_svid.c.orig   Sat Sep 30 17:00:14 2000
+++ source/printing/print_svid.c        Sun Oct  1 02:40:12 2000
@@ -56,6 +56,11 @@
                        printer_t *ptmp;
                        char *name, *tmp;

+#ifdef _SCO_DS /* Defined for SCO OpenServer 5.0.x */
+                       /* skip line if it contains "is remote printer" */
+                       if ((tmp = strstr(buf, "is remote printer")) !=
+                               continue;
                        /* eat "system/device for " */
                        if (((tmp = strchr(buf, ' ')) == NULL) ||
                            ((tmp = strchr(++tmp, ' ')) == NULL))

Matthew Emmerton
GSI Computer Services
+1 (800) 217 5409 (Canada)

More information about the samba-technical mailing list