audit_name_to_errno(3)

audit_name_to_errno3

Convert the errno name and the numeric errno value to each other

Usage

#include <libaudit.h>

int audit_name_to_errno(const char *error);

const char *audit_errno_to_name(int error);

Overview

audit_name_to_errno() converts the errno name ("EPERM", "ENOENT", "ESRCH", etc.) to the numeric errno value (EPERM, ENOENT, ESRCH, etc.). error is the errno name.

audit_errno_to_name() converts the numeric errno value (EPERM, ENOENT, ESRCH, etc.) to the errno name ("EPERM", "ENOENT", "ESRCH", etc.). error is the numeric errno value.

Return value

audit_name_to_errno() returns 0 if an error occurs; otherwise, the return value is the numeric errno value.

audit_errno_to_name() returns NULL if an error occurs; otherwise, the return value is the errno name.

Releases

Unchanged in 3 releases since Debian 12 (Bookworm).

  1. 12–Arch

Author

Steve Grubb

From audit 4.2.1-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.