lsm_disk_location_get(3)
β¨ lsm_disk_location_get β¨
okay bestie, welcome to the Libstoragemgmt C API Manual π this one's a lil function called lsm_disk_location_get(3) and it's literally just "where does this disk live" but make it C. short page, big vibes, zero skips. let's go π¦
πΈ NAME πΈ
lsm_disk_location_get β retrieves the location for the disk. that's it. that's the whole job. she finds out where your disk is at, physically, and tells you. main character energy fr π
π SYNOPSIS π
const char * lsm_disk_location_get (lsm_disk *d);
one function, one argument, one const char * coming back at you. chef's kiss π
π ARGUMENTS π
dβ the disk you want the location for. like, which disk are we asking about, bestie? this one. hand her over π«Ά
π VERSION π
1.3 β this is the version. noted, logged, slay β¨
π DESCRIPTION π
retrieve the disk location. you pass in a disk, she hands you back a string describing where that disk is. that's the whole plot, no subplots π
π NOTE π
okay so this part actually matters, listen up:
the address that comes back is valid until lsm_disk gets freed. so if you need it to live longer than that, copy the return value yourself. and do not free the returned string β she's not yours, don't touch her, put it back π
no cap. that's a real footgun. respect the lifetime π
β CAPABILITY β
LSM_CAP_DISK_LOCATION
that's the capability flag that has to be in play for this to work. iykyk π₯
π¦ RETURN π¦
a string. π
and it's NULL if:
- the argument
'd'isNULL, or 'd'isn't a validlsm_diskpointer, or- it's just not supported.
so like. check for NULL. always. no exceptions π
π SEE ALSO π
okay there's genuinely no SEE ALSO section on this page, bestie β nothing else to cross-reference. just you, me, and one very good little function π
that's the whole page!! shoutout to the Libstoragemgmt C API Manual, version 1.3, dated February 2026 β lsm_disk_location_get(3) out here doing the absolute most with the absolute least π«Άβ¨ periodt π
π¦ 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