• L
    util: change virPCIGetNetName() to not return error if device has no net name · d6ee56d7
    Laine Stump 提交于
    ...and cleanup the callers to report it when it *is* an error.
    
    In many cases It's useful for virPCIGetNetName() to not log an error
    and simply return a NULL pointer when the given device isn't bound to
    a net driver (e.g. we're looking at a VF that is permanently bound to
    vfio-pci). The existing code would silently return an error in this
    case, which could eventually lead to the dreaded "An error occurred
    but the cause is unknown" log message.
    
    This patch changes virPCIGetNetName() to still return success if the
    device simply isn't bound to a net driver, and adjusts all the callers
    that require a non-null netname to check for that condition and log an
    error when it happens.
    d6ee56d7
virpci.c 86.4 KB