ECONF\_GETEXTVALUE(3) libeconf Manual ECONF\_GETEXTVALUE(3)

# [NAME](#NAME)

econf\_getExtValue - get a key's value and extended metadata from a configuration file

# [SYNOPSIS](#SYNOPSIS)

```
#include <libeconf.h>
#include <libeconf_ext.h>
```

**econf\_err econf\_getExtValue(econf\_file \*key\_file, const char \*group, const char \*key, struct econf\_ext\_value \*\*value);**

# [DESCRIPTION](#DESCRIPTION)

The **econf\_getExtValue**() function searches for the specified *key* within the given *group* in the parsed configuration file structure *key\_file*. If the key is found, the function returns a pointer to an econf\_ext\_value structure via the *value* argument.

The *group* parameter may be **NULL** or an empty string for keys in the global section.

The caller is responsible for freeing the returned structure using [**econf\_freeExtValue**(3)](/man/os/libeconf/econf_freeExtValue.3).

# [RETURN VALUE](#RETURN_VALUE)

On success, **econf\_getExtValue**() returns **ECONF\_SUCCESS**.

On error, a non-zero **econf\_err** error code is returned.

# [ERRORS](#ERRORS)

**ECONF\_NOKEY**

The specified key was not found in the given group, or no key was found in the configuration structure at all.

**ECONF\_NOMEM**

Memory allocation failed.

**ECONF\_ARGUMENT\_IS\_NULL\_VALUE**

Given argument is NULL

# [SEE ALSO](#SEE_ALSO)

[**libeconf**(3)](/man/os/libeconf/libeconf.3), [**econf\_readConfig**(3)](/man/os/libeconf/econf_readConfig.3), [**econf\_freeExtValue**(3)](/man/os/libeconf/econf_freeExtValue.3), [**econf\_errString**(3)](/man/os/libeconf/econf_errString.3)

2023-11-01 libeconf

---

Document: econf_getExtValue(3) from libeconf 0.8.6-r2 (Chainguard OS)
Source: https://github.com/openSUSE/libeconf
