lsm_disk_location_get(3)

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

✨ 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' is NULL, or
  • 'd' isn't a valid lsm_disk pointer, 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