1. 28 8月, 2013 1 次提交
    • J
      virsh: free the list from ListAll APIs even for 0 items · f733eac0
      Ján Tomko 提交于
      virsh secret-list leak when no secrets are defined:
      
      ==27== 8 bytes in 1 blocks are definitely lost in loss record 6 of 726
      ==27==    by 0x4E941DD: virAllocN (viralloc.c:183)
      ==27==    by 0x5037F1A: remoteConnectListAllSecrets (remote_driver.c:3076)
      ==27==    by 0x5004EC6: virConnectListAllSecrets (libvirt.c:16298)
      ==27==    by 0x15F813: vshSecretListCollect (virsh-secret.c:397)
      ==27==    by 0x15F0E1: cmdSecretList (virsh-secret.c:532)
      
      And so do some other *-list commands.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1001536
      f733eac0
  2. 20 8月, 2013 1 次提交
    • P
      virsh: modify vshStringToArray to duplicate the elements too · d64af6ce
      Peter Krempa 提交于
      At a slightly larger memory expense allow stealing of items from the
      string array returned from vshStringToArray and turn the result into a
      string list compatible with virStringSplit. This will allow to use the
      common dealloc function.
      
      This patch also fixes a few forgotten checks of return from
      vshStringToArray and one memory leak.
      d64af6ce
  3. 12 7月, 2013 1 次提交
    • J
      virsh-nodedev: Resolve Coverity issues · f926804a
      John Ferlan 提交于
      Recent changes uncovered FORWARD_NULL and NEGATIVE_RETURNS problems with
      the processing of the 'ndevices' and its associated allocated arrays in
      'vshNodeDeviceListCollect' due to the possibility of returning -1 in a
      call and using the returned value as a for loop index end condition.
      f926804a
  4. 11 7月, 2013 1 次提交
  5. 27 6月, 2013 1 次提交
  6. 18 6月, 2013 1 次提交
  7. 21 5月, 2013 1 次提交
  8. 11 5月, 2013 1 次提交
    • L
      util: move virFile* functions from virutil.c to virfile.c · bfe7721d
      Laine Stump 提交于
      These all existed before virfile.c was created, and for some reason
      weren't moved.
      
      This is mostly straightfoward, although the syntax rule prohibiting
      write() had to be changed to have an exception for virfile.c instead
      of virutil.c.
      
      This movement pointed out that there is a function called
      virBuildPath(), and another almost identical function called
      virFileBuildPath(). They really should be a single function, which
      I'll take care of as soon as I figure out what the arglist should look
      like.
      bfe7721d
  9. 02 5月, 2013 1 次提交
    • M
      virutil: Move string related functions to virstring.c · 7c9a2d88
      Michal Privoznik 提交于
      The source code base needs to be adapted as well. Some files
      include virutil.h just for the string related functions (here,
      the include is substituted to match the new file), some include
      virutil.h without any need (here, the include is removed), and
      some require both.
      7c9a2d88
  10. 26 4月, 2013 1 次提交
    • L
      virsh: use new virNodeDeviceDetachFlags · d923f6c8
      Laine Stump 提交于
      The virsh nodedev-detach command has a new --driver option. If it's
      given virsh will attempt to use the new virNodeDeviceDetachFlags API
      instead of virNodeDeviceDettach. Validation of the driver name string
      is left to the hypervisor (qemu accepts "kvm" or "vfio". The only
      other hypervisor that implements these functions is xen, and it only
      accepts NULL).
      d923f6c8
  11. 25 3月, 2013 1 次提交
  12. 15 3月, 2013 1 次提交
    • M
      Cleanup useless flags specifications · 73cc87d1
      Martin Kletzander 提交于
      After we switched to C99 initialization, I noticed there were many
      places where the specification of .flags parameter differed.  After
      going through many options and deciding whether to unify the
      initialization to be '.flags = 0' or '.flags = VSH_OFLAG_NONE', I
      realized both can be removed and it makes the code easier to go
      through.
      73cc87d1
  13. 13 2月, 2013 2 次提交
  14. 12 2月, 2013 1 次提交
    • O
      virsh: Use virNodeDeviceLookupSCSIHostByWWN · 9be20184
      Osier Yang 提交于
      Only nodedev-destroy and nodedev-dumpxml can benifit from the
      new API, other commands like nodedev-detach only works for
      PCI devices, WWN makes no sense for them.
      9be20184
  15. 04 2月, 2013 2 次提交
  16. 17 1月, 2013 1 次提交
  17. 21 12月, 2012 4 次提交
  18. 02 11月, 2012 1 次提交
  19. 21 9月, 2012 1 次提交
  20. 17 9月, 2012 1 次提交
    • O
      list: Use virConnectListAllNodeDevices in virsh · aa20e975
      Osier Yang 提交于
      tools/virsh-nodedev.c:
        * vshNodeDeviceSorter to sort node devices by name
      
        * vshNodeDeviceListFree to free the node device objects list.
      
        * vshNodeDeviceListCollect to collect the node device objects, trying
          to use new API first, fall back to older APIs if it's not supported.
      
        * Change option --cap to accept multiple capability types.
      
      tools/virsh.pod
        * Update document for --cap
      aa20e975
  21. 31 8月, 2012 1 次提交
  22. 21 8月, 2012 1 次提交
    • E
      virsh: split out virsh-nodedev.c · ea3cf921
      Eric Blake 提交于
      Another worthwhile split, needed one more public function.
      
      * tools/virsh-nodedev.h: New file.
      * tools/Makefile.am (virsh_SOURCES): Build it.
      * tools/virsh-nodedev.c: Use new header.
      * tools/virsh.c: Likewise.
      (vshTreePrint): Export.
      * tools/virsh.h (vshTreePrint): Declare.
      ea3cf921
  23. 20 8月, 2012 1 次提交
    • E
      virsh: use common namespacing · e68ee5e7
      Eric Blake 提交于
      Convert the exported items in virsh.h to use a common 'vsh' prefix.
      
      * tools/virsh.h (VIRSH_MAX_XML_FILE): Rename...
      (VSH_MAX_XML_FILE): ...and parenthesize.
      (DIFF_MSEC, CTRL_CLOSE_BRACKET): Delete.
      (vshUsage, vshInit, vshDeinit, vshParseArgv): Remove prototype.
      (editWriteToTempFile, editFile, editReadBackFile, prettyCapacity)
      (virshReportError): Rename...
      (vshEditWriteToTempFile, vshEditFile, vshEditReadBackFile)
      (vshPrettyCapacity, vshReportError): ...into vsh namespace.
      (jobWatchTimeoutFunc): Move to virsh-domain.c.
      * tools/virsh.c (vshCommandRun): Inline former DIFF_MSEC.
      (main): Inline former CTRL_CLOSE_BRACKET.
      (vshUsage, vshInit, vshDeinit, vshParseArgv): Make static.
      (prettyCapacity, virshReportError, editWriteToTempFile, editFile):
      Fix naming, and adjust usage.
      (vshAskReedit, vshCommandRun, vshEventLoop, vshInit): Adjust
      usage.
      * tools/virsh-domain.c (cmdAttachDevice, cmdCPUCompare)
      (cmdCPUBaseline, cmdCreate, cmdDefine, cmdDetachDevice)
      (cmdUpdateDevice, cmdDesc, cmdUndefine, cmdStart, cmdVcpucount)
      (cmdAttachDevice, cmdDomjobinfo): Likewise.
      * tools/virsh-edit.c (do): Likewise.
      * tools/virsh-interface.c (cmdInterfaceDefine): Likewise.
      * tools/virsh-network.c (cmdNetworkCreate, cmdNetworkDefine):
      Likewise.
      * tools/virsh-nodedev.c (cmdNodeDeviceCreate): Likewise.
      * tools/virsh-nwfilter.c (cmdNWFilterDefine): Likewise.
      * tools/virsh-pool.c (cmdPoolCreate, cmdPoolDefine)
      (cmdPoolDiscoverSources, cmdPoolList): Likewise.
      * tools/virsh-secret.c (cmdSecretDefine): Likewise.
      * tools/virsh-snapshot.c (cmdSnapshotCreate, vshSnapshotCreate)
      (vshLookupSnapshot, cmdSnapshotEdit, cmdSnapshotCurrent)
      (vshGetSnapshotParent): Likewise.
      * tools/virsh-volume.c (cmdVolCreate, cmdVolCreateFrom)
      (cmdVolInfo, cmdVolList): Likewise.
      e68ee5e7
  24. 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 in node device group from virsh.c · 49989d70
      Osier Yang 提交于
      Commands in node device group moved from virsh.c to virsh-nodedev.c,
      
      * virsh.c: Remove commands in node device group.
      * virsh-nodedev.c: New file, filled with commands in node device group
      * po/POTFILES.in: Add virsh-nodedev.c
      * cfg.mk: Skip to check config.h including for virsh-nodedev.c
      49989d70