You need to sign in or sign up before continuing.
  • J
    nodedev: Return the parent for a virNodeDevicePtr struct · 4337bc57
    John Ferlan 提交于
    When the 'parent' was added to the virNodeDevicePtr structure
    by commit id 'e8a4ea75' the 'parent' field was not properly filled
    in when a virGetNodeDevice call was made within driver/config code.
    Only the device name was ever filled in. Fetching the parent required
    a second trip via virNodeDeviceGetParent into the node device lookup
    code was required in order to retrieve the specific parent field (and
    still the parent field was never filled in although it was free'd).
    
    Since we have the data when we initially call virGetNodeDevice from
    within driver/node_config code - let's just fill in the parent field
    as well for anyone that wants it without requiring another trip into
    the node_device lookup just to get the parent.
    
    This will allow API's such as virConnectListAllNodeDevices,
    virNodeDeviceLookupByName, and virNodeDeviceLookupSCSIHostByWWN
    to retrieve both name and parent in the returned virNodeDevicePtr.
    Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
    4337bc57
node_device_conf.c 71.8 KB