rigol-ds1xx2: newer Linux kernels have USBTMC in /sys/class/usbmisc

This commit is contained in:
Bert Vermeulen 2013-08-30 13:57:15 +02:00
parent f51acd69d7
commit da970d24ec
1 changed files with 3 additions and 2 deletions

View File

@ -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;