]> git.proxmox.com Git - ovs.git/commit
utilities: Fix and unify parsing of timeout option.
authorIlya Maximets <i.maximets@samsung.com>
Tue, 14 Aug 2018 07:53:15 +0000 (10:53 +0300)
committerBen Pfaff <blp@ovn.org>
Wed, 15 Aug 2018 18:36:18 +0000 (11:36 -0700)
commitcbcf40a847c0539fec36e82410f0966f13517964
tree0970a16b5b1ba1e7c34826c6e74197f4dd59cfcb
parentb302f315b38b9bf35036ef8d0542bf83bb0e0752
utilities: Fix and unify parsing of timeout option.

Parsing of the '--timeout' option implemented differently
for every single control utility and, which is more
important, highly inaccurate. In most cases unsigned result
of 'strtoul' stored in signed variable. Parsing failures are
not tracked. 'ovs-appctl' even uses just 'atoi' without any
checking of the argument or result.

This patch unifies the parsing by using 'str_to_uint'.

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
ovn/utilities/ovn-nbctl.c
ovn/utilities/ovn-sbctl.c
ovsdb/ovsdb-client.c
tests/test-ovsdb.c
utilities/ovs-appctl.c
utilities/ovs-dpctl.c
utilities/ovs-ofctl.c
utilities/ovs-vsctl.c
vtep/vtep-ctl.c