sysdecode_madvice(3)

sysdecode_madvice3

Lookup name of various enumerated values

Part of sysdecode_enum(3).

Usage

#include <sysdecode.h>

const char *

sysdecode_acltype(int type);

const char *

sysdecode_atfd(int fd);

const char *

sysdecode_extattrnamespace(int namespace);

const char *

sysdecode_fadvice(int advice);

const char *

sysdecode_fcntl_cmd(int cmd);

const char *

sysdecode_getfsstat_mode(int mode);

const char *

sysdecode_getrusage_who(int who);

const char *

sysdecode_idtype(int idtype);

const char *

sysdecode_ipproto(int protocol);

const char *

sysdecode_itimer(int which);

const char *

sysdecode_kldsym_cmd(int cmd);

const char *

sysdecode_kldunload_flags(int flags);

const char *

sysdecode_lio_listio_mode(int mode);

const char *

sysdecode_madvice(int advice);

const char *

sysdecode_minherit_flags(int inherit);

const char *

sysdecode_msgctl_cmd(int cmd);

const char *

sysdecode_nfssvc_flags(int flags);

const char *

sysdecode_pathconf_name(int name);

const char *

sysdecode_prio_which(int which);

const char *

sysdecode_procctl_cmd(int cmd);

const char *

sysdecode_ptrace_request(int request);

const char *

sysdecode_rlimit(int resource);

const char *

sysdecode_rtprio_function(int function);

const char *

sysdecode_scheduler_policy(int policy);

const char *

sysdecode_sctp_pr_policy(int policy);

const char *

sysdecode_semctl_cmd(int cmd);

const char *

sysdecode_shmctl_cmd(int cmd);

const char *

sysdecode_shutdown_how(int how);

const char *

sysdecode_sigbus_code(int si_code);

const char *

sysdecode_sigchld_code(int si_code);

const char *

sysdecode_sigfpe_code(int si_code);

const char *

sysdecode_sigill_code(int si_code);

const char *

sysdecode_signal(int sig);

const char *

sysdecode_sigprocmask_how(int how);

const char *

sysdecode_sigsegv_code(int si_code);

const char *

sysdecode_sigtrap_code(int si_code);

const char *

sysdecode_sockaddr_family(int sa_family);

const char *

sysdecode_socketdomain(int domain);

const char *

sysdecode_sockettype(int type);

const char *

sysdecode_sockopt_level(int level);

const char *

sysdecode_sysarch_number(int number);

const char *

sysdecode_umtx_op(int op);

const char *

sysdecode_vmresult(int result);

const char *

sysdecode_whence(int whence);

Library

library “libsysdecode”

Overview

The sysdecode_enum functions return a text description of an integer value. The text description matches the name of a C macro with the same value as the sole function argument. NULL is returned if there is no matching C macro name.

Most of these functions decode an argument passed to a system call:

FunctionSystem CallArgument
sysdecode_acltype()acl_get_file(3)type
sysdecode_atfd()openat(2)fd
sysdecode_extattrnamespace()extattr_get_fd(2)attrnamespace
sysdecode_fadvice()posix_fadvise(2)advice
sysdecode_fcntl_cmd()fcntl(2)cmd
sysdecode_getfsstat_mode()getfsstat(2)mode
sysdecode_idtype()
sysdecode_itimer()
sysdecode_kldsym_cmd()kldsym(2)cmd
sysdecode_kldunload_flags()kldunloadf(2)flags
sysdecode_lio_listio_mode()lio_listio(2)mode
sysdecode_madvice()madvise(2)advice
sysdecode_minherit_inherit()minherit(2)inherit
sysdecode_msgctl_cmd()msgctl(2)cmd
sysdecode_nfssvc_flags()nfssvc(2)flags
sysdecode_pathconf_name()pathconf(2)name
sysdecode_prio_which()getpriority(2)which
sysdecode_procctl_cmd()procctl(2)cmd
sysdecode_ptrace_request()ptrace(2)request
sysdecode_rlimit()getrlimit(2)resource
sysdecode_rtprio_function()rtprio(2)function
sysdecode_getrusage_who()getrusage(2)who
sysdecode_scheduler_policy()sched_setscheduler(2)policy
sysdecode_semctl_cmd()semctl(2)cmd
sysdecode_shmctl_cmd()shmctl(2)cmd
sysdecode_shutdown_how()shutdown(2)how
sysdecode_sigprocmask_how()sigprocmask(2)how
sysdecode_sockopt_level()getsockopt(2)level
sysdecode_sysarch_number()sysarch(2)number
sysdecode_umtx_op()_umtx_op(2)op
sysdecode_whence()lseek(2)whence

These functions decode signal-specific signal codes stored in the si_code field of the siginfo_t object associated with an instance of signal:

FunctionSignal
sysdecode_sigbus_code()SIGBUS
sysdecode_sigchld_code()SIGCHLD
sysdecode_sigfpe_code()SIGFPE
sysdecode_sigill_code()SIGILL
sysdecode_sigsegv_code()SIGSEGV
sysdecode_sigtrap_code()SIGTRAP

Other functions decode the values described below:

sysdecode_ipproto()

An IP protocol.

sysdecode_sctp_pr_policy()

A PR-SCTP policy.

sysdecode_signal()

A process signal.

sysdecode_sockaddr_family()

A socket address family.

sysdecode_socketdomain()

A socket domain.

sysdecode_vmresult()

The return value of a function in the virtual memory subsystem of the kernel indicating the status of the associated request.

Return values

The sysdecode_enum functions return the name of a matching C macro or NULL if no matching C macro was found.

Releases

24 releases since FreeBSD 11.1-RELEASE; the text changed 12 times.

  1. 11.1
  2. 11.2
  3. 11.3
  4. 11.4
  5. 12.0
  6. 12.1
  7. 12.2
  8. 12.3
  9. 12.4
  10. 13.0
  11. 13.1
  12. 13.2
  13. 13.3–16.0

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's mdoc source.