]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virsh: common code for parsing --seconds
authorEric Blake <eblake@redhat.com>
Fri, 14 Feb 2014 00:08:42 +0000 (17:08 -0700)
committerEric Blake <eblake@redhat.com>
Thu, 20 Feb 2014 23:23:07 +0000 (16:23 -0700)
commit5093b047eaff2596848c32cbe280207996c86b42
treed6432c797067d68c7ab56b25fc6d71338a52d5c9
parent84a6209d7f1674c92e1c5e68e56e2b16922fc608
virsh: common code for parsing --seconds

Several virsh commands ask for a --timeout parameter in
seconds, then use it to control interfaces that operate on
millisecond limits; I also plan on adding a 'virsh event'
command that also does this.  Factor this into a common
function.

* tools/virsh.h (vshCommandOptTimeoutToMs): New prototype.
* tools/virsh.c (vshCommandOptTimeoutToMs): New function.
* tools/virsh-domain.c (cmdBlockCommit, cmdBlockCopy)
(cmdBlockPull, cmdMigrate): Use it.
(vshWatchJob): Adjust timeout scale.

Signed-off-by: Eric Blake <eblake@redhat.com>
tools/virsh-domain.c
tools/virsh.c
tools/virsh.h