• E
    conf: store disk source as pointer, for easier manipulation · c123ef71
    Eric Blake 提交于
    As part of the work on backing chains, I'm finding that it would
    be easier to directly manipulate chains of pointers (adding a
    snapshot merely adjusts pointers to form the correct list) rather
    than copy data from one struct to another.  This patch converts
    domain disk source to be a pointer.
    
    In this patch, the pointer is ALWAYS allocated (thanks in part to
    the previous patch forwarding all disk def allocation through a
    common point), and all other changse are just mechanical fallout of
    the new type; there should be no functional change.  It is possible
    that we may want to leave the pointer NULL for a cdrom with no
    medium in a later patch, but as that requires a closer audit of the
    source to ensure we don't fault on a null dereference, I didn't do
    it here.
    
    * src/conf/domain_conf.h (_virDomainDiskDef): Change type of src.
    * src/conf/domain_conf.c: Adjust all clients.
    * src/security/security_selinux.c: Likewise.
    * src/qemu/qemu_domain.c: Likewise.
    * src/qemu/qemu_command.c: Likewise.
    * src/qemu/qemu_conf.c: Likewise.
    * src/qemu/qemu_process.c: Likewise.
    * src/qemu/qemu_migration.c: Likewise.
    * src/qemu/qemu_driver.c: Likewise.
    * src/lxc/lxc_driver.c: Likewise.
    * src/lxc/lxc_controller.c: Likewise.
    * tests/securityselinuxlabeltest.c: Likewise.
    Signed-off-by: NEric Blake <eblake@redhat.com>
    c123ef71
domain_conf.h 84.7 KB