• E
    maint: reset error on entrance to public API · f06d55da
    Eric Blake 提交于
    We document that calling any public API wipes out all prior
    libvirt errors in the same thread; but weren't obeying this
    style in a few functions.
    
    There are a couple of nested uses of virConnectRef (in lxc
    and qemu reboot paths), but they should not be affected by
    this change in semantics since there should not be any
    previous error getting nuked (a later patch will clean up
    the nested calls, along with abuse of virConnectClose on
    cleanup paths which DOES nuke errors).
    
    * src/libvirt.c (virGetVersion, virConnectRef, virDomainRef)
    (virDomainGetSecurityLabel, virDomainGetSecurityLabelList)
    (virDomainSetMetadata, virDomainGetMetadata)
    (virNodeGetSecurityModel, virNetworkRef, virInterfaceRef)
    (virStoragePoolRef, virStorageVolRef, virNodeDeviceGetName)
    (virNodeDeviceRef, virSecretRef, virStreamRef, virNWFilterRef)
    (virDomainSnapshotRef): Reset error on entrance.
    (do_open): Drop redundant error reset.
    * src/libvirt-qemu.c (virDomainQemuAgentCommand): Likewise.
    * src/libvirt-lxc.c (virDomainLxcEnterNamespace)
    (virDomainLxcEnterSecurityLabel): Likewise.
    Signed-off-by: NEric Blake <eblake@redhat.com>
    f06d55da
libvirt-lxc.c 8.0 KB