1. 14 1月, 2011 1 次提交
  2. 13 1月, 2011 1 次提交
  3. 23 12月, 2010 1 次提交
  4. 22 12月, 2010 2 次提交
    • H
      Fix memory leak in virsh · 29f92d64
      Hu Tao 提交于
      29f92d64
    • E
      maint: avoid space-tab · 831aaf4a
      Eric Blake 提交于
      * daemon/Makefile.am: Avoid spurious space before tabs.
      * src/Makefile.am: Likewise.
      * examples/dominfo/Makefile.am: Likewise.
      * examples/domsuspend/Makefile.am: Likewise.
      * tools/Makefile.am: Likewise.
      * src/datatypes.h (VIR_CONNECT_MAGIC): Likewise.
      * src/internal.h (TODO): Likewise.
      * src/qemu/qemu_monitor.h (QEMU_MONITOR_MIGRATE): Likewise.
      * src/xen/xen_hypervisor.c (XEN_V2_OP_GETAVAILHEAP): Likewise.
      * src/xen/xs_internal.h: Likewise.
      831aaf4a
  5. 20 12月, 2010 1 次提交
  6. 14 12月, 2010 1 次提交
  7. 10 12月, 2010 1 次提交
  8. 08 12月, 2010 2 次提交
  9. 07 12月, 2010 2 次提交
  10. 03 12月, 2010 4 次提交
  11. 02 12月, 2010 2 次提交
    • O
      virsh: Remove using phy as default disk driver in cmdAttachDisk · 84f7b286
      Osier Yang 提交于
      * tools/virsh.c (virsh shouldn't use 'phy' as the disk driver if
      user doesn't specify "--driver", it causes bugs, as not all of
      hypervisor driver supports 'phy', and actually hypervisor should
      known the correct default disk driver and subdriver, so remove it)
      84f7b286
    • O
      virsh: update help for "virsh help help" · 33e38e77
      Osier Yang 提交于
      As virsh help supports both command and command group now,
      update "cmdHelp" to print consite help, (this patch is
      increment of "78290527").
      
      And also remove redundant empty line in "vshUsage".
      
      * tools/virsh.c
      33e38e77
  12. 01 12月, 2010 2 次提交
    • J
      virsh: remove a badly placed line break in virsh -h output · 270b0b5f
      Justin Clift 提交于
      The output was previously:
      
          -c | --connect <uri>    hypervisor connection URI
          -r | --readonly         connect readonly
          -d | --debug <num>      debug level [0-5]
          -h | --help             this help
          -q | --quiet            quiet mode
          -t | --timing           print timing information
          -l | --log <file>       output logging to file
          -v | --version[=short]  program version
      
          -V | --version=long     version and full options
      
      (note the blank line between the --version types)
      
      This patch removes the extra blank line.
      270b0b5f
    • O
      virsh: Categorize commands into groups for virsh help · 78290527
      Osier Yang 提交于
      Change the virsh help out. The new output of "virsh help" and
      "virsh --help" will be like:
      
       Secret (help keyword 'secret'):
          secret-define                  define or modify a secret from an XML file
          secret-dumpxml                 secret attributes in XML
          secret-set-value               set a secret value
          secret-get-value               Output a secret value
          secret-undefine                undefine a secret
          secret-list                    list secrets
      
       Snapshot (help keyword 'snapshot'):
          snapshot-create                Create a snapshot
          snapshot-current               Get the current snapshot
          snapshot-delete                Delete a domain snapshot
          snapshot-dumpxml               Dump XML for a domain snapshot
          snapshot-list                  List snapshots for a domain
          snapshot-revert                Revert a domain to a snapshot
      
      Also support output help information of specified command group, e.g.
      
      % ./tools/virsh help "Network Filter"
       Network Filter (help keyword 'filter'):
          nwfilter-define                define or update a network filter from an XML file
          nwfilter-undefine              undefine a network filter
          nwfilter-dumpxml               network filter information in XML
          nwfilter-list                  list network filters
          nwfilter-edit                  edit XML configuration for a network filter
      
      Each group has a help keyword, e.g.
      
      % ./tools/virsh help filter
       Network Filter (help keyword 'filter'):
          nwfilter-define                define or update a network filter from an XML file
          nwfilter-undefine              undefine a network filter
          nwfilter-dumpxml               network filter information in XML
          nwfilter-list                  list network filters
          nwfilter-edit                  edit XML configuration for a network filter
      
      * tools/virsh.c:
        - introduce new struct "vshCmdGrp" and macros to define the groups.
        - split previous array "commands" into small arrays which are orgnized
          by group
        - changed some functions, e.g. "vshCmdDefSearch"
        - Added new functions, e.g. "vshCmdGrpSearch"
        - commands of each group are in "alphabetical order" now.
        - command groups are in "alphabetical order" now.
        - the commands are categorized with reference of
          http://wiki.libvirt.org/page/VirshHelpV2 (by Justin)
        - the modifications doesn't affect tests
      
      * TODO:
        - doc
      78290527
  13. 25 11月, 2010 1 次提交
    • E
      maint: prohibit most uses of xmlGetProp · 416c09bc
      Eric Blake 提交于
      Making this change makes it easier to spot the memory leaks
      that will be fixed in the next patch.
      
      * cfg.mk (sc_prohibit_xmlGetProp): New rule.
      * .x-sc_prohibit_xmlGetProp: New exception.
      * Makefile.am (EXTRA_DIST): Ship exception file.
      * tools/virsh.c (cmdDetachInterface, cmdDetachDisk): Adjust
      offenders.
      * src/conf/storage_conf.c (virStoragePoolDefParseSource):
      Likewise.
      * src/conf/network_conf.c (virNetworkDHCPRangeDefParseXML)
      (virNetworkIPParseXML): Likewise.
      416c09bc
  14. 23 11月, 2010 4 次提交
  15. 22 11月, 2010 1 次提交
  16. 19 11月, 2010 2 次提交
  17. 18 11月, 2010 4 次提交
    • E
      build: fix autobuild failures on gcov upgrade · 38afe8f5
      Eric Blake 提交于
      Last time I ran ./autobuild.sh was on F13; and upgrading to F14
      exposed these leftovers due to a newer gcov than what was in the stale
      files, in the form of spurious messages that break 'make check':
      
      +profiling:/home/remote/eblake/libvirt-tmp/tools/virsh-console.gcda:Version mismatch - expected 405R got 404R
      
      and concluding with a bug in the autobuild.sh script itself:
      
      ./autobuild.sh: line 44: test: =: unary operator expected
      
      * autobuild.sh: avoid syntax error on failed test
      * tools/Makefile.am (CLEANFILES): Clean coverage files.
      38afe8f5
    • O
      doc: update virsh manual · ed0b7073
      Osier Yang 提交于
      * tools/virsh.pod (change things like "edit domain.xml" into
        "vi domain.xml", so that it's more clear for user)
      ed0b7073
    • E
      maint: avoid remaining sprintf uses · e8aba782
      Eric Blake 提交于
      * cfg.mk (sc_prohibit_sprintf): New rule.
      (sc_prohibit_asprintf): Avoid false positives.
      * docs/hacking.html.in (Printf-style functions): Document the
      policy.
      * HACKING: Regenerate.
      * .x-sc_prohibit_sprintf: New exemptions.
      * Makefile.am (syntax_check_exceptions): Ship new file.
      * src/vbox/vbox_tmpl.c (vboxStartMachine, vboxAttachUSB): Use
      virAsprintf instead.
      * src/uml/uml_driver.c (umlOpenMonitor): Use snprintf instead.
      * tools/virsh.c (cmdDetachInterface): Likewise.
      * src/security/security_selinux.c (SELinuxGenSecurityLabel):
      Likewise.
      * src/openvz/openvz_driver.c (openvzDomainDefineCmd): Likewise,
      and ensure large enough buffer.
      e8aba782
    • E
      maint: improve i18n on non-Linux · 981d2cda
      Eric Blake 提交于
      Per the gettext developer:
      http://lists.gnu.org/archive/html/bug-gnu-utils/2010-10/msg00019.html
      http://lists.gnu.org/archive/html/bug-gnu-utils/2010-10/msg00021.html
      
      gettext() doesn't work correctly on all platforms unless you have
      called setlocale().  Furthermore, gnulib's gettext.h has provisions
      for setting up a default locale, which is the preferred method for
      libraries to use gettext without having to call textdomain() and
      override the main program's default domain (virInitialize already
      calls bindtextdomain(), but this is insufficient without the
      setlocale() added in this patch; and a redundant bindtextdomain()
      in this patch doesn't hurt, but serves as a good example for other
      packages that need to bind a second translation domain).
      
      This patch is needed to silence a new gnulib 'make syntax-check'
      rule in the next patch.
      
      * daemon/libvirtd.c (main): Setup locale and gettext.
      * src/lxc/lxc_controller.c (main): Likewise.
      * src/security/virt-aa-helper.c (main): Likewise.
      * src/storage/parthelper.c (main): Likewise.
      * tools/virsh.c (main): Fix exit status.
      * src/internal.h (DEFAULT_TEXT_DOMAIN): Define, for gettext.h.
      (_): Simplify definition accordingly.
      * po/POTFILES.in: Add src/storage/parthelper.c.
      981d2cda
  18. 17 11月, 2010 3 次提交
    • E
      maint: use gnulib configmake rather than open-coding things · 0d5f54bb
      Eric Blake 提交于
      * bootstrap.conf (gnulib_modules): Add configmake.
      * daemon/Makefile.am (libvirtd_CFLAGS): Drop defines provided by
      gnulib.
      * src/Makefile.am (INCLUDES): Likewise.
      * tests/Makefile.am (INCLUDES): Likewise.
      * tools/Makefile.am (virsh_CFLAGS): Likewise.
      * daemon/libvirtd.c (qemudInitPaths, usage, main): Update
      clients.
      * src/cpu/cpu_map.c (CPUMAPFILE): Likewise.
      * src/driver.c (DEFAULT_DRIVER_DIR): Likewise.
      * src/internal.h (_): Likewise.
      * src/libvirt.c (virInitialize): Likewise.
      * src/lxc/lxc_conf.h (LXC_CONFIG_DIR, LXC_STATE_DIR, LXC_LOG_DIR):
      Likewise.
      * src/lxc/lxc_conf.c (lxcCapsInit, lxcLoadDriverConfig):
      Likewise.
      * src/network/bridge_driver.c (NETWORK_PID_DIR)
      (NETWORK_STATE_DIR, DNSMASQ_STATE_DIR, networkStartup): Likewise.
      * src/nwfilter/nwfilter_driver.c (nwfilterDriverStartup):
      Likewise.
      * src/qemu/qemu_conf.c (qemudLoadDriverConfig): Likewise.
      * src/qemu/qemu_driver.c (qemudStartup): Likewise.
      * src/remote/remote_driver.h (LIBVIRTD_PRIV_UNIX_SOCKET)
      (LIBVIRTD_PRIV_UNIX_SOCKET_RO, LIBVIRTD_CONFIGURATION_FILE)
      (LIBVIRT_PKI_DIR): Likewise.
      * src/secret/secret_driver.c (secretDriverStartup): Likewise.
      * src/security/security_apparmor.c (VIRT_AA_HELPER): Likewise.
      * src/security/virt-aa-helper.c (main): Likewise.
      * src/storage/storage_backend_disk.c (PARTHELPER): Likewise.
      * src/storage/storage_driver.c (storageDriverStartup): Likewise.
      * src/uml/uml_driver.c (TEMPDIR, umlStartup): Likewise.
      * src/util/hooks.c (LIBVIRT_HOOK_DIR): Likewise.
      * tools/virsh.c (main): Likewise.
      * docs/hooks.html.in: Likewise.
      0d5f54bb
    • S
      replace last instances of close() · 8e3051af
      Stefan Berger 提交于
      I am replacing the last instances of close() I found with VIR_CLOSE() / VIR_FORCE_CLOSE respectively.
      
      The first part patches virsh, which I missed out on previously.
      
      The 2nd patch I had left out intentionally to look at it more carefully:
      The 'closed' variable could be easily removed since it wasn't used anywhere else. The possible race condition that could result from the filedescriptor being closed and not set to -1 (and possibly let us write into 'something' totally different if the fd was allocated by another thread) seems to be prevented by the qemuMonitorLock() already placed around the code that reads from or writes to the fd. So the change of this code as shown in the patch should not have any side-effects.
      8e3051af
    • O
      virsh: add net-info command · 21f52833
      Osier Yang 提交于
      To list basic information about the network.
      
      * tools/virsh.c
      * tools/virsh.pod
      21f52833
  19. 13 11月, 2010 1 次提交
  20. 12 11月, 2010 2 次提交
    • D
      Fix reference counting bug in virsh console · a9261567
      Daniel P. Berrange 提交于
      The event watches need to be removed before the event loop
      terminates, otherwise they cause a dangling reference to
      be held on the virStreamPtr, which in turns holds a reference
      on virConnectPtr, which in turn causes errors like
      
        "Failed to disconnect from the hypervisor"
      
      * tools/console.c: Remove watches before event loop quits
      * tools/virsh.c: Print out dangling reference count
      a9261567
    • D
      Re-write virsh console to use streams · dad4b5d4
      Daniel P. Berrange 提交于
      This re-writes the 'virsh console' command so that it uses
      the new streams API. This lets it run remotely and/or as a
      non-root user. This requires that virsh be linked against
      the simple event loop from libvirtd in daemon/event.c
      As an added bonus, it can now connect to any console device,
      not just the first one.
      
      * tools/Makefile.am: Link to event.c
      * tools/console.c, tools/console.h: Rewrite to use the
        virDomainOpenConsole() APIs with streams
      * tools/virsh.c: Support choosing the console name
        via --devname $NAME
      dad4b5d4
  21. 11 11月, 2010 1 次提交
    • E
      virsh: supply long option for -V · 51c83a2b
      Eric Blake 提交于
      * tools/virsh.c (vshParseArgv): Use NULL instead of 0 for pointer,
      and symbolic names for has_arg.  Give --version an optional arg.
      (vshUsage): Document this.
      * tools/virsh.pod: Likewise.
      51c83a2b
  22. 10 11月, 2010 1 次提交