LLAPI_PROJECT_GET(3)

πŸ“¦ version 2.17.58, in ubuntu stonking

πŸ’– LLAPI_PROJECT_GET β€” bestie edition ✨

okay so you wanna know about llapi_project_get from the Lustre library functions?? say less, we're doing this 🫢 it lives in the llapi_project_get(3) era of your life and it's lowkey one of the most useful little gremlins in the lustreapi family πŸ’…


✨ NAME ✨

llapi_project_get β€” read project information to a buffer πŸ“–πŸ’–


🌸 SYNOPSIS 🌸

#include <lustre/lustreapi.h>

int llapi_project_get(struct ll_project_handle *hdl, ll_project *lprj);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the vibe: llapi_project_get() reads through the contents of the file that hdl->lph_file points at, and it keeps going until it hits an entry that matches the info you handed it in lprj. πŸ‘€ once it finds that match, it fills in the remaining space with the information from that file. that's it, that's the whole job, no cap.

πŸŽ€ heads up bestie: the buffer should be preallocated. do that first, king/queen/monarch. don't make it guess.

πŸ’« RETURN VALUES πŸ’«

  • 0 β€” slay, it worked. success. πŸ’…
  • -ve β€” a negative error code when things go sideways, and it sets errno appropriately. not iconic, but informative. 😭

πŸ”₯ ERRORS πŸ”₯

  • -EINVAL β€” thrown when both lprj->lprj_projname and lprj->lprj_projid are NULL. the check happens through lprj->lprj_valid. so basically, if you gave it zero identifying info, it's gonna clock that and refuse. periodt.
  • -ENOENT β€” no entry was found in hdl->lph_file that matched the information you specified in lprj. she looked. she searched. nothing. πŸ’€

🌈 AVAILABILITY 🌈

llapi_project_get() is part of the lustre(7) user application interface library, and it's been here since release 2.17.0. so it's not new-new, but it's not ancient either. main character energy since day one πŸ‘‘


πŸ‘‘ SEE ALSO πŸ‘‘


and that's the whole page bestie πŸ’œ brought to you by the Lustre User API, dated 2025-07-01, and it's giving LLAPI_PROJECT_GET(3) in every way. go preallocate that buffer and get your project info. mwah πŸŽ€βœ¨

πŸ“¦ where this page comes from