• L
    util: eliminate union in virNetDevVPortProfile · 21ea73e8
    Laine Stump 提交于
    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.
    21ea73e8
netdev_vport_profile_conf.c 9.2 KB