]> sigrok.org Git - libsigrok.git/commitdiff
rigol-ds1xx2: newer Linux kernels have USBTMC in /sys/class/usbmisc
authorBert Vermeulen <redacted>
Fri, 30 Aug 2013 11:57:15 +0000 (13:57 +0200)
committerBert Vermeulen <redacted>
Fri, 30 Aug 2013 11:57:45 +0000 (13:57 +0200)
hardware/rigol-ds1xx2/api.c

index e6e923ccfb7f41f2c78f448e9af1994c8f2a173d..000de312999d5d17d42c072932e7e05e64d4a4f4 100644 (file)
@@ -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;