libhbalinux; Fixes to support non-deprecated sysfs
libhbalinux; Fixes to support non-deprecated sysfs

The current code only supports Linux kennels configured
with deprecated sysfs (CONFIG_SYSFS_DEPRECATED_V2=y).
The sysfs will have symbolic links such as

/sys/class/scsi_device/<hba>:<port>:<tgt>:<lun>/device/block:sdamf
/sys/class/scsi_device/<hba>:<port>:<tgt>:<lun>/device/scsi_generic:sg999

If the system is configured as non-deprecated, sysfs will have

/sys/class/scsi_device/<hba>:<port>:<tgt>:<lun>/device/block/sdamf
/sys/class/scsi_device/<hba>:<port>:<tgt>:<lun>/device/scsi_generic/sg999

This patch is to handle the non-deprecated case.

Signed-off-by: Steve Ma <612489cf8abf061c6c56e41e68c6a79aef67016e@intel.com>

cleech/libhbalinux,cleech/libhbalinux