• L
    conf: make hostdev info a separate object · 29293930
    Laine Stump 提交于
    In order to allow for a virDomainHostdevDef that uses the
    virDomainDeviceInfo of a "higher level" device (such as a
    virDomainNetDef), this patch changes the virDomainDeviceInfo in the
    HostdevDef into a virDomainDeviceInfoPtr. Rather than adding checks
    all over the code to check for a null info, we just guarantee that it
    is always valid. The new function virDomainHostdevDefAlloc() allocates
    a virDomainDeviceInfo and plugs it in, and virDomainHostdevDefFree()
    makes sure it is freed.
    
    There were 4 places allocating virDomainHostdevDefs, all of them
    parsers of one sort or another, and those have all had their
    VIR_ALLOC(hostdev) changed to virDomainHostdevDefAlloc(). Other than
    that, and the new functions, all the rest of the changes are just
    mechanical removals of "&" or changing "." to "->".
    29293930
libvirt_private.syms 31.5 KB