1. 03 4月, 2019 17 次提交
  2. 01 4月, 2019 6 次提交
  3. 30 3月, 2019 1 次提交
  4. 29 3月, 2019 4 次提交
  5. 28 3月, 2019 8 次提交
  6. 27 3月, 2019 4 次提交
    • E
      Revert "snapshot: Allow NULL to virDomainSnapshotObjGetDef" · a6d822ce
      Eric Blake 提交于
      This reverts commit 6b90a847.
      
      It turns out gcc -O2 is not happy with it, complaining:
      
      /home/pipo/libvirt/src/qemu/qemu_driver.c: In function 'qemuDomainSnapshotCreateXML':
      /home/pipo/libvirt/src/qemu/qemu_driver.c:15389:26: error: potential null pointer dereference [-Werror=null-dereference]
           bool memory = snapdef->memory == VIR_DOMAIN_SNAPSHOT_LOCATION_EXTERNAL;
                         ~~~~~~~^~~~~~~~
      /home/pipo/libvirt/src/qemu/qemu_driver.c:15389:26: error: potential null pointer dereference [-Werror=null-dereference]
      In file included from /home/pipo/libvirt/src/util/virbuffer.h:27,
                       from /home/pipo/libvirt/src/conf/capabilities.h:27,
                       from /home/pipo/libvirt/src/conf/domain_conf.h:32,
                       from /home/pipo/libvirt/src/qemu/qemu_agent.h:26,
                       from /home/pipo/libvirt/src/qemu/qemu_driver.c:40:
      /home/pipo/libvirt/src/util/viralloc.h:125:34: error: potential null pointer dereference [-Werror=null-dereference]
       # define VIR_ALLOC_N(ptr, count) virAllocN(&(ptr), sizeof(*(ptr)), (count), true, \
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                  VIR_FROM_THIS, __FILE__, __FUNCTION__, __LINE__)
                                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /home/pipo/libvirt/src/qemu/qemu_driver.c:15103:9: note: in expansion of macro 'VIR_ALLOC_N'
           if (VIR_ALLOC_N(ret, snapdef->ndisks) < 0)
               ^~~~~~~~~~~
      /home/pipo/libvirt/src/qemu/qemu_driver.c:15798:45: error: null pointer dereference [-Werror=null-dereference]
                   virDomainSnapshotObjGetDef(snap)->memory == VIR_DOMAIN_SNAPSHOT_LOCATION_EXTERNAL) {
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
      
      As the patch simplified one or two callers at the risk of making
      many other callers now candidates to trigger aggressive compiler
      warnings, it isn't worth it.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      a6d822ce
    • E
      snapshot: Refactor qemu to utilize virDomainMoment more · a487890d
      Eric Blake 提交于
      Use the common base class virDomainMoment for iterator callbacks
      related to snapshots from the qemu code, so that when checkpoint
      operations are introduced, they can share the same callbacks.
      
      Simplify the code for qemuDomainSnapshotCurrent by better utilizing
      virDomainMoment helpers.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
      a487890d
    • E
      snapshot: Allow NULL to virDomainSnapshotObjGetDef · 6b90a847
      Eric Blake 提交于
      Doing so can simplify some callers.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
      6b90a847
    • E
      snapshot: Drop pointless function virDomainMomentIsCurrentName · 3d7c683a
      Eric Blake 提交于
      The qemu driver already had a full-blown virDomainMomentObjPtr to
      check against, and the test driver ought to have one since we get
      better error checking that the user passed in a valid object. Removes
      the need for a helper function added in commit commit 4819f54b.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
      3d7c683a
新手
引导
客服 返回
顶部