lsm_local...status_get(3)
π lsm_local_disk_led_status_get π
okay bestie, welcome to the Libstoragemgmt C API Manual β yes this is a section 3 page, we're in library-call territory, and we're about to get your disk's LED situation fully figured out. no cap. β¨
πΈ NAME πΈ
lsm_local_disk_led_status_get β the girl whose whole job is querying disk LED status. that's it. that's the function. π
π SYNOPSIS π
int lsm_local_disk_led_status_get (const char *disk_path, uint32_t
*led_status, lsm_error **lsm_err);
π¦ ARGUMENTS π¦
disk_pathβ aString, bestie. it's the path of the disk, like for example"/dev/sdb". yeah, that kind of path. πled_statusβ output pointer ofuint32_t. heads up: this is a bit sensitive field. not like emotionally sensitive (though honestly, same), we mean bit-sensitive. πlsm_errβ output pointer oflsm_error. if something goes sideways, you can pull the error message out withlsm_error_message_get, and when you're done with it you gotta free that memory withlsm_error_free. don't leave it hanging, it's giving rude. π
β VERSION β
1.4 β periodt.
β¨ DESCRIPTION β¨
So what does this actually do? It queries the disk LED status of the disk path you specified. simple, iconic, main character energy. π«Ά
lowkey important: you need permission to open that specified disk path β think root user or the disk group. if you don't have it, that's a whole vibe check you're gonna fail.
and now, the moment you've been waiting for β the led_status output is a bit sensitive field, and here's every bit it can be:
LSM_DISK_LED_STATUS_UNKNOWNLSM_DISK_LED_STATUS_IDENT_ONLSM_DISK_LED_STATUS_IDENT_OFFLSM_DISK_LED_STATUS_IDENT_UNKNOWNLSM_DISK_LED_STATUS_FAULT_ONLSM_DISK_LED_STATUS_FAULT_OFFLSM_DISK_LED_STATUS_FAULT_UNKNOWN
that's the whole list, no crumbs left behind. π
π₯ RETURN π₯
The return value is an error code, enumerated by 'lsm_error_number'. here's every single one, and yes, we're doing all of them:
LSM_ERR_OK- On success. slay. β¨
LSM_ERR_INVALID_ARGUMENT- When any argument is NULL. bestie, don't do that.
LSM_ERR_LIB_BUG- When something unexpected happens. π
LSM_ERR_NOT_FOUND_DISK- When provided disk path not found. it's just⦠not there.
LSM_ERR_PERMISSION_DENIED- Insufficient permission to access provided disk path. we talked about this. π
LSM_ERR_NO_SUPPORT- Action is not supported. not every disk wants to be perceived, and that's valid.
and that's the whole page, bestie!! go forth and query those LEDs responsibly. π§
signing off from the February 2026 edition of lsm_local_disk_led_status_get, aka lsm_local...status_get(3) β mwah, love u, 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