1. 28 5月, 2013 2 次提交
    • E
      syntax: prefer space after semicolon in for loop · 146ba114
      Eric Blake 提交于
      I noticed several unusual spacings in for loops, and decided to
      fix them up.  See the next commit for the syntax check that found
      all of these.
      
      * examples/domsuspend/suspend.c (main): Fix spacing.
      * python/libvirt-override.c: Likewise.
      * src/conf/interface_conf.c: Likewise.
      * src/security/virt-aa-helper.c: Likewise.
      * src/util/virconf.c: Likewise.
      * src/util/virhook.c: Likewise.
      * src/util/virlog.c: Likewise.
      * src/util/virsocketaddr.c: Likewise.
      * src/util/virsysinfo.c: Likewise.
      * src/util/viruuid.c: Likewise.
      * src/vbox/vbox_tmpl.c: Likewise.
      * src/xen/xen_hypervisor.c: Likewise.
      * tools/virsh-domain-monitor.c (vshDomainStateToString): Drop
      default case, to let compiler check us.
      * tools/virsh-domain.c (vshDomainVcpuStateToString): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      146ba114
    • Y
      util: fix the VIR_STRDUP when src is NULL · 2da3bc64
      yangdongsheng 提交于
      When src is NULL, VIR_STRDUP will return 0 directly.
      This patch will set dest to NULL before VIR_STRDUP return.
      
      Example:
      [root@yds-pc libvirt]# virsh
      Welcome to virsh, the virtualization interactive terminal.
      
      Type: 'help' for help with commands
      'quit' to quit
      
      virsh # connect
      error: Failed to connect to the hypervisor
      error: internal error Unable to parse URI �N�*
      Signed-off-by: Nyangdongsheng <yangds.fnst@cn.fujitsu.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      2da3bc64
  2. 27 5月, 2013 1 次提交
  3. 25 5月, 2013 2 次提交
    • S
      qemu: save domain state to XML after reboot · 2697c8a1
      Sergey Fionov 提交于
      Currently qemuDomainReboot() does reboot in two phases:
      qemuMonitorSystemPowerdown() and qemuProcessFakeReboot().
      
      qemuMonitorSystemPowerdown() shutdowns the domain and saves domain
      state/reason as VIR_DOMAIN_SHUTDOWN_UNKNOWN.
      
      qemuProcessFakeReboot() sets domain state/reason to
      VIR_DOMAIN_RESUMED_UNPAUSED but does not save domain state changes.
      
      Subsequent restart of libvirtd leads to restoring domain state/reason to
      saved that is VIR_DOMAIN_SHUTDOWN_UNKNOWN and to automatic shutdown of
      the domain. This commit adds virDomainSaveStatus() into
      qemuProcessFakeReboot() to avoid unexpected shutdowns.
      2697c8a1
    • M
      esx: Fix dynamic VI object type detection · befc36a8
      Matthias Bolte 提交于
      VI objects support inheritance with subtype polymorphism. For example the
      FileInfo object type is extended by FloppyImageFileInfo, FolderFileInfo
      etc. Then SearchDatastore_Task returns an array of FileInfo objects and
      depending on the represented file the FileInfo is actually a FolderFileInfo
      or FloppyImageFileInfo etc. The actual type information is stored as XML
      attribute that allows clients such as libvirt to distinguish between the
      actual types. esxVI_GetActualObjectType is used to extract the actual type.
      
      I assumed that this mechanism would be used for all VI object types that
      have subtypes. But this is not the case. It seems only to be used for types
      that are actually used as generic base type such as FileInfo. But it is not
      used for types that got extended later such as ElementDescription that was
      extended by ExtendedElementDescription (added in vSphere API 4.0) or that
      are not meant to be used with subtype polymorphism.
      
      This breaks the deserialization of types that contain ElementDescription
      properties such as PerfCounterInfo or ChoiceOption, because the code
      expects an ElementDescription object to have an XML attribute named type
      that is not present, since ExtendedElementDescription was added to the
      esx_vi_generator.input in commit 60f0f55e.
      This in turn break virtual machine question handling and auto answering.
      
      Fix this by using the base type if no XML type attribute is present.
      befc36a8
  4. 24 5月, 2013 17 次提交
  5. 23 5月, 2013 17 次提交
  6. 22 5月, 2013 1 次提交