libusbgx: Make usbg_rm_config() aware of OS descriptors
authorKrzysztof Opasiak <k.opasiak@samsung.com>
Wed, 6 Dec 2017 21:06:16 +0000 (22:06 +0100)
committerKrzysztof Opasiak <k.opasiak@samsung.com>
Tue, 12 Dec 2017 13:06:36 +0000 (14:06 +0100)
commite4d9cbf6ccdfc7210b61249146d62a2770573c69
treeb59434406132b7adcf109f92ea3ada706b9407fd
parent952f19c7ce13a454f699830c8138d1ad82805a0b
libusbgx: Make usbg_rm_config() aware of OS descriptors

Since we added support for OS descriptors we allowed user
to create a link in gadget's os_desc directory to choose
one of available configurations. This link prevents config
from being removed. This makes our rm funcitons stop working
with the recursive option. To fix this, let's make them
OS desc aware and remove this link before trying to remove
configuration if recurse option is set.

Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
src/usbg.c