lsm_local...al_num_get(3)
β¨ NAME β¨
lsm_local_disk_serial_num_get β bestie, we're getting the serial number π
π SYNOPSIS π
int lsm_local_disk_serial_num_get (const char *disk_path, char
**serial_num, lsm_error **lsm_err);
πΈ ARGUMENTS πΈ
disk_pathβ String, and it's literally the path of the disk path, like"/dev/sdb". Yes, the manpage says "path of disk path", we don't make the rules, we just pass them along π«Άserial_numβ Output pointer of the SCSI VPD80 serial number. It'sNULLwhen there's an error. And the memory? Should be freed byfree, no cap.lsm_errβ Output pointer oflsm_error. You can grab the error message vialsm_error_message_get, and the memory should be freed bylsm_error_free. Clean up after yourself, queen π
π VERSION π
1.4 β¨
π¦ DESCRIPTION π¦
So the whole vibe here is: you query the serial number of a specified disk path. That's the moment. π
And for SCSI/SAS/SATA/ATA disks specifically, it will be extracted from the SCSI VPD 0x80 page. That's where the tea lives, iykyk π
π₯ RETURN π₯
Error code as enumerated by lsm_error_number:
LSM_ERR_OKβ On success or not found. Yeah, "or not found" is right there, don't @ me πLSM_ERR_INVALID_ARGUMENTβ When any argument isNULL.LSM_ERR_NO_MEMORYβ When no memory. πLSM_ERR_LIB_BUGβ When something unexpected happens. The library is giving... unhinged πLSM_ERR_NOT_FOUND_DISKβ When provided disk path not found.
Okay bestie, that's the whole page π Go forth and get those serial numbers, main character energy only π
February 2026 energy, straight out of the Libstoragemgmt C API Manual β slay, bye πππ¦
π¦ 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