diff options
| author | Bdale Garbee <bdale@gag.com> | 2015-07-16 13:31:42 -0600 | 
|---|---|---|
| committer | Bdale Garbee <bdale@gag.com> | 2015-07-16 13:31:42 -0600 | 
| commit | 6e9bb9178356620bd47d9f2e31abf42b7f1a8f11 (patch) | |
| tree | 6f04b5500462d1f6e26ebcba58c5e9cd56afd442 /ao-tools/lib/cc-usbdev.c | |
| parent | e2cefd8593d269ce603aaf33f4a53a5c2dcb3350 (diff) | |
| parent | 87c8bb3956897830da1f7aaca2990a9571767b73 (diff) | |
Merge branch 'master' into branch-1.6
Diffstat (limited to 'ao-tools/lib/cc-usbdev.c')
| -rw-r--r-- | ao-tools/lib/cc-usbdev.c | 6 | 
1 files changed, 3 insertions, 3 deletions
diff --git a/ao-tools/lib/cc-usbdev.c b/ao-tools/lib/cc-usbdev.c index 95bfa244..6c3ba591 100644 --- a/ao-tools/lib/cc-usbdev.c +++ b/ao-tools/lib/cc-usbdev.c @@ -219,7 +219,7 @@ is_am(int idVendor, int idProduct) {  }  struct cc_usbdevs * -cc_usbdevs_scan(void) +cc_usbdevs_scan(int non_tty)  {  	int			e;  	struct dirent		**ents; @@ -241,7 +241,7 @@ cc_usbdevs_scan(void)  		dir = cc_fullname(USB_DEVICES, ents[e]->d_name);  		dev = usb_scan_device(dir);  		free(dir); -		if (is_am(dev->idVendor, dev->idProduct) && dev->tty) { +		if (is_am(dev->idVendor, dev->idProduct) && (non_tty || dev->tty)) {  			if (devs->dev)  				devs->dev = realloc(devs->dev,  						    (devs->ndev + 1) * sizeof (struct usbdev *)); @@ -274,7 +274,7 @@ match_dev(char *product, int serial)  	int			i;  	char			*tty = NULL; -	devs = cc_usbdevs_scan(); +	devs = cc_usbdevs_scan(FALSE);  	if (!devs)  		return NULL;  	for (i = 0; i < devs->ndev; i++) {  | 
