*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: setsysinfo | Section: 2 | Source: Digital UNIX | File: setsysinfo.2.gz
setsysinfo(2) System Calls Manual setsysinfo(2) NAME setsysinfo - Sets system information SYNOPSIS #include <sys/sysinfo.h> #include <machine/hal_sysinfo.h> setsysinfo(op, buffer, nbytes, arg, flag) unsigned long op; datatype *buffer; unsigned long nbytes; datatype *arg; unsigned long flag; PARAMETERS Specifies the operation to be performed. Values for op are defined in the <sys/sysinfo.h> and <machine/hal_sysinfo.h> header files. See the DESCRIPTION for the operations you can specify. The nbytes argument defines the size of buffer. The buffer argument specifies the location where the system information is returned and its datatype depends on the data type of buffer. The optional arg and flag arguments can be used by certain op values to obtain additional information. The arg datatype depends on the data type of arg. When arg and/or flag are not required, they should be set to NULL. DESCRIPTION The setsysinfo system call modifies system information. The op argu- ment specifies the operation to be performed. Values for op are de- fined in the <sys/sysinfo.h> and <machine/hal_sysinfo.h> header files. The optional buffer and nbytes arguments are used to pass data, which varies depending upon op. When buffer and nbytes are not required, they should be set to NULL. The optional arg argument can be used with certain op values for additional information. When arg is not re- quired, it should be set to NULL. The optional flag argument can be used with certain op and arg values for additional information. When flag is not required it should be set to NULL. Possible op values are: For support of up to 64K file descriptors per process. If the flag is set to one, the utask bit is set and support for up to 64K file descriptors is enabled. Additionally, the process's hard file limit is raised to 64K. If the flag is set to zero, the utask bit is cleared and support for up to 64K file descriptors is disabled. The process's hard file limit returns to the default maximum of 4K. If the process is using more than 4K file descriptors, the process's hard file limit is not changed: EINVAL is returned. If either the process's hard or soft limit is above 4K, that limit is set to 4K. This operation uses pairs of values or their named equiva- lents to modify system behavior. The buffer variable is an ar- ray of paired values (or their named equivalents). One member of a pair is from a set of system names defined in the <sys/sys- info.h> header file. The other member can be one of the following: A_BSD, A_POSIX, A_SYSV, a system name defined as a flag for UAC (unaligned ac- cess control), or an IEC (Instruction Emulation Control) flag in the <sys/proc.h> header file and set on a per task basis. The following UAC flags can be specified in any combination: UAC_NOPRINT, UAC_NOFIX, and UAC_SIGBUS. UAC_NOPRINT suppresses the printing of the unaligned error mes- sage to the user. UAC_NOFIX instructs the operating system not to fix the un- aligned access fault. UAC_SIGBUS causes a SIGBUS signal to be delivered to the thread. The following IEC flags can be specified in any combination: IEC_VERBOSE, IEC_NOPRINT, and IEC_NOEMUL. IEC_VERBOSE prints the instruction emulated message for each in- struction emulation, not just the first. IEC_NOPRINT suppresses printing of the instruction emulated mes- sage to the user. IEC_NOEMUL instructs the operating system to deliver a SIGILL to the user instead of emulating instructions not supported by the host processor. UAC and IEC settings are inherited by a forked process so that the process will have the same UAC and IEC characteristics as its parent. Possible name values for the first member, are: Determines whether incoming NFS traffic is originating at a privileged port or not. Its paired value must be 0 or 1. Reserved for future use. This is a system-specified value that accepts the UAC_NO- PRINT flag only, as its paired value, even if other UAC flags are specified. Accordingly, it toggles an "unaligned access fixup" message. Use of this value is restricted to the supe- ruser and supersedes a user setting that requests printing. A value that is set in the current process's parent proc struc- ture. This value is paired with the UAC flags UAC_NOPRINT, UAC_NOFIX, and UAC_SIGBUS, specified in any combination with in- clusive OR. Accordingly, it toggles printing of an "unaligned access fixup" message, fixing of UAC faults, and delivery of a SIGBUS signal to the thread. This value is inherited across forks and execs. If parent is init, the system call returns EPERM. A value that is set in the proc structure. This value is paired with UAC flags UAC_NOPRINT, UAC_NOFIX, and UAC_SIGBUS, specified in any combination, with inclusive OR. Accordingly, it toggles printing of an "unaligned access fixup" message, fix- ing of UAC faults, and delivery of a SIGBUS signal to the thread. This is a system-specified value that accepts only the IEC_NOPRINT flag as its paired value, even if other IEC flags are specified. Accordingly, it toggles an "instruction emu- lated" message. Use of this value is restricted to the superuser and supersedes a user setting that requests printing. A value that is set in the current process's parent proc structure. This value is paired with the IEC flags IEC_VERBOSE, IEC_NO- PRINT, and IEC_NOEMUL, specified in any combination with inclu- sive OR. Accordingly, it toggles verbose printing of "instruc- tion emulated", not printing "instruction emulated", and not em- ulating instructions. This value is inherited across forks and execs. If the parent is init, the system call returns EPERM. A value that is set in the proc structure. This value is paired with the IEC flags IEC_VERBOSE, IEC_NOPRINT, and IEC_NOEMUL, specified in any combination, with inclusive OR. Accordingly, it toggles verbose printing of "instruction emulated", not printing "instruction emulated", and not emulating instructions. The value is a legal value for name. The nbytes argument de- fines the number of pairs in buffer. The arg and flag arguments are not used. Sets the value of a named console environment variable. If the variable is disabled due to a known firmware problem, then errno will contain EACCES. Specifies the location of the string value. A string containing the name of the con- sole environment variable. If the flag contains PROM_CON- VERT_TYPE (defined in prom.h), then the kernel does value con- version. Device values should be specified as a fully qualified path to a device special file. For network devices, the con- troller name (e.g. tu2) should be provided. The kernel will convert these device references to the native console bootstring format. Integer values should be specified as strings, which the kernel will convert to binary form. Saves the values of all console environment variables to non-volatile storage. If sav- ing is disabled due to a known firmware problem, then errno will contain EACCES. Each member of a system structure is set to zero. The arg defines the structure type. Possible values for arg are: NFS client statistics. NFS server statistics. RPC statistics. The flag argument is used for a particular arg value, to further define the operation or a re- sultant action to be performed. The buffer and nbytes arguments are not used. Permission checking is done on a structure-by-structure basis. Each member of a system structure is set to a supplied value. The arg defines the structure type. Possible values for arg are as defined for op SSI_STRUCT_ZERO. The flag argument is used for a particular arg value, to further define the operation or a resultant action to be performed. The buffer argument is the address of a structure of the appropriate type that contains the desired values. The nbytes argument specifies the amount of data to be transferred that is stored at buffer. EXAMPLES #include <sys/sysinfo.h> #include <machine/hal_sysinfo.h> #include <sys/proc.h> &. int buf[2], val, arg; . /* Don't print the warning to the user */ buf[0] = SSIN_UACPROC; buf[1] = UAC_NOPRINT; error = setsysinfo(SSI_NVPAIRS, buf, 1, 0, 0); . . . /* Deliver a SIGBUS signal and don't print the warning */ buf[0] = SSIN_UACPROC; buf[1] = UAC_SIGBUS | UAC_NOPRINT; error = setsysinfo(SSI_NVPAIRS, buf, 1, 0, 0); The following example shows that you can pass more than one pair of values to the SSI_NVPAIRS call. Notice that members of a pair are con- tiguous, and an SSI_* value appears in the even number position begin- ning with array position [0]. buf[0] = SSIN_UACPARNT; buf[1] = UAC_NOPRINT; buf[2] = SSIN_NSFPORTMON; buf[3] = 1; if (setsysinfo(SSI_NVPAIRS, buf, 2, 0, 0) < 0) { perror("setsysinfo"); return; } In The following example the setsysinfo operation SSI_PROM_ENV sets the value of a named console environment variable: #include <ma- chine/prom.h> char evname[]="boot_dev"; char evval[]="/dev/rz0a"; /* or some- thing like "tu0" */ int status; status = setsysinfo(SSI_PROM_ENV,evval, strlen(evval)+1, evname, PROM_CONVERT_TYPE; RETURN VALUES A zero (0) is returned if the call succeeds. If the call fails, -1 is returned, and the global variable errno is set to indicate the error. ERRORS Either buffer or arg causes an illegal address to be referenced. The op, arg, or flag argument is invalid. The process has more than 4K file descriptors active when a call is issued to disable support for more than 4K file descriptors. Permission is denied for the operation requested. RELATED INFORMATION iec(1), uac(1), getsysinfo(2) delim off setsysinfo(2)

Navigation Options