I386_GET_IOPERM(2)
π i386_get_ioperm β NAME β¨
ok so bestie, say hi to i386_get_ioperm and i386_set_ioperm β they're the dynamic duo that manages per-process access to the i386 I/O port space. literally their whole job. it's giving gatekeeper but for ports π
π 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
okay so picture this: i386_get_ioperm() is the nosy bestie that tells you the permission for the process' I/O port space, and it drops that answer right into the *enable argument. the port range kicks off at start, and the number of contiguous entries gets handed back to you in *length. slay, now you know.
meanwhile i386_set_ioperm() is the one who actually sets access for a range of I/O ports β that range being described by the start and length arguments β and it flips them to whatever state the enable argument says. main character energy fr fr π
π RETURN VALUES
the way this works is so simple it's iconic: on a successful completion you get back 0 β¨. otherwise you get -1 π and the global variable errno gets set to tell you what went wrong. vibe check failed, basically.
π ERRORS
both i386_get_ioperm() and i386_set_ioperm() will fail if:
[EINVAL]β an invalid range was specified by thestartorlengtharguments. not me accidentally asking for a nonsense range π[EPERM]β the caller ofi386_set_iopermwas not the superuser. yeah bestie, this one needs root. no root, no port. periodt.
π SEE ALSO
io(4)π
π¦ AUTHORS
this man page was written by Jonathan Lemon. ty for your service king π«Ά
Debian β’ July 27, 1998 β that's the source, version and date bestie, mwah π β¨πΈ
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 1998 Jonathan Lemon
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms