---
name: "i386_get_ioperm"
section: "2"
platform: "linux"
package: "freebsd-manpages"
version: "6.0-5"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/i386_get_ioperm"
---

# i386\_get\_ioperm(2)

manage per-process access to the i386 I/O port space

## NAME

**i386\_get\_ioperm**, **i386\_set\_ioperm** – manage per-process access to the i386 I/O port space

## LIBRARY

Standard C Library (libc, -lc)

## SYNOPSIS

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

## DESCRIPTION

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.

## SEE ALSO

[io(4)](/io/4.md)

## AUTHORS

This man page was written by Jonathan Lemon.
