ctdb-common: Add api to add new section/commands to cmdline
[samba.git] / ctdb / common / cmdline.h
index f8c17940a90cd5460443d0859d2ca17827b13fbd..b9a128c2cc46f2c4a4c949b4d8efc5d288048c80 100644 (file)
@@ -99,6 +99,19 @@ int cmdline_init(TALLOC_CTX *mem_ctx,
                 struct cmdline_command *commands,
                 struct cmdline_context **result);
 
+
+/**
+ * @brief Add command line section/commands
+ *
+ * @param[in] cmdline Cmdline context
+ * @param[in] section Name of section grouping specified commands
+ * @param[in] commands Commands array
+ * @return 0 on success, errno on failure
+ */
+int cmdline_add(struct cmdline_context *cmdline,
+               const char *section,
+               struct cmdline_command *commands);
+
 /**
  * @brief Parse command line options and commands/arguments
  *