lsm_local_disk_link_type_get(3) | Libstoragemgmt C API Manual | lsm_local_disk_link_type_get(3) |
NAME¶
lsm_local_disk_link_type_get - Query disk link type.
SYNOPSIS¶
int lsm_local_disk_link_type_get (const char *disk_path, lsm_disk_link_type *link_type, lsm_error **lsm_err);
ARGUMENTS¶
VERSION¶
1.3
DESCRIPTION¶
Query the disk link type of specified disk path. For SATA disks connected to SAS SES enclosure, will return LSM_SCSI_LINK_TYPE_ATA. Require permission to open /dev/sdX(root user or disk group).
Possible value of lsm_disk_link_type:
* LSM_DISK_LINK_TYPE_UNKNOWN
When error or unknown.
* LSM_DISK_LINK_TYPE_FC
Fibre Channel.
* LSM_DISK_LINK_TYPE_SSA
Serial Storage Architecture, Old IBM tech.
* LSM_DISK_LINK_TYPE_SBP
Serial Bus Protocol, used by IEEE 1394.
* LSM_DISK_LINK_TYPE_SRP
SCSI RDMA Protocol.
* LSM_DISK_LINK_TYPE_ISCSI
Internet Small Computer System Interface.
* LSM_DISK_LINK_TYPE_SAS
Serial Attached SCSI.
* LSM_DISK_LINK_TYPE_ADT
Automation/Drive Interface Transport Protocol, often used by Tape.
* LSM_DISK_LINK_TYPE_ATA
PATA/IDE or SATA.
* LSM_DISK_LINK_TYPE_USB
USB disk.
* LSM_DISK_LINK_TYPE_SOP
SCSI over PCI-E.
* LSM_DISK_LINK_TYPE_PCIE
PCI-E, e.g. NVMe.
RETURN¶
Error code as enumerated by 'lsm_error_number':
* LSM_ERR_OK
On success.
* LSM_ERR_INVALID_ARGUMENT
When any argument is NULL
* LSM_ERR_NO_MEMORY
When no memory.
* LSM_ERR_LIB_BUG
When something unexpected happens.
* LSM_ERR_NOT_FOUND_DISK
When provided disk path not found.
* LSM_ERR_PERMISSION_DENIED
Insufficient permission to access provided disk path.
lsm_local_disk_link_type_get | May 2019 |