2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-25 15:07:05 +00:00
Files
openvswitch/tests
Russell Bryant 1636c76112 command-line: add ovs_cmdl_context
I started working on a new command line utility that used this shared
code.  I wanted the ability to pass some data from common
initialization code to all of the commands.  You can find a similar
pattern in ovs-vsctl.

This patch updates the command handler to take a new struct,
ovs_cmdl_context, instead of argc and argv directly.  It includes argc
and argv, but also includes an opaque type (void *), where the user of
this API can attach its custom data it wants passed along to command
handlers.

This patch affected the ovstest sub-programs, as well.  The patch
includes a bit of an odd hack to OVSTEST_REGISTER() to avoid making
the main() function of the sub-programs take a ovs_cmdl_context.
The test main() functions still receive argc and argv directly, as
that seems more natural.  The test-subprograms themselves are able to
make use of a context internally, though.

Signed-off-by: Russell Bryant <rbryant@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2015-03-17 08:15:57 -07:00
..
2014-12-15 14:15:25 +01:00
2014-12-15 14:15:25 +01:00
2015-03-17 08:15:57 -07:00
2015-03-17 08:15:57 -07:00
2014-09-09 11:45:43 -07:00
2015-03-04 09:59:44 -08:00
2015-03-03 13:37:39 -08:00
2015-03-17 08:15:57 -07:00
2014-10-30 09:14:46 -07:00
2015-03-16 14:11:12 -07:00
2015-03-17 08:15:57 -07:00
2014-10-30 09:14:46 -07:00
2014-10-30 09:14:46 -07:00
2014-12-15 14:15:25 +01:00
2015-03-03 13:37:39 -08:00
2014-10-30 09:14:46 -07:00
2015-03-17 08:15:57 -07:00
2014-10-30 09:14:46 -07:00