]> git.ozlabs.org Git - ccan/blobdiff - ccan/opt/opt.h
opt: add opt_unregister.
[ccan] / ccan / opt / opt.h
index c642ec6fafc85d1b87377458d69fa9e3d909101c..6f4b9dda8c85a4f33389863963b57f1a87214ea4 100644 (file)
@@ -228,6 +228,15 @@ void opt_register_table(const struct opt_table *table, const char *desc);
        _opt_register((names), OPT_CB_ARG((cb), OPT_EARLY, (show),(arg)), \
                      (arg), (desc))
 
+/**
+ * opt_unregister - unregister an option.
+ * @names: the names it was registered with.
+ *
+ * This undoes opt_register[_early]_[no]arg.  Returns true if the option was
+ * found, otherwise false.
+ */
+bool opt_unregister(const char *names);
+
 /**
  * opt_parse - parse arguments.
  * @argc: pointer to argc