kopia lustrzana https://gitlab.com/sane-project/backends
Added support for detecting USB chipsets to sane-find-scanner.
rodzic
ee430a8af6
commit
b3fd92c684
|
@ -1,3 +1,9 @@
|
|||
2003-07-18 Henning Meier-Geinitz <henning@meier-geinitz.de>
|
||||
|
||||
* doc/sane-find-scanner.man tools/Makefile.in
|
||||
tools/check-usb-chip.c tools/sane-find-scanner.c: Added support
|
||||
for detecting USB chipsets to sane-find-scanner.
|
||||
|
||||
2003-07-17 Abel Deuring <a.deuring@satzbau-gmbh.de>
|
||||
|
||||
* sanei/sanei_scsi.c: improved SCSI error handling in
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.TH sane-find-scanner 1 "15 Sep 2002" "@PACKAGEVERSION@" "SANE Scanner Access Now Easy"
|
||||
.TH sane-find-scanner 1 "18 Jul 2003" "@PACKAGEVERSION@" "SANE Scanner Access Now Easy"
|
||||
.IX sane-find-scanner
|
||||
.SH NAME
|
||||
sane-find-scanner \- find SCSI and USB scanners and their device files
|
||||
|
@ -46,6 +46,9 @@ available). There is no special USB class for scanners, so the heuristics used
|
|||
to distinguish scanners from other USB devices is not
|
||||
perfect.
|
||||
.B sane-find-scanner
|
||||
also tries to find out the type of USB chip used in the scanner. If detected,
|
||||
it will be printed after the vendor and product ids.
|
||||
.B sane-find-scanner
|
||||
will even find USB scanners, that are not supported by any SANE backend.
|
||||
.PP
|
||||
.B sane-find-scanner
|
||||
|
@ -103,3 +106,7 @@ NetBSD, OpenBSD, and HP-UX.
|
|||
|
||||
.SH BUGS
|
||||
No support for parallel port scanners yet.
|
||||
.br
|
||||
Detection of USB chipsets is limited to GrandTech 6801 and 6816, Mustek chips
|
||||
and National Semiconductor lm983x chips.
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ LIBSANEI = ../sanei/libsanei.a
|
|||
LIBLIB = ../lib/liblib.a
|
||||
|
||||
DISTFILES = Makefile.in README libtool-get-dll-ext mustek600iin-off.c \
|
||||
sane-config.in sane-desc.c \
|
||||
sane-config.in sane-desc.c check-usb-chip.c \
|
||||
sane-find-scanner.c umax_pp.c xerox gamma4scanimage.c check-po.awk
|
||||
|
||||
.PHONY: all clean depend dist distclean install uninstall
|
||||
|
@ -89,9 +89,9 @@ sane-config: sane-config.in $(top_builddir)/config.status
|
|||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
sane-find-scanner: sane-find-scanner.o ../backend/sane_strstatus.lo \
|
||||
sane-find-scanner: sane-find-scanner.o check-usb-chip.o ../backend/sane_strstatus.lo \
|
||||
../sanei/sanei_scsi.lo ../sanei/sanei_usb.lo ../sanei/sanei_init_debug.lo
|
||||
@$(LIBTOOL) $(MLINK) $(LINK) sane-find-scanner.o \
|
||||
@$(LIBTOOL) $(MLINK) $(LINK) sane-find-scanner.o check-usb-chip.o \
|
||||
../backend/sane_strstatus.lo $(LIBSANEI) $(LIBLIB) $(LIBS)
|
||||
|
||||
gamma4scanimage: gamma4scanimage.o
|
||||
|
|
Plik diff jest za duży
Load Diff
|
@ -1,6 +1,6 @@
|
|||
/* sane-find-scanner.c
|
||||
|
||||
Copyright (C) 1997-2002 Oliver Rauch, Henning Meier-Geinitz, and others.
|
||||
Copyright (C) 1997-2003 Oliver Rauch, Henning Meier-Geinitz, and others.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
|
@ -32,6 +32,7 @@
|
|||
|
||||
#ifdef HAVE_LIBUSB
|
||||
#include "usb.h"
|
||||
extern char * check_usb_chip (struct usb_device *dev, int verbosity);
|
||||
#endif
|
||||
|
||||
#include "../include/sane/sanei.h"
|
||||
|
@ -445,7 +446,6 @@ check_libusb_device (struct usb_device *dev)
|
|||
int config_nr;
|
||||
struct usb_device_descriptor *d = &dev->descriptor;
|
||||
|
||||
|
||||
printf ("\n");
|
||||
printf ("<device descriptor of 0x%04x/0x%04x at %s:%s",
|
||||
d->idVendor, d->idProduct, dev->bus->dirname, dev->filename);
|
||||
|
@ -602,13 +602,18 @@ check_libusb_device (struct usb_device *dev)
|
|||
|
||||
if (is_scanner > 0)
|
||||
{
|
||||
char * chipset = check_usb_chip (dev, verbose);
|
||||
|
||||
printf ("found USB scanner (vendor=0x%04x", dev->descriptor.idVendor);
|
||||
if (vendor)
|
||||
printf (" [%s]", vendor);
|
||||
printf (", product=0x%04x", dev->descriptor.idProduct);
|
||||
if (product)
|
||||
printf (" [%s]", product);
|
||||
if (chipset)
|
||||
printf (", chip=%s", chipset);
|
||||
printf (") at libusb:%s:%s\n", dev->bus->dirname, dev->filename);
|
||||
|
||||
libusb_device_found = SANE_TRUE;
|
||||
device_found = SANE_TRUE;
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue