lsm_local...d83_search(3)

πŸ“¦
version 1.10.3 Β· 3 versions
, in fedora 43, fedora 44

πŸ’– lsm_local_disk_vpd83_search β€” bestie edition πŸ’–

ok so this is a page from the Libstoragemgmt C API Manual (section 3, the library-calls girlies), and the function we're obsessing over today is lsm_local_disk_vpd83_search. it lives in lsm_local...d83_search(3) which is just the header being dramatic and truncating itself. anyway. let's get into it ✨


✨ NAME ✨

lsm_local_disk_vpd83_search β€” search disks by VPD83 string. that's it. that's the whole job. she finds disks. πŸ’…


🌸 SYNOPSIS 🌸

int lsm_local_disk_vpd83_search (const char *vpd83, lsm_string_list
**disk_path_list, lsm_error **lsm_err);

look at her. three args, one int return, no notes. πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • vpd83 β€” a String. it's the SCSI VPD 0x83 page NAA type ID, so like, the ✨identity✨ of the disk you're hunting for. ngl this is the main character of the whole function.
  • disk_path_list β€” an output pointer of lsm_string_list. the format of the disk path is gonna look like "/dev/sdb" for SCSI or ATA disks β€” very demure, very classic. it's NULL if nothing was found or if something errored out πŸ™ˆ. also!! the memory here should be freed by lsm_string_list_free. do not forget. i will know.
  • lsm_err β€” an output pointer of lsm_error. you can pull the error message out with lsm_error_message_get, and the memory should be freed by lsm_error_free. free her!! 🫢

πŸ¦‹ VERSION πŸ¦‹

1.3


🌈 DESCRIPTION 🌈

so what she actually does: she searches all the disk paths for the specified SCSI VPD 0x83 page NAA type ID. every single one. no cap.

and here's the slay part β€” for any ATA and other non-SCSI protocol disks that support VPD 0x83 pages NAA ID, their disk path gets included too. so she's inclusive. she doesn't gatekeep. we love that for her. πŸ’–


⭐ RETURN ⭐

error code, as enumerated by lsm_error_number. here's the full menu, bestie:

  • LSM_ERR_OK β€” on success or not found. yes, "not found" is still okay. she's chill like that.
  • LSM_ERR_INVALID_ARGUMENT β€” when any argument is NULL. don't hand her nothing and expect magic. 😭
  • LSM_ERR_NO_MEMORY β€” when no memory. the tragedy.
  • LSM_ERR_LIB_BUG β€” when something unexpected happens. aka the "girl what" error. πŸ’€

lowkey reminder: that disk_path_list memory is yours to free with lsm_string_list_free, and the error memory is yours with lsm_error_free. periodt.

and that's the whole page!! this lil manual page was served up by the Libstoragemgmt C API Manual crew, dated February 2026, filed under lsm_local...d83_search(3). mwah, go search some disks πŸ’…βœ¨

πŸ“¦ where this page comes from