[Patch] linux: serial backend find too many ports

Bart Hartgers bart.hartgers at gmail.com
Thu Apr 13 07:00:47 PDT 2006


When called without arguments, the serial backend on linux lists all
potential serial ports instead of all present serial ports.

This happens because under Linux additional serial ports are configured using the device node. So this node needs to be present for any potential port, and serial finds it and lists it.

I fixed this by using an (Linux-specific) ioctl to check whether the serial port was configured, and if not, skip it. This only lists those configurable ports that are actually setup. Ports that do not
support the ioctl (i.e. are always configured/present) are listed as before.

Please (feel free to) apply!

Patch is against 1.2rc2 at
http://etpmod.phys.tue.nl/bart/cups-serial-backend-linux-12rc2.patch.gz




More information about the cups-devel mailing list