const struct shash_node *node;
size_t n_existing_options = *n_options_p;
- SHASH_FOR_EACH (node, ctl_get_all_commands()) {
+ SHASH_FOR_EACH (node, &all_commands) {
const struct ctl_command_syntax *p = node->data;
if (p->options[0]) {
{
const struct shash_node *node;
- SHASH_FOR_EACH (node, ctl_get_all_commands()) {
+ SHASH_FOR_EACH (node, &all_commands) {
const struct ctl_command_syntax *p = node->data;
char *options = xstrdup(p->options);
char *options_begin = options;
ctl_might_write_to_db(char **argv)
{
for (; *argv; argv++) {
- const struct ctl_command_syntax *p = shash_find_data(&all_commands, *argv);
+ const struct ctl_command_syntax *p = shash_find_data(&all_commands,
+ *argv);
if (p && p->mode == RW) {
return true;
}
ctl_register_commands(db_ctl_commands);
}
-/* Returns 'all_commands'. */
-const struct shash *
-ctl_get_all_commands(void)
-{
- return &all_commands;
-}
-
/* Returns the text for the database commands usage. */
const char *
ctl_get_db_cmd_usage(void)
void ctl_add_cmd_options(struct option **, size_t *n_options_p,
size_t *allocated_options_p, int opt_val);
void ctl_register_commands(const struct ctl_command_syntax *);
-const struct shash *ctl_get_all_commands(void);
struct ctl_command *ctl_parse_commands(int argc, char *argv[],
struct shash *local_options,
size_t *n_commandsp);