errno

Named Error Constants and Descriptions

Functions

FunctionDescription
_errno_copyInternal: copy string literal to output buffer.
_errno_byte_atInternal byte reader helper.
_errno_streqInternal: compare two strings.
errno_nameGet the name string for an errno code. Returns length written, -1 if unknown.
errno_descGet a human-readable description for an errno code.
errno_from_nameLookup errno code by name string. Returns code or -1 if unknown.

Details

_errno_copy

fn _errno_copy(dst: &i8, src: &i8, len: i64) -> i64

Internal: copy string literal to output buffer.

_errno_byte_at

fn _errno_byte_at(buf: &i8, idx: i64) -> i64

Internal byte reader helper.

_errno_streq

fn _errno_streq(a: &i8, alen: i64, b: &i8, blen: i64) -> i64

Internal: compare two strings.

errno_name

fn errno_name(code: i64, out: &i8) -> i64

Get the name string for an errno code. Returns length written, -1 if unknown.

errno_desc

fn errno_desc(code: i64, out: &i8) -> i64

Get a human-readable description for an errno code.

errno_from_name

fn errno_from_name(name: &i8, nlen: i64) -> i64

Lookup errno code by name string. Returns code or -1 if unknown.