On 02/28/2012 01:14 PM, Laine Stump wrote:
This patch is only code movement + adding some forward definitions
of
typedefs.
virDomainHostdevDef (not just a pointer to it, but an actual object)
will be needed in virDomainNetDef and virDomainActualNetDef, so it
must be relocated earlier in the file.
Likewise, virDomainDeviceDef will be needed in virDomainHostdevDef, so
it must be moved up even earlier. This, in turn, creates a forward
reference problem, but fortunately only with pointers to other device
types, so their typedefs can be moved up in the file, eliminating the
problem.
---
V2: aside from the fact that there are now more types of device to
have their definitions/enums relocated, I learned that older versions
of gcc will not allow a duplicate typedef, even if it is identical to
the original, so rather than just copying the device typedefs from
their original locations just above each struct definition, I had to
move them, removing the original.
src/conf/domain_conf.h | 262 ++++++++++++++++++++++++++----------------------
1 files changed, 141 insertions(+), 121 deletions(-)
ACK.
--
Eric Blake eblake(a)redhat.com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org