[libvirt] Issue with GVirDomainDisk setters

Zeeshan Ali (Khattak) zeeshanak at gnome.org
Wed Dec 28 00:34:34 UTC 2011

Hi Christophe,
   I just found out a small issue in GVirDomainDisk setter functions:
they always add a new attribute on each call rather than overriding
existing value. For example this Vala code:

        disk.set_guest_device_type (DomainDiskGuestDeviceType.DISK);
        disk.set_target_dev ("sdb");
        disk.set_guest_device_type (DomainDiskGuestDeviceType.FLOPPY);
        disk.set_target_dev ("fd");

Will generate following XML:

    <disk type="file" device="disk" device="floppy">
      <target dev="sdb" dev="fd"/>


Zeeshan Ali (Khattak)
FSF member#5124

More information about the libvir-list mailing list