]> xenbits.xensource.com Git - libvirt.git/commit
virsh: declare more common functions
authorEric Blake <eblake@redhat.com>
Mon, 20 Aug 2012 20:29:27 +0000 (14:29 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 21 Aug 2012 05:56:18 +0000 (23:56 -0600)
commit4c10b3c7da89f9ac27c2d2dc7ff5da9c16b39336
treea835ed8e4097137786c1d9e259bc4c0fc1982a03
parentae8e89fb1202d016713337ff94ffeec81127c45b
virsh: declare more common functions

In preparation for splitting virsh-interface.c, I found these
functions need to be declared in virsh.h, as well as one that
belongs more properly in virsh-domain.h.  Also, since we
use the VSH_BY* flags in more than one function, I improved
how they are used.

* tools/virsh.h (vshNameSorter, vshCmdHasOption): Declare.
(VSH_BYID): Turn into enum.
(vshCommandOptDomainBy): Move...
* tools/virsh-domain.h): ...here.
* tools/virsh.c: (vshNameSorter): Export.
(cmd_has_option): Rename...
(vshCmdHasOption): ...and export.
(vshCommandOptDomainBy): Move...
* tools/virsh-domain.c (vshCommandOptDomainBy): ...here, adjust
signature, and check flags.
* tools/virsh-network.c (vshCommandOptNetworkBy): Update callers.
* tools/virsh-nwfilter.c (vshCommandOptNWFilterBy): Likewise.
* tools/virsh-secret.c (vshCommandOptSecret): Likewise.
* tools/virsh-domain-monitor.c (includes): Likewise.
* tools/virsh-host.c (includes): Likewise.
tools/virsh-domain-monitor.c
tools/virsh-domain.c
tools/virsh-domain.h
tools/virsh-host.c
tools/virsh-interface.c
tools/virsh-network.c
tools/virsh-nwfilter.c
tools/virsh-secret.c
tools/virsh.c
tools/virsh.h