LLAPI\_PROJECT\_GETPRJID(3) Lustre Library Functions LLAPI\_PROJECT\_GETPRJID(3)

# [NAME](#NAME)

llapi\_project\_getprjid - read project matching a project ID to a buffer

# [SYNOPSIS](#SYNOPSIS)

```
#include <lustre/lustreapi.h>

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

# [DESCRIPTION](#DESCRIPTION)

The **llapi\_project\_getprjid()** function reads the contents of the **LIBLUSTREAPI\_PROJECT** file until an entry matches the provided *prjid*, and fills in the remaining space with the information provided in the file. The buffer should be preallocated.

# [RETURN VALUES](#RETURN_VALUES)

**0**

on success

[-ve](#ve)

error code on failure and sets errno appropriately.

# [ERRORS](#ERRORS)

[**-EINVAL**](#EINVAL)

if opening the file fails, or *lprj* is NULL or *lprj-&gt;lprj\_size* is invalid.

[**-ENOENT**](#ENOENT)

if no entry was found in *LIBLUSTREAPI\_PROJECT* with information matching *prjid*.

# [AVAILABILITY](#AVAILABILITY)

**llapi\_project\_getprjid()** is part of the [**lustre**(7)](/man/enterprise-packages/lustre/lustre.7) user application interface library since release 2.17.0

# [SEE ALSO](#SEE_ALSO)

[**lfs\_project**(1)](/man/enterprise-packages/lustre/lfs_project.1), [**llapi\_project\_close**(3)](/man/enterprise-packages/lustre/llapi_project_close.3), [**llapi\_project\_fgetnam**(3)](/man/enterprise-packages/lustre/llapi_project_fgetnam.3), [**llapi\_project\_fgetprjid**(3)](/man/enterprise-packages/lustre/llapi_project_fgetprjid.3), [**llapi\_project\_get**(3)](/man/enterprise-packages/lustre/llapi_project_get.3), [**llapi\_project\_getnam**(3)](/man/enterprise-packages/lustre/llapi_project_getnam.3), [**llapi\_project\_open**(3)](/man/enterprise-packages/lustre/llapi_project_open.3), [**llapi\_project\_put**(3)](/man/enterprise-packages/lustre/llapi_project_put.3), [**projid**(5)](/man/enterprise-packages/lustre/projid.5), [**lustreapi**(7)](/man/enterprise-packages/lustre/lustreapi.7)

2025-07-01 Lustre User API

---

Document: llapi_project_getprjid(3) from lustre 2.17.59-r1 (Chainguard OS)
Source: https://github.com/lustre/lustre-release
