projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ao-tools/ao-telem: Print out 'log_max' value. Clean up compiler warnings.
[fw/altos]
/
ao-tools
/
lib
/
cc-usbdev.c
diff --git
a/ao-tools/lib/cc-usbdev.c
b/ao-tools/lib/cc-usbdev.c
index 95bfa244b6a5f9dfe0fa567b992d02221e47f149..b176170013574dbfcbb0324f1781c4d5ef1ef469 100644
(file)
--- a/
ao-tools/lib/cc-usbdev.c
+++ b/
ao-tools/lib/cc-usbdev.c
@@
-102,7
+102,7
@@
usb_tty(char *sys)
struct dirent **namelist;
int interface;
int num_interfaces;
struct dirent **namelist;
int interface;
int num_interfaces;
- char endpoint_base[
20
];
+ char endpoint_base[
64
];
char *endpoint_full;
char *tty_dir;
int ntty;
char *endpoint_full;
char *tty_dir;
int ntty;
@@
-219,7
+219,7
@@
is_am(int idVendor, int idProduct) {
}
struct cc_usbdevs *
}
struct cc_usbdevs *
-cc_usbdevs_scan(
void
)
+cc_usbdevs_scan(
int non_tty
)
{
int e;
struct dirent **ents;
{
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);
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 *));
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;
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++) {
if (!devs)
return NULL;
for (i = 0; i < devs->ndev; i++) {