From: Bert Vermeulen Date: Fri, 30 Aug 2013 11:57:15 +0000 (+0200) Subject: rigol-ds1xx2: newer Linux kernels have USBTMC in /sys/class/usbmisc X-Git-Tag: libsigrok-0.2.2~72 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=da970d24ecfcf67f89a9532f3a53ade8cb1131ed;p=libsigrok.git rigol-ds1xx2: newer Linux kernels have USBTMC in /sys/class/usbmisc --- diff --git a/hardware/rigol-ds1xx2/api.c b/hardware/rigol-ds1xx2/api.c index e6e923cc..000de312 100644 --- a/hardware/rigol-ds1xx2/api.c +++ b/hardware/rigol-ds1xx2/api.c @@ -307,8 +307,9 @@ static GSList *scan(GSList *options) if (probe_port(port, &devices) == SR_ERR_MALLOC) return NULL; } else { - if (!(dir = g_dir_open("/sys/class/usb/", 0, NULL))) - return NULL; + if (!(dir = g_dir_open("/sys/class/usbmisc/", 0, NULL))) + if (!(dir = g_dir_open("/sys/class/usb/", 0, NULL))) + return NULL; while ((dev_name = g_dir_read_name(dir))) { if (strncmp(dev_name, "usbtmc", 6)) continue;