libusbgx: Allow to pass usbg_init() without access to /sys/class/udc
authorKrzysztof Opasiak <k.opasiak@samsung.com>
Thu, 16 Apr 2015 10:31:30 +0000 (12:31 +0200)
committerKrzysztof Opasiak <k.opasiak@samsung.com>
Tue, 22 Dec 2015 20:45:35 +0000 (21:45 +0100)
commitf9157528ec3bbf2c680ecc5dd8264cbf2e4f7dd6
treec13331c0895f9d2ad59404e463ee3476daf453e9
parent6efd53d659f0a5c95ad0ac37cb7f78a998c4b144
libusbgx: Allow to pass usbg_init() without access to /sys/class/udc

We may would like to use this library on machine where
is no udc support (no /sys/class/udc directory) or
where we don't have sufficient rights to read udc
directory.

This commit adds support for such situation. If we are
running on such machine we will be able to pass usbg_init()
function and manage usb gadgets but we won't be able to bind
gadget to udc as we were unable to read their names.

Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Reviewed-by: Pawel Szewczyk <p.szewczyk@samsung.com>
src/usbg.c