---
name: "rc_config"
section: "3"
platform: "linux"
package: "librc-dev"
version: "0.56-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/rc_config"
---

# rc\_config(3)

functions to query OpenRC service configurations

## NAME

**rc\_config\_list**, **rc\_config\_load**, **rc\_config\_value**, **rc\_yesno** – functions to query OpenRC service configurations

## LIBRARY

Run Command library (librc, -lrc)

## SYNOPSIS

**#include \<rc.h\>**

*RC\_STRINGLIST \** *Fn* *rc\_config\_list* *const char \*file*\

*RC\_STRINGLIST \** *Fn* *rc\_config\_load* *const char \*file*\

*char \** *Fn* *rc\_config\_value* *const char \*const \*list* *const char \*entry*\

*bool* *Fn* *rc\_yesno* *const char \*value*\

## DESCRIPTION

These functions provide an easy means of querying OpenRC configuration files.

**rc\_config\_list**() returns a list of non comment lines in *file*. **rc\_config\_load**() does the same, but attempts to parse the line as if it was a shell assignment. **rc\_config\_value**() returns the value of *entry* found in *list*.

Each list should be freed using **rc\_stringlist\_free**() when done.

**rc\_yesno**() returns if *value* is true, yes, on or 1 regardless of case, otherwise false. If *value* is also not false, no, off or 0 regardless of case then *errno* is set to *EINVAL*.

## SEE ALSO

[malloc(3)](/malloc/3.md), [rc\_stringlist\_free(3)](/rc_stringlist_free/3.md), [sh(1)](/sh/1.md)

## AUTHORS

Roy Marples \<roy@marples.name\>
