LLAPI_PROJECT_PUT(3)

πŸ“¦ version 2.17.58, in ubuntu stonking

πŸ’– LLAPI_PROJECT_PUT β€” the manual page, but make it cute πŸ’–

okay bestie, gather round, because this one is a lustre library function and it's literally in the Lustre Library Functions section (that's the manual name, mwah) πŸ’…


✨ NAME ✨

llapi_project_put β€” write a project information to a file

like. that's the whole job. it puts project info into a file. iconic behavior honestly πŸŽ€


🌸 SYNOPSIS 🌸

#include <lustre/lustreapi.h>

int llapi_project_put(struct ll_project_handle *hdl, ll_project *lprj,
                      int flags);

πŸ¦‹ DESCRIPTION πŸ¦‹

so the tea is: llapi_project_put() takes all the info you've got sitting in lprj and writes it into the file that hdl->lph_file points at. that's the vibe 🫢

and here's the plot twist β€” the function acts completely different depending on what you put in flags, no cap:

  • if you pass LLAPI_PROJECT_OVERWRITE, the existing value gets overwritten. bye bye old data, you're being replaced πŸ’€
  • otherwise, the project gets appended to the end of the file. so it just gets tacked on at the bottom like the last message in the group chat 🌈

pick your fighter (your flag) wisely.


⭐ RETURN VALUES ⭐

  • 0 β€” on success. slay, it worked ✨
  • -ve β€” error code on failure, and it sets errno appropriately. not the moment, bestie 😭

πŸ“ ERRORS πŸ“

  • -EINVAL β€” if either lprj->lprj_projname or lprj->lprj_projid are NULL. the way this gets checked is through lprj->lprj_valid. so like, if those are null, invalid, periodt.
fr fr, don't hand it a NULL name or id and then act surprised. it WILL tell on you. πŸ™ˆ

πŸ‘‘ AVAILABILITY πŸ‘‘

llapi_project_put() is part of the lustre(7) user application interface library since release 2.17.0. so if your version is older than that, this function is not giving what it needs to give, and it's not there at all πŸ’œ


πŸ”₯ SEE ALSO πŸ”₯

go read those too, iykyk πŸ’–


and that's a wrap on the Lustre User API manual, dated 2025-07-01 β€” thanks for reading my little dev-doc rant, bestie. mwah, go write some project info πŸ’…βœ¨

πŸ“¦ where this page comes from