[PATCH 0/7] cleanup the input device code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch series is an attempt to make the code for input devices cleaner and
readable and also follow some good practices whit rule that one function should
do only one thing.  We are really bad at this and our code is sometimes really
hard to follow.

Pavel Hrdina (7):
  vmware/vmx: use virDomainDefPostParse after parsing vmx config
  lxc: use virDomainDefPostParse for parsing LXC config string
  xen: use virDomainDefPostParse for parsing XM/XL/SEXPR cofings
  xen: fix timer bug found by updated test
  libxl: copy persistent domain definition while starting a guest
  device: cleanup input device code
  qemu_domain: cleanup default input device code

 src/Makefile.am                                    |  2 +-
 src/conf/domain_conf.c                             | 77 +---------------------
 src/esx/esx_driver.c                               |  4 +-
 src/libxl/libxl_domain.c                           |  8 +++
 src/libxl/libxl_driver.c                           |  8 ++-
 src/lxc/lxc_driver.c                               |  5 +-
 src/lxc/lxc_native.c                               |  8 ++-
 src/lxc/lxc_native.h                               |  4 +-
 src/qemu/qemu_domain.c                             | 47 ++++++++-----
 src/qemu/qemu_domain.h                             |  1 +
 src/qemu/qemu_process.c                            |  3 +
 src/vmware/vmware_conf.c                           |  3 +-
 src/vmware/vmware_driver.c                         |  2 +-
 src/vmx/vmx.c                                      |  5 ++
 src/vmx/vmx.h                                      |  1 +
 src/xen/xen_driver.c                               |  5 +-
 src/xen/xend_internal.c                            | 10 +++
 src/xen/xm_internal.c                              |  2 +-
 src/xenapi/xenapi_driver.c                         |  8 +++
 src/xenconfig/xen_common.c                         | 24 +++++++
 src/xenconfig/xen_common.h                         |  2 +
 src/xenconfig/xen_sxpr.c                           | 18 ++++-
 src/xenconfig/xen_sxpr.h                           |  8 ++-
 src/xenconfig/xen_xl.c                             |  9 ++-
 src/xenconfig/xen_xl.h                             |  4 +-
 src/xenconfig/xen_xm.c                             |  7 +-
 src/xenconfig/xen_xm.h                             |  2 +-
 tests/Makefile.am                                  |  2 +-
 tests/lxcconf2xmldata/lxcconf2xml-blkiotune.xml    |  3 +-
 tests/lxcconf2xmldata/lxcconf2xml-cpusettune.xml   |  3 +-
 tests/lxcconf2xmldata/lxcconf2xml-cputune.xml      |  3 +-
 tests/lxcconf2xmldata/lxcconf2xml-idmap.xml        |  3 +-
 .../lxcconf2xmldata/lxcconf2xml-macvlannetwork.xml |  3 +-
 tests/lxcconf2xmldata/lxcconf2xml-memtune.xml      |  3 +-
 tests/lxcconf2xmldata/lxcconf2xml-nonenetwork.xml  |  3 +-
 tests/lxcconf2xmldata/lxcconf2xml-nonetwork.xml    |  3 +-
 tests/lxcconf2xmldata/lxcconf2xml-physnetwork.xml  |  3 +-
 tests/lxcconf2xmldata/lxcconf2xml-simple.xml       |  3 +-
 tests/lxcconf2xmldata/lxcconf2xml-vlannetwork.xml  |  3 +-
 tests/lxcconf2xmltest.c                            | 18 ++++-
 .../qemuxml2argv-graphics-listen-network.xml       |  2 -
 .../qemuxml2argv-graphics-listen-network2.xml      |  2 -
 .../qemuxml2argv-graphics-sdl-fullscreen.xml       |  2 -
 .../qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml |  2 -
 ...qemuxml2argv-graphics-spice-agent-file-xfer.xml |  1 -
 .../qemuxml2argv-graphics-spice-compression.xml    |  2 -
 .../qemuxml2argv-graphics-spice-listen-network.xml |  1 -
 .../qemuxml2argv-graphics-spice-qxl-vga.xml        |  2 -
 .../qemuxml2argv-graphics-spice-sasl.xml           |  1 -
 .../qemuxml2argv-graphics-spice-timeout.xml        |  2 -
 .../qemuxml2argv-graphics-spice.xml                |  2 -
 .../qemuxml2argv-graphics-vnc-policy.xml           |  2 -
 .../qemuxml2argv-graphics-vnc-sasl.xml             |  2 -
 .../qemuxml2argv-graphics-vnc-socket.xml           |  2 -
 .../qemuxml2argv-graphics-vnc-tls.xml              |  2 -
 .../qemuxml2argv-graphics-vnc-websocket.xml        |  2 -
 .../qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml |  2 -
 .../qemuxml2argv-pci-autoadd-addr.xml              |  1 -
 .../qemuxml2argv-pci-autoadd-idx.xml               |  1 -
 .../qemuxml2argvdata/qemuxml2argv-pseries-disk.xml |  2 +-
 .../qemuxml2xmlout-graphics-listen-network2.xml    |  2 -
 .../qemuxml2xmlout-graphics-spice-timeout.xml      |  2 -
 tests/sexpr2xmldata/sexpr2xml-boot-grub.xml        |  1 +
 tests/sexpr2xmldata/sexpr2xml-bridge-ipaddr.xml    |  1 +
 tests/sexpr2xmldata/sexpr2xml-curmem.xml           |  3 +-
 .../sexpr2xml-disk-block-shareable.xml             |  1 +
 tests/sexpr2xmldata/sexpr2xml-disk-block.xml       |  1 +
 .../sexpr2xml-disk-drv-blktap-qcow.xml             |  1 +
 .../sexpr2xml-disk-drv-blktap-raw.xml              |  1 +
 .../sexpr2xml-disk-drv-blktap2-raw.xml             |  1 +
 tests/sexpr2xmldata/sexpr2xml-disk-file.xml        |  1 +
 tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml      |  5 +-
 tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml  |  5 +-
 tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml    |  5 +-
 tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml  |  5 +-
 tests/sexpr2xmldata/sexpr2xml-fv-kernel.xml        |  1 +
 tests/sexpr2xmldata/sexpr2xml-fv-legacy-vfb.xml    |  2 +
 tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml     |  5 +-
 tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.xml     |  5 +-
 tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml  |  5 +-
 tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml  |  5 +-
 .../sexpr2xml-fv-serial-dev-2-ports.xml            |  5 +-
 .../sexpr2xml-fv-serial-dev-2nd-port.xml           |  5 +-
 tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml   |  5 +-
 tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml   |  5 +-
 tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml   |  5 +-
 tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml    |  5 +-
 tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml  |  5 +-
 .../sexpr2xml-fv-serial-tcp-telnet.xml             |  5 +-
 tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml    |  5 +-
 tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml    |  5 +-
 tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml   |  5 +-
 tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml     |  5 +-
 tests/sexpr2xmldata/sexpr2xml-fv-sound.xml         |  5 +-
 tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml      |  5 +-
 tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml     |  5 +-
 tests/sexpr2xmldata/sexpr2xml-fv-utc.xml           |  5 +-
 tests/sexpr2xmldata/sexpr2xml-fv-v2.xml            |  5 +-
 tests/sexpr2xmldata/sexpr2xml-fv.xml               |  5 +-
 tests/sexpr2xmldata/sexpr2xml-net-bridged.xml      |  1 +
 tests/sexpr2xmldata/sexpr2xml-net-e1000.xml        |  1 +
 tests/sexpr2xmldata/sexpr2xml-net-routed.xml       |  1 +
 tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml  |  5 +-
 tests/sexpr2xmldata/sexpr2xml-pci-devs.xml         |  1 +
 .../sexpr2xml-pv-bootloader-cmdline.xml            |  1 +
 tests/sexpr2xmldata/sexpr2xml-pv-bootloader.xml    |  1 +
 tests/sexpr2xmldata/sexpr2xml-pv-localtime.xml     |  1 +
 tests/sexpr2xmldata/sexpr2xml-pv-vcpus.xml         |  1 +
 .../sexpr2xml-pv-vfb-new-vncdisplay.xml            |  3 +-
 tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml       |  3 +-
 tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.xml      |  3 +-
 .../sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml  |  3 +-
 tests/sexpr2xmldata/sexpr2xml-pv.xml               |  1 +
 tests/sexpr2xmltest.c                              | 10 ++-
 tests/vmx2xmldata/vmx2xml-graphics-vnc.xml         |  2 -
 tests/vmx2xmltest.c                                |  2 +-
 .../test-fullvirt-direct-kernel-boot.xml           |  4 +-
 tests/xlconfigdata/test-fullvirt-multiusb.xml      |  4 +-
 tests/xlconfigdata/test-new-disk.xml               |  5 +-
 tests/xlconfigdata/test-spice-features.xml         |  4 +-
 tests/xlconfigdata/test-spice.xml                  |  4 +-
 tests/xlconfigtest.c                               |  2 +-
 tests/xmconfigdata/test-escape-paths.xml           |  6 +-
 .../xmconfigdata/test-fullvirt-default-feature.xml |  5 +-
 tests/xmconfigdata/test-fullvirt-force-hpet.xml    |  5 +-
 tests/xmconfigdata/test-fullvirt-force-nohpet.xml  |  5 +-
 tests/xmconfigdata/test-fullvirt-localtime.xml     |  5 +-
 tests/xmconfigdata/test-fullvirt-net-ioemu.xml     |  5 +-
 tests/xmconfigdata/test-fullvirt-net-netfront.xml  |  5 +-
 tests/xmconfigdata/test-fullvirt-new-cdrom.xml     |  5 +-
 tests/xmconfigdata/test-fullvirt-old-cdrom.xml     |  5 +-
 tests/xmconfigdata/test-fullvirt-parallel-tcp.xml  |  5 +-
 .../test-fullvirt-serial-dev-2-ports.xml           |  5 +-
 .../test-fullvirt-serial-dev-2nd-port.xml          |  5 +-
 tests/xmconfigdata/test-fullvirt-serial-file.xml   |  5 +-
 tests/xmconfigdata/test-fullvirt-serial-null.xml   |  5 +-
 tests/xmconfigdata/test-fullvirt-serial-pipe.xml   |  5 +-
 tests/xmconfigdata/test-fullvirt-serial-pty.xml    |  5 +-
 tests/xmconfigdata/test-fullvirt-serial-stdio.xml  |  5 +-
 .../test-fullvirt-serial-tcp-telnet.xml            |  5 +-
 tests/xmconfigdata/test-fullvirt-serial-tcp.xml    |  5 +-
 tests/xmconfigdata/test-fullvirt-serial-udp.xml    |  5 +-
 tests/xmconfigdata/test-fullvirt-serial-unix.xml   |  5 +-
 tests/xmconfigdata/test-fullvirt-sound.xml         |  5 +-
 tests/xmconfigdata/test-fullvirt-usbmouse.xml      |  5 +-
 .../test-fullvirt-usbtablet-no-bus.xml             |  4 +-
 tests/xmconfigdata/test-fullvirt-usbtablet.xml     |  5 +-
 tests/xmconfigdata/test-fullvirt-utc.xml           |  5 +-
 tests/xmconfigdata/test-no-source-cdrom.xml        |  5 +-
 tests/xmconfigdata/test-paravirt-net-e1000.xml     |  3 +-
 tests/xmconfigdata/test-paravirt-net-vifname.xml   |  3 +-
 .../test-paravirt-new-pvfb-vncdisplay.xml          |  3 +-
 tests/xmconfigdata/test-paravirt-new-pvfb.xml      |  3 +-
 .../test-paravirt-old-pvfb-vncdisplay.xml          |  3 +-
 tests/xmconfigdata/test-paravirt-old-pvfb.xml      |  3 +-
 tests/xmconfigdata/test-paravirt-vcpu.xml          |  1 +
 tests/xmconfigdata/test-pci-devs.xml               |  5 +-
 tests/xmconfigtest.c                               |  3 +-
 158 files changed, 429 insertions(+), 309 deletions(-)

-- 
2.6.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]