]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
conf: make virNodeDevCapData an official type
authorLaine Stump <laine@laine.org>
Fri, 8 May 2015 16:55:00 +0000 (12:55 -0400)
committerLaine Stump <laine@laine.org>
Mon, 18 May 2015 14:22:20 +0000 (10:22 -0400)
commitffc40b63b50ecb2c60fbd27372daf00f71071958
tree98f0711322e94b0db34daf4724e36ee6fff05eb9
parent8e2c5940cdcf3b73e2ebf17acbfcf5d6b8dc6c2f
conf: make virNodeDevCapData an official type

For some reason a union (_virNodeDevCapData) that had only been
declared inside the toplevel struct virNodeDevCapsDef was being used
as an argument to functions all over the place. Since it was only a
union, the "type" attribute wasn't necessarily sent with it. While
this works, it just seems wrong.

This patch creates a toplevel typedef for virNodeDevCapData and
virNodeDevCapDataPtr, making it a struct that has the type attribute
as a member, along with an anonymous union of everything that used to
be in union _virNodeDevCapData. This way we only have to change the
following:

  s/union _virNodeDevCapData */virNodeDevCapDataPtr /

and

  s/caps->type/caps->data.type/

This will make me feel less guilty when adding functions that need a
pointer to one of these.
src/conf/node_device_conf.c
src/conf/node_device_conf.h
src/libxl/libxl_driver.c
src/node_device/node_device_driver.c
src/node_device/node_device_driver.h
src/node_device/node_device_hal.c
src/node_device/node_device_linux_sysfs.c
src/node_device/node_device_udev.c
src/qemu/qemu_driver.c
src/test/test_driver.c
src/xen/xen_driver.c