lsm_disk_list(3)
π lsm_disk_list β from the Libstoragemgmt C API Manual, bestie π
Okay so hi, welcome, this is lsm_disk_list(3) and she's the moment. She's a C API function and she gets you a whole list of disks on this connection. Iconic behaviour, no notes. Let's get into it π¦
β¨ SYNOPSIS β¨
int lsm_disk_list (lsm_connect *conn, const char *search_key, const char
*search_value, lsm_disk **disks[], uint32_t *count, lsm_flag flags);
π ARGUMENTS π
connβ a validlsm_connectpointer, bestie. Gotta be valid or we're not doing this.search_keyβ your search key, orNULLif you want everything (yes, all of it, she's generous). The valid search keys are:"id","system_id".search_valueβ the value you're searching for. Matching key + matching value, that's the vibe.disks[]β output pointer to anlsm_diskarray. Heads up: you have to free this yourself withlsm_disk_record_array_free. She does not clean up after herself, that's on you πcountβ output pointer ofuint32_t. It's the number of disks. The math. The tally. The headcount π«Άflagsβ reserved for future use, so it must beLSM_CLIENT_FLAG_RSVD. Don't get creative, okay?
πΈ VERSION πΈ
1.0 β she's been here, she's been serving β¨
π DESCRIPTION π
Gets a list of disks on this connection. That's it, that's the whole gig, and she ate.
Once you've got your disks, the disk properties can be retrieved with these functions β collect them all like little PokΓ©mon:
lsm_disk_id_getlsm_disk_name_getlsm_disk_system_id_getlsm_disk_type_getlsm_disk_number_of_blocks_getlsm_disk_block_size_getlsm_disk_status_getlsm_disk_location_getlsm_disk_rpm_getlsm_disk_link_type_getlsm_disk_vpd83_get
π CAPABILITY π
LSM_CAP_DISKS
That's the capability check, bestie. She needs it, she has it. Periodt.
π₯ RETURN π₯
The return value is an error code as enumerated by lsm_error_number. Let's go through them one by one because we're thorough in this household:
LSM_ERR_OK- On success, or when the searched value just isn't found. Either way we're chilling π§
LSM_ERR_INVALID_ARGUMENT- When any argument is
NULL, or the flags are invalid, or the search key is invalid. Read the rules, babe.
- When any argument is
LSM_ERR_NO_SUPPORT- Not supported. It's giving sorry-not-sorry π
Lowkey the main takeaway: validconn, valid search key,LSM_CLIENT_FLAG_RSVDforflags, and free your array. That's the whole vibe check. iykyk π
And that's the page, bestie! This was lsm_disk_list from the lsm_disk_list(3) manual, February 2026 edition β mwah, slay, go forth and list those disks ππβ¨
π¦ 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