DOKK / manpages / debian 12 / freebsd-manpages / i386_set_ioperm.2freebsd.en
I386_GET_IOPERM(2) System Calls Manual I386_GET_IOPERM(2)

i386_get_ioperm, i386_set_iopermmanage per-process access to the i386 I/O port space

Standard C Library (libc, -lc)

#include <machine/sysarch.h>

int
i386_get_ioperm(unsigned int start, unsigned int *length, int *enable);

int
i386_set_ioperm(unsigned int start, unsigned int length, int enable);

The () system call will return the permission for the process' I/O port space in the *enable argument. The port range starts at start and the number of contiguous entries will be returned in *length.

The () system call will set access to a range of I/O ports described by the start and length arguments to the state specified by the enable argument.

Upon successful completion, the value 0 is returned; otherwise the value -1 is returned and the global variable errno is set to indicate the error.

The i386_get_ioperm() and i386_set_ioperm() system calls will fail if:

[]
An invalid range was specified by the start or length arguments.
[]
The caller of i386_set_ioperm was not the superuser.

io(4)

This man page was written by Jonathan Lemon.

July 27, 1998 Debian