i386_get_ioperm(2)

i386_get_ioperm2

Manage per-process access to the i386 i/o port space

Usage

#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);

Library

Standard C Library (libc, -lc)

Overview

The i386_get_ioperm() 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 i386_set_ioperm() 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.

Return values

The i386_get_ioperm() function returns the value 0 if successful; otherwise the value -1 is returned and the global variable errno is set to indicate the error.

Errors

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

[EINVAL]

An invalid range was specified by the start or length arguments.

[EPERM]

The caller of i386_set_ioperm was not the superuser.

Authors

This man page was written by Jonathan Lemon.

From freebsd-manpages 6.0-5 in Debian 4.0 (Etch). Parsed by carta from the page's mdoc source.