]> xenbits.xensource.com Git - libvirt.git/commit
util: eliminate union in virNetDevVPortProfile
authorLaine Stump <laine@laine.org>
Wed, 25 Jul 2012 01:14:41 +0000 (21:14 -0400)
committerLaine Stump <laine@laine.org>
Tue, 14 Aug 2012 19:47:08 +0000 (15:47 -0400)
commit21ea73e8f418b474d4a8dd75239332dd4b378693
treea22db5751d0c2b8e65552b15196407ba6303d219
parent85d9c17d7097ecd8f1259313bea6b7b719c99e5e
util: eliminate union in virNetDevVPortProfile

virNetDevVPortProfile has (had) a type field that can be set to one of
several values, and a union of several structs, one for each
type. When a domain's interface object is of type "network", the
domain config may not know beforehand which type of virtualport is
going to be provided in the actual device handed down from the network
driver at runtime, but may want to set some values in the virtualport
that may or may not be used, depending on the type. To support this
usage, this patch replaces the union of structs with toplevel fields
in the struct, making it possible for all of the fields to be set at
the same time.
src/conf/netdev_vport_profile_conf.c
src/util/virnetdevopenvswitch.c
src/util/virnetdevvportprofile.c
src/util/virnetdevvportprofile.h