]> xenbits.xensource.com Git - libvirt.git/commit
nodedev: Refactor the helpers
authorOsier Yang <jyang@redhat.com>
Mon, 7 Jan 2013 17:05:31 +0000 (01:05 +0800)
committerOsier Yang <jyang@redhat.com>
Mon, 25 Mar 2013 12:46:05 +0000 (20:46 +0800)
commit4360a098441ffca5603543eeaeae2e397879113f
tree5215de7ae6063af639f25f0e759733ab012dece6
parentd91f7dec466bb086900165b86b2e2ac5bcef67f5
nodedev: Refactor the helpers

This adds two util functions (virIsCapableFCHost and virIsCapableVport),
and rename helper check_fc_host_linux as detect_scsi_host_caps,
check_capable_vport_linux is removed, as it's abstracted to the util
function virIsCapableVport. detect_scsi_host_caps nows detect both
the fc_host and vport_ops capabilities. "stat(2)" is replaced with
"access(2)" for saving.

* src/util/virutil.h:
  - Declare virIsCapableFCHost and virIsCapableVport
* src/util/virutil.c:
  - Implement virIsCapableFCHost and virIsCapableVport
* src/node_device/node_device_linux_sysfs.c:
  - Remove check_capable_vport_linux
  - Rename check_fc_host_linux as detect_scsi_host_caps, and refactor
    it a bit to detect both fc_host and vport_os capabilities
* src/node_device/node_device_driver.h:
  - Change/remove the related declarations
* src/node_device/node_device_udev.c: (Use detect_scsi_host_caps)
* src/node_device/node_device_hal.c: (Likewise)
* src/node_device/node_device_driver.c (Likewise)
src/libvirt_private.syms
src/node_device/node_device_driver.c
src/node_device/node_device_driver.h
src/node_device/node_device_hal.c
src/node_device/node_device_linux_sysfs.c
src/node_device/node_device_udev.c
src/util/virutil.c
src/util/virutil.h