LLAPI_PROJECT_GETPRJID(3)

πŸ“¦ version 2.17.58, in ubuntu stonking

πŸ’– LLAPI_PROJECT_GETPRJID πŸ’–

okay bestie, welcome to the Lustre Library Functions corner of the manual, she's serving C API realness and honestly? we're obsessed 🫢


✨ NAME ✨

llapi_project_getprjid β€” read project matching a project ID to a buffer

like,,, she finds the project entry you're looking for and drops it in your buffer. iconic behaviour. πŸ‘‘


✨ SYNOPSIS ✨

#include <lustre/lustreapi.h>

int llapi_project_get(struct ll_project *lprj, const unsigned int prjid);

✨ DESCRIPTION ✨

so here's the tea 🍡 β€” llapi_project_getprjid() reads the contents of the LIBLUSTREAPI_PROJECT file, straight up scrolling until it finds an entry that matches the prjid you handed it, and then it fills in the remaining space with the info provided in the file.

the buffer should be preallocated. πŸ’…

no cap, do that first. she is not allocating for you, she is not your mom, she is a getter. πŸ™ˆ


✨ RETURN VALUES ✨

  • 0 β€” slayed ✨ on success
  • -ve β€” error code on failure, and it sets errno appropriately. yes, negative, she's dramatic like that 😭

✨ ERRORS ✨

  • -EINVAL β€” if opening the file fails, or if lprj is NULL, or if lprj->lprj_size is invalid. basically: bad input energy, we don't do that here πŸ’€
  • -ENOENT β€” if no entry was found in LIBLUSTREAPI_PROJECT with information matching prjid. she looked. she genuinely looked. it's not there bestie πŸ₯²

✨ AVAILABILITY ✨

llapi_project_getprjid() is part of the lustre(7) user application interface library since release 2.17.0 β€” so if you're on something older, that's a vibe check fail, upgrade fr fr 🌸


✨ SEE ALSO ✨


reminder bestie: the synopsis up top literally calls it llapi_project_get while the NAME section says llapi_project_getprjid β€” I am NOT the one who wrote it that way, I am simply the messenger, and I am reporting it verbatim πŸ˜­πŸ’–

and that's a wrap on this one, babe πŸŽ€ this page came to you from the Lustre User API, dated 2025-07-01, filed under LLAPI_PROJECT_GETPRJID(3) β€” go forth and get those project IDs, ily, bye πŸ’œπŸ¦‹βœ¨

πŸ“¦ where this page comes from