1. 16 5月, 2014 5 次提交
    • C
      util: fix memory leak in failure path of virCgroupKillRecursiveInternal · d18aa704
      Chen Hanxiao 提交于
      Don't leak keypath when we fail to kill a process
      Signed-off-by: NChen Hanxiao <chenhanxiao@cn.fujitsu.com>
      d18aa704
    • E
      maint: prefer enum over int for virstoragefile structs · b279e52f
      Eric Blake 提交于
      For internal structs, we might as well be type-safe and let the
      compiler help us with less typing required on our part (getting
      rid of casts is always nice).  In trying to use enums directly,
      I noticed two problems in virstoragefile.h that can't be fixed
      without more invasive refactoring: virStorageSource.format is
      used as more of a union of multiple enums in storage volume
      code (so it has to remain an int), and virStorageSourcePoolDef
      refers to pooltype whose enum is declared in src/conf, but where
      src/util can't pull in headers from src/conf.
      
      * src/util/virstoragefile.h (virStorageNetHostDef)
      (virStorageSourcePoolDef, virStorageSource): Use enums instead of
      int for fields of internal types.
      * src/qemu/qemu_command.c (qemuParseCommandLine): Cover all values.
      * src/conf/domain_conf.c (virDomainDiskSourceParse)
      (virDomainDiskSourceFormat): Simplify clients.
      * src/qemu/qemu_driver.c
      (qemuDomainSnapshotCreateSingleDiskActive)
      (qemuDomainSnapshotPrepareDiskExternalBackingInactive)
      (qemuDomainSnapshotPrepareDiskExternalOverlayActive)
      (qemuDomainSnapshotPrepareDiskInternal): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      b279e52f
    • E
      maint: shorten 'TypeType' function names · ab517818
      Eric Blake 提交于
      The VIR_ENUM_DECL/VIR_ENUM_IMPL helper macros already append 'Type'
      to the enum name being converted; it looks silly to have functions
      with 'TypeType' in their name.  Even though some of our enums have
      to have a 'Type' suffix, the corresponding string conversion
      functions do not.
      
      * src/conf/secret_conf.h (VIR_ENUM_DECL): Rename virSecretUsageType.
      * src/conf/storage_conf.h (VIR_ENUM_DECL): Rename
      virStoragePoolAuthType, virStoragePoolSourceAdapterType,
      virStoragePartedFsType.
      * src/conf/domain_conf.c (virDomainDiskDefParseXML)
      (virDomainFSDefParseXML, virDomainFSDefFormat): Update callers.
      * src/conf/secret_conf.c (virSecretDefParseUsage)
      (virSecretDefFormatUsage): Likewise.
      * src/conf/storage_conf.c (virStoragePoolDefParseAuth)
      (virStoragePoolDefParseSource, virStoragePoolSourceFormat):
      Likewise.
      * src/lxc/lxc_controller.c (virLXCControllerSetupLoopDevices):
      Likewise.
      * src/storage/storage_backend_disk.c
      (virStorageBackendDiskPartFormat): Likewise.
      * src/util/virstorageencryption.c (virStorageEncryptionSecretParse)
      (virStorageEncryptionSecretFormat): Likewise.
      * tools/virsh-secret.c (cmdSecretList): Likewise.
      * src/libvirt_private.syms (secret_conf.h, storage_conf.h): Export
      corrected names.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      ab517818
    • E
      maint: use enum typedef for virstorageencryption.h · ea18f8b2
      Eric Blake 提交于
      Continuing the work of consistent enum cleanups; this time in
      virstorageencryption.h.
      
      * src/util/virstorageencryption.h (virStorageEncryptionFormat):
      Convert to typedef, renaming to avoid collision with function.
      (virStorageEncryptionSecret, virStorageEncryption): Directly use
      enums.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      ea18f8b2
    • E
      vbox: fix stale comment about vdi storage type · 3e44cf7f
      Eric Blake 提交于
      The code had some todo's about adding 'vdi' to the list of
      virStorageType, but we've already done that.
      
      * src/vbox/vbox_tmpl.c (vboxStorageVolCreateXML)
      (vboxStorageVolGetXMLDesc): Use enum value for vdi type.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      3e44cf7f
  2. 15 5月, 2014 10 次提交
  3. 14 5月, 2014 8 次提交
  4. 13 5月, 2014 16 次提交
  5. 12 5月, 2014 1 次提交