summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/usbg.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/usbg.c b/src/usbg.c
index 00fc55e..061f383 100644
--- a/src/usbg.c
+++ b/src/usbg.c
@@ -1248,12 +1248,20 @@ int usbg_rm_config(usbg_config *c, int opts)
g = c->parent;
if (opts & USBG_RM_RECURSE) {
- /* Recursive flag was given
- * so remove all bindings and strings */
+ /*
+ * Recursive flag was given
+ * so remove all bindings and strings
+ */
char spath[USBG_MAX_PATH_LENGTH];
int nmb;
usbg_binding *b;
+ if (c->parent->os_desc_binding == c) {
+ ret = usbg_set_os_desc_config(g, NULL);
+ if (ret != USBG_SUCCESS)
+ goto out;
+ }
+
while (!TAILQ_EMPTY(&c->bindings)) {
b = TAILQ_FIRST(&c->bindings);
ret = usbg_rm_binding(b);