Skip to content

cffi: add a configure option to opt-out of "nice" errors #39

@cyphar

Description

@cyphar

While the new API makes error management much nicer, some users might just want to get raw errnos.

We can very easily switch to returning raw errnos from a type perspective, but it's a little unclear what we should do for errors that don't have an underlying errno. We can just copy the kernel and just use -EINVAL 😅, or we could use an errno that the kernel rarely returns like -ENOANO, never returns like -ENOPARAM, or a large negative number that doesn't map to any errno (INT_MIN if we want to be safe, I guess?).

This requires us getting a nice config API first (#21).

(Suggested by @brauner.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions