The prototype said "static" but the definition did not.
Reported by sparse.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Alex Wang <alexw@nicira.com>
The user is required to expose the_idl and the_idl_txn global variables,
so that memory can be cleaned up on fatal errors. This patch changes to
ask user to supply an exit function via ctl_init(). What user needs to
do on exit can now remain private.
Signed-off-by: Andy Zhou <azhou@nicira.com>
all_commands currently is some times accessed directly, some times via
a function call. Change to always access it directly.
Signed-off-by: Andy Zhou <azhou@nicira.com>
This file follows a convention that all static functions are grouped
towards the beginning, ahead of public functions. Re-arrange the code
to confirm to this convention. No functional changes.
Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Alex Wang <alexw@nicira.com>
Both get_table() and set_cloum() APIs are mostly used within db-ctl-base
library. This patch makes both private to the library.
Add a new ctl_set_colum() API for library client.
The changes are cleanups. No functional changes.
Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Alex Wang <alexw@nicira.com>
This commit adds improvement to 'show' command logic and allows it
to print key->table_ref maps. The direct effect can be observed
from the tests/vtep-ctl.at change. The improvement will also be
used in the ovn-sbctl implementation.
Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
This commit extracts the 'show' command code and puts it into the
db-ctl-base module.
Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
This commit extracts general code from parse_options() and puts it into
db-ctl-base module.
Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
This commit extracts common database command (e.g. ovs-vsctl, vtep-ctl)
code into a new library module, db-ctl-base. Specifically, the module
unifies the command syntax and common database-operating commands like
(get, list, find, set ...), and provides apis which allow user to create
more specific commands.
Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>