1. 21 8月, 2012 1 次提交
    • E
      virsh: split out virsh-domain-monitor.c · 99ae57f8
      Eric Blake 提交于
      Another file worth compiling on its own instead of by .c inclusion.
      
      * tools/virsh-domain-monitor.h: New file.
      * tools/Makefile.am (virsh_SOURCES): Build it.
      * tools/virsh.h (vshGetDomainDescription): Move to correct
      header.
      * tools/virsh-domain-monitor.c: Use new header.
      * tools/virsh.c: Likewise.
      * tools/virsh-domain.c: Likewise.
      99ae57f8
  2. 18 8月, 2012 1 次提交
    • E
      virsh: split out virsh.h · c2e494cc
      Eric Blake 提交于
      Having one .c file include another does not give any compilation
      benefits; move towards modular .o files by first splitting out
      reused declarations into a new virsh.h.  This patch doesn't try
      very hard to see which functions are used or not, to make it
      easier to review the file split.  Future patches can further trim
      the header to be smaller.
      
      * tools/Makefile.am (virsh_SOURCES): List new file, and prepare
      for others.
      * tools/virsh.c: Split declarations...
      * tools/virsh.h: ...into new file, and make several functions
      non-static.
      * tools/virsh-domain-monitor.c (vshGetDomainDescription): Make
      non-static.
      c2e494cc
  3. 15 8月, 2012 1 次提交
  4. 14 8月, 2012 1 次提交
    • O
      Destroy virdomainlist.[ch] · bb705e25
      Osier Yang 提交于
      As the consensus in:
      https://www.redhat.com/archives/libvir-list/2012-July/msg01692.html,
      this patch is to destroy conf/virdomainlist.[ch], folding the
      helpers into conf/domain_conf.[ch].
      
      * src/Makefile.am:
        - Various indention fixes incidentally
        - Add macro DATATYPES_SOURCES (datatypes.[ch])
        - Link datatypes.[ch] for libvirt_lxc
      
      * src/conf/domain_conf.c:
        - Move all the stuffs from virdomainlist.c into it
        - Use virUnrefDomain and virUnrefDomainSnapshot instead of
          virDomainFree and virDomainSnapshotFree, which are defined
          in libvirt.c, and we don't want to link to it.
        - Remove "if" before "free" the object, as virObjectUnref
          is in the list "useless_free_options".
      
      * src/conf/domain_conf.h:
        - Move all the stuffs from virdomainlist.h into it
        - s/LIST_FILTER/LIST_DOMAINS_FILTER/
      
      * src/libxl/libxl_driver.c:
        - s/LIST_FILTER/LIST_DOMAINS_FILTER/
        - no (include "virdomainlist.h")
      
      * src/libxl/libxl_driver.c: Likewise
      
      * src/lxc/lxc_driver.c: Likewise
      
      * src/openvz/openvz_driver.c: Likewise
      
      * src/parallels/parallels_driver.c: Likewise
      
      * src/qemu/qemu_driver.c: Likewise
      
      * src/test/test_driver.c: Likewise
      
      * src/uml/uml_driver.c: Likewise
      
      * src/vbox/vbox_tmpl.c: Likewise
      
      * src/vmware/vmware_driver.c: Likewise
      
      * tools/virsh-domain-monitor.c: Likewise
      
      * tools/virsh.c: Likewise
      bb705e25
  5. 27 7月, 2012 2 次提交
    • P
      virsh: Fix error resetting on fallback paths · 2751ab28
      Peter Krempa 提交于
      On some fallback paths in virsh, error reported by the previously failed
      API is cleared by virResetLastError() that doesn't free error stored by
      virsh. This patch changes this to clear it using vshResetLibvirtError().
      2751ab28
    • P
      virsh: Refactor error clearing on graceful fallback paths · 3df9626c
      Peter Krempa 提交于
      Virsh uses an error handler to save errors from libvirt. On some code
      paths it's needed to clear libvirt errors and continue on fallback code
      paths without reporting failure.
      
      This patch adds function vshResetLibvirtError() that clears error
      returned by libvirt and updates all places where the old two-line method
      was used.
      3df9626c
  6. 26 7月, 2012 2 次提交
    • O
      virsh: Move command group definition into its own file · c4bdf307
      Osier Yang 提交于
      * virsh-domain-monitor.c: Add domMonitoringCmds
      * virsh-domain.c: Add domManagementCmds
      * virsh-host.c: Add hostAndHypervisorCmds
      * virsh-interface.c: Add ifaceCmds
      * virsh-network.c: Add networkCmds
      * virsh-nodedev.c: Add nodedevCmds
      * virsh-nwfilter.c: Add nwfilterCmds
      * virsh-pool.c: Add storagePoolCmds
      * virsh-secret.c: Add secretCmds
      * virsh-snapshot.c: Add snapshotCmds
      * virsh-volume.c: Add storageVolCmds
      * virsh.c: Remove all the above *Cmds.
      c4bdf307
    • O
      virsh: Split cmds for domain monitoring from virsh.c · 9f4baa22
      Osier Yang 提交于
      This splits commands commands to monitor domain status into
      virsh-domain-monitor.c. The helpers not for common use are moved too.
      Standard copyright is added.
      
      * tools/virsh.c:
        - Remove commands for domain monitoring group and a few helpers (
          vshDomainIOErrorToString, vshGetDomainDescription,
          vshDomainControlStateToString, vshDomainStateToString) not for
          common use.
        - Remove (incldue "intprops.h").
      
      * tools/virsh-domain-monitor.c:
        - New file, filled with commands of domain monitor group.
        - Add "intprops.h".
      
      * cfg.mk:
        - Skip strcase checking for virsh-domain-monitor.c
        - Skip to check config.h including for virsh-domain-monitor.c
      
      * po/POTFILES.in
        - Add virsh-domain-monitor.c
      9f4baa22