title: How to check if kernel driver is attached with libusb-0.1?
body: <p>In libusb-1.0 one can use <code>libusb_kernel_driver_active</code> for this:</p>
  
  <pre><code>if (libusb_kernel_driver_active(dev_handle, 0) == 1) { //find out if kernel driver is attached
          cout&lt;&lt;"Kernel Driver Active"&lt;&lt;endl;
          if(libusb_detach_kernel_driver(dev_handle, 0) == 0) //detach it
              cout&lt;&lt;"Kernel Driver Detached!"&lt;&lt;endl;
      }
  </code></pre>
  
  <p>How to check it using libusb-0.1?</p>