rigol-ds1xx2: newer Linux kernels have USBTMC in /sys/class/usbmisc
This commit is contained in:
parent
f51acd69d7
commit
da970d24ec
|
@ -307,8 +307,9 @@ static GSList *scan(GSList *options)
|
||||||
if (probe_port(port, &devices) == SR_ERR_MALLOC)
|
if (probe_port(port, &devices) == SR_ERR_MALLOC)
|
||||||
return NULL;
|
return NULL;
|
||||||
} else {
|
} else {
|
||||||
if (!(dir = g_dir_open("/sys/class/usb/", 0, NULL)))
|
if (!(dir = g_dir_open("/sys/class/usbmisc/", 0, NULL)))
|
||||||
return NULL;
|
if (!(dir = g_dir_open("/sys/class/usb/", 0, NULL)))
|
||||||
|
return NULL;
|
||||||
while ((dev_name = g_dir_read_name(dir))) {
|
while ((dev_name = g_dir_read_name(dir))) {
|
||||||
if (strncmp(dev_name, "usbtmc", 6))
|
if (strncmp(dev_name, "usbtmc", 6))
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue