Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ kopt(2) — bsd — mips UMIPS RISC/os 5.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

kopt(8)



KOPT(2-BSD)         RISC/os Reference Manual          KOPT(2-BSD)



NAME
     kopt - get or set kernel options

SYNOPSIS
     #include <mips/debug.h>

     kopt(option, value, op)
     char *option;
     int value, op;

DESCRIPTION
     The kopt system call allows a user process to get or set
     kernel options.  The specific set of options is dependent
     upon the particular release of the kernel, but typical
     options control virtual memory system parameters, debugging
     options, and device driver options.

     option points to a null-terminated character string naming a
     kernel option.  The current set of kernel options is speci-
     fied by the array kernargs in the kernel source file
     mips/master.d/kernel_common.

     op may be one of:

     KOPT_GET            Return the specified option

     KOPT_SET            Set the specified option to value.  Must
                         be super-user.

     KOPT_BIS            Or the bits in value into the specified
                         option.  Must be super-user.

     KOPT_BIC            Clear the bits in value from the speci-
                         fied option.  Must be super-user.

RETURN VALUE
     kopt returns the previous value of the specified option on
     success, or -1 on failure.  Since -1 is a legal value for
     many kernel options, errors must be disambiguated from suc-
     cessful returns of -1 by the value of errno.

ERRORS
     [EINVAL]            option name is too long.

     [EINVAL]            option is not known kernel option.

     [EINVAL]            op is not one of KOPT_GET, KOPT_SET,
                         KOPT_BIS, or KOPT_BIC.

     [EFAULT]            option is not accessible.

     [EACCES]            Attempt to modify kernel option when not



                        Printed 11/19/92                   Page 1





KOPT(2-BSD)         RISC/os Reference Manual          KOPT(2-BSD)



                         super-user.

SEE ALSO
     kopt(8)



















































 Page 2                 Printed 11/19/92



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026