]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | /* |
75bd9771 | 2 | * "$Id: usb-unix.c 7687 2008-06-24 01:28:36Z mike $" |
ef416fc2 | 3 | * |
4 | * USB port backend for the Common UNIX Printing System (CUPS). | |
5 | * | |
6 | * This file is included from "usb.c" when compiled on UNIX/Linux. | |
7 | * | |
75bd9771 | 8 | * Copyright 2007-2008 by Apple Inc. |
f7deaa1a | 9 | * Copyright 1997-2007 by Easy Software Products, all rights reserved. |
ef416fc2 | 10 | * |
11 | * These coded instructions, statements, and computer programs are the | |
bc44d920 | 12 | * property of Apple Inc. and are protected by Federal copyright |
13 | * law. Distribution and use rights are outlined in the file "LICENSE.txt" | |
ef416fc2 | 14 | * "LICENSE" which should have been included with this file. If this |
bc44d920 | 15 | * file is missing or damaged, see the license at "http://www.cups.org/". |
ef416fc2 | 16 | * |
17 | * This file is subject to the Apple OS-Developed Software exception. | |
18 | * | |
19 | * Contents: | |
20 | * | |
ed486911 | 21 | * print_device() - Print a file to a USB device. |
ef416fc2 | 22 | * list_devices() - List all USB devices. |
ed486911 | 23 | * open_device() - Open a USB device... |
f7deaa1a | 24 | * side_cb() - Handle side-channel requests... |
ef416fc2 | 25 | */ |
26 | ||
27 | /* | |
28 | * Include necessary headers. | |
29 | */ | |
30 | ||
ef416fc2 | 31 | #include <sys/select.h> |
32 | ||
33 | ||
34 | /* | |
35 | * Local functions... | |
36 | */ | |
37 | ||
f7deaa1a | 38 | static int open_device(const char *uri, int *use_bc); |
568fa3fa MS |
39 | static void side_cb(int print_fd, int device_fd, int snmp_fd, |
40 | http_addr_t *addr, int use_bc); | |
ef416fc2 | 41 | |
42 | ||
43 | /* | |
44 | * 'print_device()' - Print a file to a USB device. | |
45 | */ | |
46 | ||
47 | int /* O - Exit status */ | |
48 | print_device(const char *uri, /* I - Device URI */ | |
49 | const char *hostname, /* I - Hostname/manufacturer */ | |
50 | const char *resource, /* I - Resource/modelname */ | |
db1f069b | 51 | char *options, /* I - Device options/serial number */ |
ed486911 | 52 | int print_fd, /* I - File descriptor to print */ |
e53920b9 | 53 | int copies, /* I - Copies to print */ |
54 | int argc, /* I - Number of command-line arguments (6 or 7) */ | |
55 | char *argv[]) /* I - Command-line arguments */ | |
ef416fc2 | 56 | { |
ed486911 | 57 | int use_bc; /* Use backchannel path? */ |
58 | int device_fd; /* USB device */ | |
59 | size_t tbytes; /* Total number of bytes written */ | |
ef416fc2 | 60 | struct termios opts; /* Parallel port options */ |
ed486911 | 61 | |
ef416fc2 | 62 | |
e53920b9 | 63 | (void)argc; |
64 | (void)argv; | |
ef416fc2 | 65 | |
66 | /* | |
67 | * Open the USB port device... | |
68 | */ | |
69 | ||
757d2cad | 70 | fputs("STATE: +connecting-to-device\n", stderr); |
71 | ||
ef416fc2 | 72 | do |
73 | { | |
b94498cf | 74 | #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) |
323c5de1 | 75 | /* |
b94498cf | 76 | * *BSD's ulpt driver currently does not support the |
77 | * back-channel, incorrectly returns data ready on a select(), | |
78 | * and locks up on read()... | |
323c5de1 | 79 | */ |
80 | ||
81 | use_bc = 0; | |
82 | ||
83 | #else | |
8ca02f3c | 84 | /* |
f7deaa1a | 85 | * Disable backchannel data when printing to Brother, Canon, or |
86 | * Minolta USB printers - apparently these printers will return | |
87 | * the IEEE-1284 device ID over and over and over when they get | |
88 | * a read request... | |
8ca02f3c | 89 | */ |
90 | ||
f7deaa1a | 91 | use_bc = strcasecmp(hostname, "Brother") && |
92 | strcasecmp(hostname, "Canon") && | |
0a682745 MS |
93 | strncasecmp(hostname, "Konica", 6) && |
94 | strncasecmp(hostname, "Minolta", 7); | |
b94498cf | 95 | #endif /* __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __DragonFly__ */ |
8ca02f3c | 96 | |
97 | if ((device_fd = open_device(uri, &use_bc)) == -1) | |
ef416fc2 | 98 | { |
99 | if (getenv("CLASS") != NULL) | |
100 | { | |
101 | /* | |
102 | * If the CLASS environment variable is set, the job was submitted | |
103 | * to a class and not to a specific queue. In this case, we want | |
104 | * to abort immediately so that the job can be requeued on the next | |
105 | * available printer in the class. | |
106 | */ | |
107 | ||
db1f069b MS |
108 | _cupsLangPuts(stderr, |
109 | _("INFO: Unable to contact printer, queuing on next " | |
110 | "printer in class...\n")); | |
ef416fc2 | 111 | |
112 | /* | |
113 | * Sleep 5 seconds to keep the job from requeuing too rapidly... | |
114 | */ | |
115 | ||
116 | sleep(5); | |
117 | ||
118 | return (CUPS_BACKEND_FAILED); | |
119 | } | |
120 | ||
121 | if (errno == EBUSY) | |
122 | { | |
db1f069b MS |
123 | _cupsLangPuts(stderr, |
124 | _("INFO: Printer busy; will retry in 10 seconds...\n")); | |
c0e1af83 | 125 | sleep(10); |
ef416fc2 | 126 | } |
ed486911 | 127 | else if (errno == ENXIO || errno == EIO || errno == ENOENT || |
128 | errno == ENODEV) | |
ef416fc2 | 129 | { |
db1f069b MS |
130 | _cupsLangPuts(stderr, |
131 | _("INFO: Printer not connected; will retry in 30 " | |
132 | "seconds...\n")); | |
ef416fc2 | 133 | sleep(30); |
134 | } | |
135 | else | |
136 | { | |
db1f069b MS |
137 | _cupsLangPrintf(stderr, |
138 | _("ERROR: Unable to open device file \"%s\": %s\n"), | |
139 | resource, strerror(errno)); | |
ef416fc2 | 140 | return (CUPS_BACKEND_FAILED); |
141 | } | |
142 | } | |
143 | } | |
ed486911 | 144 | while (device_fd < 0); |
ef416fc2 | 145 | |
757d2cad | 146 | fputs("STATE: -connecting-to-device\n", stderr); |
147 | ||
ef416fc2 | 148 | /* |
149 | * Set any options provided... | |
150 | */ | |
151 | ||
ed486911 | 152 | tcgetattr(device_fd, &opts); |
ef416fc2 | 153 | |
154 | opts.c_lflag &= ~(ICANON | ECHO | ISIG); /* Raw mode */ | |
155 | ||
156 | /**** No options supported yet ****/ | |
157 | ||
ed486911 | 158 | tcsetattr(device_fd, TCSANOW, &opts); |
ef416fc2 | 159 | |
ef416fc2 | 160 | /* |
161 | * Finally, send the print file... | |
162 | */ | |
163 | ||
ed486911 | 164 | tbytes = 0; |
ef416fc2 | 165 | |
ed486911 | 166 | while (copies > 0 && tbytes >= 0) |
ef416fc2 | 167 | { |
168 | copies --; | |
169 | ||
ed486911 | 170 | if (print_fd != 0) |
ef416fc2 | 171 | { |
172 | fputs("PAGE: 1 1\n", stderr); | |
ed486911 | 173 | lseek(print_fd, 0, SEEK_SET); |
ef416fc2 | 174 | } |
175 | ||
568fa3fa | 176 | tbytes = backendRunLoop(print_fd, device_fd, -1, NULL, use_bc, side_cb); |
ef416fc2 | 177 | |
ed486911 | 178 | if (print_fd != 0 && tbytes >= 0) |
db1f069b | 179 | _cupsLangPrintf(stderr, |
c0e1af83 | 180 | #ifdef HAVE_LONG_LONG |
db1f069b | 181 | _("INFO: Sent print file, %lld bytes...\n"), |
c0e1af83 | 182 | #else |
db1f069b | 183 | _("INFO: Sent print file, %ld bytes...\n"), |
c0e1af83 | 184 | #endif /* HAVE_LONG_LONG */ |
db1f069b | 185 | CUPS_LLCAST tbytes); |
ef416fc2 | 186 | } |
187 | ||
188 | /* | |
189 | * Close the USB port and return... | |
190 | */ | |
191 | ||
ed486911 | 192 | close(device_fd); |
ef416fc2 | 193 | |
ed486911 | 194 | return (tbytes < 0 ? CUPS_BACKEND_FAILED : CUPS_BACKEND_OK); |
ef416fc2 | 195 | } |
196 | ||
197 | ||
198 | /* | |
199 | * 'list_devices()' - List all USB devices. | |
200 | */ | |
201 | ||
202 | void | |
203 | list_devices(void) | |
204 | { | |
205 | #ifdef __linux | |
2abf387c | 206 | int i; /* Looping var */ |
207 | int fd; /* File descriptor */ | |
208 | char device[255], /* Device filename */ | |
209 | device_id[1024], /* Device ID string */ | |
210 | device_uri[1024], /* Device URI string */ | |
211 | make_model[1024]; /* Make and model */ | |
ef416fc2 | 212 | |
213 | /* | |
2abf387c | 214 | * Try to open each USB device... |
ef416fc2 | 215 | */ |
216 | ||
217 | for (i = 0; i < 16; i ++) | |
218 | { | |
2abf387c | 219 | /* |
220 | * Linux has a long history of changing the standard filenames used | |
221 | * for USB printer devices. We get the honor of trying them all... | |
222 | */ | |
ef416fc2 | 223 | |
2abf387c | 224 | sprintf(device, "/dev/usblp%d", i); |
225 | ||
226 | if ((fd = open(device, O_RDWR | O_EXCL)) < 0) | |
ef416fc2 | 227 | { |
2abf387c | 228 | if (errno != ENOENT) |
229 | continue; | |
ef416fc2 | 230 | |
2abf387c | 231 | sprintf(device, "/dev/usb/lp%d", i); |
232 | ||
233 | if ((fd = open(device, O_RDWR | O_EXCL)) < 0) | |
234 | { | |
235 | if (errno != ENOENT) | |
236 | continue; | |
237 | ||
238 | sprintf(device, "/dev/usb/usblp%d", i); | |
239 | ||
240 | if ((fd = open(device, O_RDWR | O_EXCL)) < 0) | |
241 | continue; | |
242 | } | |
ef416fc2 | 243 | } |
2abf387c | 244 | |
245 | if (!backendGetDeviceID(fd, device_id, sizeof(device_id), | |
246 | make_model, sizeof(make_model), | |
247 | "usb", device_uri, sizeof(device_uri))) | |
248 | printf("direct %s \"%s\" \"%s USB #%d\" \"%s\"\n", device_uri, | |
249 | make_model, make_model, i + 1, device_id); | |
250 | ||
251 | close(fd); | |
ef416fc2 | 252 | } |
253 | #elif defined(__sgi) | |
254 | #elif defined(__sun) && defined(ECPPIOC_GETDEVID) | |
255 | int i; /* Looping var */ | |
256 | int fd; /* File descriptor */ | |
257 | char device[255], /* Device filename */ | |
258 | device_id[1024], /* Device ID string */ | |
259 | device_uri[1024], /* Device URI string */ | |
260 | make_model[1024]; /* Make and model */ | |
ef416fc2 | 261 | |
262 | ||
263 | /* | |
264 | * Open each USB device... | |
265 | */ | |
266 | ||
267 | for (i = 0; i < 8; i ++) | |
268 | { | |
269 | sprintf(device, "/dev/usb/printer%d", i); | |
270 | ||
8ca02f3c | 271 | if ((fd = open(device, O_WRONLY | O_EXCL)) >= 0) |
ef416fc2 | 272 | { |
ed486911 | 273 | if (!backendGetDeviceID(fd, device_id, sizeof(device_id), |
274 | make_model, sizeof(make_model), | |
275 | "usb", device_uri, sizeof(device_uri))) | |
ef416fc2 | 276 | printf("direct %s \"%s\" \"%s USB #%d\" \"%s\"\n", device_uri, |
277 | make_model, make_model, i + 1, device_id); | |
278 | ||
279 | close(fd); | |
280 | } | |
281 | } | |
282 | #elif defined(__hpux) | |
283 | #elif defined(__osf) | |
2e4ff8af | 284 | #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__) |
ef416fc2 | 285 | int i; /* Looping var */ |
286 | char device[255]; /* Device filename */ | |
287 | ||
288 | ||
289 | for (i = 0; i < 8; i ++) | |
290 | { | |
291 | sprintf(device, "/dev/ulpt%d", i); | |
292 | if (!access(device, 0)) | |
293 | printf("direct usb:%s \"Unknown\" \"USB Printer #%d\"\n", device, i + 1); | |
294 | ||
295 | sprintf(device, "/dev/unlpt%d", i); | |
296 | if (!access(device, 0)) | |
297 | printf("direct usb:%s \"Unknown\" \"USB Printer #%d (no reset)\"\n", device, i + 1); | |
298 | } | |
299 | #endif | |
300 | } | |
301 | ||
302 | ||
303 | /* | |
304 | * 'open_device()' - Open a USB device... | |
305 | */ | |
306 | ||
f7deaa1a | 307 | static int /* O - File descriptor or -1 on error */ |
8ca02f3c | 308 | open_device(const char *uri, /* I - Device URI */ |
309 | int *use_bc) /* O - Set to 0 for unidirectional */ | |
ef416fc2 | 310 | { |
8ca02f3c | 311 | int fd; /* File descriptor */ |
312 | ||
313 | ||
ef416fc2 | 314 | /* |
315 | * The generic implementation just treats the URI as a device filename... | |
316 | * Specific operating systems may also support using the device serial | |
317 | * number and/or make/model. | |
318 | */ | |
319 | ||
320 | if (!strncmp(uri, "usb:/dev/", 9)) | |
321 | #ifdef __linux | |
ed486911 | 322 | { |
323 | /* | |
324 | * Do not allow direct devices anymore... | |
325 | */ | |
326 | ||
327 | errno = ENODEV; | |
328 | return (-1); | |
329 | } | |
ef416fc2 | 330 | else if (!strncmp(uri, "usb://", 6)) |
331 | { | |
332 | /* | |
333 | * For Linux, try looking up the device serial number or model... | |
334 | */ | |
335 | ||
336 | int i; /* Looping var */ | |
337 | int busy; /* Are any ports busy? */ | |
2abf387c | 338 | char device[255], /* Device filename */ |
ef416fc2 | 339 | device_id[1024], /* Device ID string */ |
340 | make_model[1024], /* Make and model */ | |
341 | device_uri[1024]; /* Device URI string */ | |
342 | ||
343 | ||
344 | /* | |
2abf387c | 345 | * Find the correct USB device... |
ef416fc2 | 346 | */ |
347 | ||
0a682745 | 348 | for (;;) |
ef416fc2 | 349 | { |
350 | for (busy = 0, i = 0; i < 16; i ++) | |
351 | { | |
2abf387c | 352 | /* |
353 | * Linux has a long history of changing the standard filenames used | |
354 | * for USB printer devices. We get the honor of trying them all... | |
355 | */ | |
356 | ||
357 | sprintf(device, "/dev/usblp%d", i); | |
358 | ||
359 | if ((fd = open(device, O_RDWR | O_EXCL)) < 0 && errno == ENOENT) | |
360 | { | |
361 | sprintf(device, "/dev/usb/lp%d", i); | |
362 | ||
363 | if ((fd = open(device, O_RDWR | O_EXCL)) < 0 && errno == ENOENT) | |
364 | { | |
365 | sprintf(device, "/dev/usb/usblp%d", i); | |
366 | ||
367 | if ((fd = open(device, O_RDWR | O_EXCL)) < 0 && errno == ENOENT) | |
368 | continue; | |
369 | } | |
370 | } | |
ef416fc2 | 371 | |
2abf387c | 372 | if (fd >= 0) |
ef416fc2 | 373 | { |
ed486911 | 374 | backendGetDeviceID(fd, device_id, sizeof(device_id), |
375 | make_model, sizeof(make_model), | |
376 | "usb", device_uri, sizeof(device_uri)); | |
ef416fc2 | 377 | } |
378 | else | |
379 | { | |
380 | /* | |
381 | * If the open failed because it was busy, flag it so we retry | |
382 | * as needed... | |
383 | */ | |
384 | ||
385 | if (errno == EBUSY) | |
386 | busy = 1; | |
387 | ||
388 | device_uri[0] = '\0'; | |
389 | } | |
390 | ||
391 | if (!strcmp(uri, device_uri)) | |
392 | { | |
393 | /* | |
394 | * Yes, return this file descriptor... | |
395 | */ | |
396 | ||
c0e1af83 | 397 | fprintf(stderr, "DEBUG: Printer using device file \"%s\"...\n", |
398 | device); | |
ef416fc2 | 399 | |
400 | return (fd); | |
401 | } | |
402 | ||
403 | /* | |
404 | * This wasn't the one... | |
405 | */ | |
406 | ||
407 | if (fd >= 0) | |
408 | close(fd); | |
409 | } | |
410 | ||
411 | /* | |
412 | * If we get here and at least one of the printer ports showed up | |
413 | * as "busy", then sleep for a bit and retry... | |
414 | */ | |
415 | ||
416 | if (busy) | |
db1f069b MS |
417 | _cupsLangPuts(stderr, |
418 | _("INFO: Printer busy; will retry in 5 seconds...\n")); | |
839a51c8 MS |
419 | |
420 | sleep(5); | |
ef416fc2 | 421 | } |
ef416fc2 | 422 | } |
423 | #elif defined(__sun) && defined(ECPPIOC_GETDEVID) | |
ed486911 | 424 | { |
425 | /* | |
426 | * Do not allow direct devices anymore... | |
427 | */ | |
428 | ||
429 | errno = ENODEV; | |
430 | return (-1); | |
431 | } | |
ef416fc2 | 432 | else if (!strncmp(uri, "usb://", 6)) |
433 | { | |
434 | /* | |
435 | * For Solaris, try looking up the device serial number or model... | |
436 | */ | |
437 | ||
438 | int i; /* Looping var */ | |
439 | int busy; /* Are any ports busy? */ | |
ef416fc2 | 440 | char device[255], /* Device filename */ |
441 | device_id[1024], /* Device ID string */ | |
442 | make_model[1024], /* Make and model */ | |
443 | device_uri[1024]; /* Device URI string */ | |
ef416fc2 | 444 | |
445 | ||
446 | /* | |
447 | * Find the correct USB device... | |
448 | */ | |
449 | ||
450 | do | |
451 | { | |
452 | for (i = 0, busy = 0; i < 8; i ++) | |
453 | { | |
454 | sprintf(device, "/dev/usb/printer%d", i); | |
455 | ||
8ca02f3c | 456 | if ((fd = open(device, O_WRONLY | O_EXCL)) >= 0) |
ed486911 | 457 | backendGetDeviceID(fd, device_id, sizeof(device_id), |
458 | make_model, sizeof(make_model), | |
459 | "usb", device_uri, sizeof(device_uri)); | |
ef416fc2 | 460 | else |
461 | { | |
462 | /* | |
463 | * If the open failed because it was busy, flag it so we retry | |
464 | * as needed... | |
465 | */ | |
466 | ||
467 | if (errno == EBUSY) | |
468 | busy = 1; | |
469 | ||
470 | device_uri[0] = '\0'; | |
471 | } | |
472 | ||
473 | if (!strcmp(uri, device_uri)) | |
8ca02f3c | 474 | { |
475 | /* | |
476 | * Yes, return this file descriptor... | |
477 | */ | |
478 | ||
479 | fputs("DEBUG: Setting use_bc to 0!\n", stderr); | |
480 | ||
481 | *use_bc = 0; | |
482 | ||
483 | return (fd); | |
484 | } | |
ef416fc2 | 485 | |
486 | /* | |
487 | * This wasn't the one... | |
488 | */ | |
489 | ||
490 | if (fd >= 0) | |
491 | close(fd); | |
492 | } | |
493 | ||
494 | /* | |
495 | * If we get here and at least one of the printer ports showed up | |
496 | * as "busy", then sleep for a bit and retry... | |
497 | */ | |
498 | ||
499 | if (busy) | |
500 | { | |
db1f069b MS |
501 | _cupsLangPuts(stderr, |
502 | _("INFO: Printer is busy; will retry in 5 seconds...\n")); | |
ef416fc2 | 503 | sleep(5); |
504 | } | |
505 | } | |
506 | while (busy); | |
507 | ||
508 | /* | |
509 | * Couldn't find the printer, return "no such device or address"... | |
510 | */ | |
511 | ||
512 | errno = ENODEV; | |
513 | ||
514 | return (-1); | |
515 | } | |
516 | #else | |
8ca02f3c | 517 | { |
91c84a35 | 518 | if (*use_bc) |
323c5de1 | 519 | fd = open(uri + 4, O_RDWR | O_EXCL); |
520 | else | |
521 | fd = -1; | |
522 | ||
523 | if (fd < 0) | |
8ca02f3c | 524 | { |
525 | fd = open(uri + 4, O_WRONLY | O_EXCL); | |
526 | *use_bc = 0; | |
527 | } | |
528 | ||
529 | return (fd); | |
530 | } | |
ef416fc2 | 531 | #endif /* __linux */ |
532 | else | |
533 | { | |
534 | errno = ENODEV; | |
535 | return (-1); | |
536 | } | |
537 | } | |
538 | ||
539 | ||
540 | /* | |
f7deaa1a | 541 | * 'side_cb()' - Handle side-channel requests... |
542 | */ | |
543 | ||
544 | static void | |
568fa3fa MS |
545 | side_cb(int print_fd, /* I - Print file */ |
546 | int device_fd, /* I - Device file */ | |
547 | int snmp_fd, /* I - SNMP socket (unused) */ | |
548 | http_addr_t *addr, /* I - Device address (unused) */ | |
549 | int use_bc) /* I - Using back-channel? */ | |
f7deaa1a | 550 | { |
551 | cups_sc_command_t command; /* Request command */ | |
552 | cups_sc_status_t status; /* Request/response status */ | |
553 | char data[2048]; /* Request/response data */ | |
554 | int datalen; /* Request/response data size */ | |
555 | ||
556 | ||
568fa3fa MS |
557 | (void)snmp_fd; |
558 | (void)addr; | |
559 | ||
f7deaa1a | 560 | datalen = sizeof(data); |
561 | ||
562 | if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0)) | |
563 | { | |
db1f069b | 564 | _cupsLangPuts(stderr, _("WARNING: Failed to read side-channel request!\n")); |
f7deaa1a | 565 | return; |
566 | } | |
567 | ||
568 | switch (command) | |
569 | { | |
570 | case CUPS_SC_CMD_DRAIN_OUTPUT : | |
09a101d6 | 571 | if (backendDrainOutput(print_fd, device_fd)) |
572 | status = CUPS_SC_STATUS_IO_ERROR; | |
573 | else if (tcdrain(device_fd)) | |
f7deaa1a | 574 | status = CUPS_SC_STATUS_IO_ERROR; |
575 | else | |
576 | status = CUPS_SC_STATUS_OK; | |
577 | ||
578 | datalen = 0; | |
579 | break; | |
580 | ||
581 | case CUPS_SC_CMD_GET_BIDI : | |
582 | data[0] = use_bc; | |
583 | datalen = 1; | |
584 | break; | |
585 | ||
586 | case CUPS_SC_CMD_GET_DEVICE_ID : | |
587 | memset(data, 0, sizeof(data)); | |
588 | ||
589 | if (backendGetDeviceID(device_fd, data, sizeof(data) - 1, | |
590 | NULL, 0, NULL, NULL, 0)) | |
591 | { | |
592 | status = CUPS_SC_STATUS_NOT_IMPLEMENTED; | |
593 | datalen = 0; | |
594 | } | |
595 | else | |
596 | { | |
597 | status = CUPS_SC_STATUS_OK; | |
598 | datalen = strlen(data); | |
599 | } | |
600 | break; | |
601 | ||
602 | default : | |
603 | status = CUPS_SC_STATUS_NOT_IMPLEMENTED; | |
604 | datalen = 0; | |
605 | break; | |
606 | } | |
607 | ||
608 | cupsSideChannelWrite(command, status, data, datalen, 1.0); | |
609 | } | |
610 | ||
611 | ||
612 | /* | |
75bd9771 | 613 | * End of "$Id: usb-unix.c 7687 2008-06-24 01:28:36Z mike $". |
ef416fc2 | 614 | */ |