8 /* ieee1284.h uses HAVE_IEEE1284_H, so we undefine it */
15 #include "platform_specific.h"
18 int get_device_id(const int port, const char *device_file,
19 const int portnumber, char *device_id) {
21 struct parport_list parports;
24 char device_file1[256];
25 char device_file2[256];
26 @@ -41,6 +44,7 @@ int get_device_id(const int port, const
31 if (port == PARPORT ) {
32 /* check if we have appropiate permissions */
34 @@ -73,7 +77,9 @@ int get_device_id(const int port, const
36 return COULD_NOT_GET_DEVICE_ID;
38 - } else if (port == USB || port == CUSTOM_USB) {
41 + if (port == USB || port == CUSTOM_USB) {
44 sprintf(device_file1, "/dev/usb/lp%d", portnumber);
45 @@ -138,8 +144,10 @@ int open_printer_device(const int port,
47 sprintf(device_file1, "/dev/usb/lp%d", portnumber);
48 sprintf(device_file2, "/dev/usblp%d", portnumber);
50 } else if (port == PARPORT) {
51 sprintf(device_file1, "/dev/lp%d", portnumber);
53 } else if (port == CUSTOM_USB) {
54 strncpy(device_file1, device_file, 255);
55 device_file1[255] = '\0';