lsm_local..._type_get(3)
β¨ lsm_local_disk_link_type_get β query disk link type β¨
okay bestie, welcome to the lsm_local..._type_get(3) page π this one is short, sweet, and literally just asks the kernel "hey girl, what kind of link is this disk on?" let's get into it π¦
πΈ SYNOPSIS πΈ
int lsm_local_disk_link_type_get (const char *disk_path,
lsm_disk_link_type *link_type, lsm_error **lsm_err);
π ARGUMENTS π
disk_pathβ a String, bestie. it's the path of the disk, like"/dev/sdb". that's the vibe.link_typeβ output pointer oflsm_disk_link_type. this is where the answer gets dropped off π«Άlsm_errβ output pointer oflsm_error. the error message can be retrieved vialsm_error_message_get, and the memory should be freed bylsm_error_free. don't forget to free it, that's the rule π
β VERSION β
1.3
π DESCRIPTION π
So what does this even do? it queries the disk link type of the specified disk path. no cap, that's it.
For SATA disks connected to SAS SES enclosure, it will return LSM_SCSI_LINK_TYPE_ATA. noted π
β οΈ heads up: this requires permission to open /dev/sdX β so root user or disk group, periodt. no permission, no tea β
here's the possible value of lsm_disk_link_type, and honestly it's giving encyclopedia but make it cute π§:
LSM_DISK_LINK_TYPE_UNKNOWNβ when error or unknown. the "idk her" option πLSM_DISK_LINK_TYPE_FCβ Fibre Channel.LSM_DISK_LINK_TYPE_SSAβ Serial Storage Architecture, Old IBM tech. vintage icon π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. the fast one π₯
π₯ RETURN π₯
the error code comes back as enumerated by lsm_error_number, and here's the whole menu:
LSM_ERR_OKβ On success. we ate π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. π
and that's the whole page, bestie π«Ά this was the lsm_local_disk_link_type_get page from the Libstoragemgmt C API Manual, dated February 2026, and the man page itself lives in section 3 as lsm_local..._type_get(3). go query some disks, drink water, and free your lsm_error πβ¨π
π¦ where this page comes from
- fedora 43: libstoragemgmt-devel 1.10.3-1.fc43 Β· LGPL-2.1-or-later
- fedora 44: libstoragemgmt-devel 1.10.3-1.fc44 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms