setsysinfo.2

来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 2 代码 · 共 199 行

2
199
字号
.TH setsysinfo 2.SH Namesetsysinfo \- set system information.SH Syntax.nf#include <sys/types.h>#include <sys/sysinfo.h>.PPsetsysinfo(\fIop, buffer, nbytes, arg, flag\fP)unsigned	 \fIop\fP;char		*\fIbuffer\fP;unsigned	 \fInbytes\fP;	unsigned	 \fIarg\fP;unsigned	 \fIflag\fP;.fi.SH Description.NXR "setsysinfo system call"The.PN setsysinfosystem call modifies system information.The.I opargument specifies the operation to be performed.  Values for .I opare defined in the .PN <sys/sysinfo.h> header file.The optional.I bufferand.I nbytesarguments are used to pass data, which varies depending upon.IR op .When.I bufferand.I nbytesare not required, they should be set to NULL.The optional.I argargument can be used with certain.I op values for additional information. When.I argis not required, it should be set to NULL.The optional.I flagargument can be used with certain.I op and.I argvalues for additional information.When.I flagis not required it should be set to NULL..PP.spPossible .I opvalues are:.IP "\fIop\fR = SSI_NVPAIRS" 0.5iUse a list of .I name-value pairs to modify predefined systemvariables..I Bufferis an array of.I name-valuepairs, where.I nameis one of a predefined set of system variables defined inthe <sys/sysinfo.h> header file. .spPossible.I namevalues are:.RS.IP "SSIN_NFSPORTMON" 0.5iA Boolean that determines whether incoming NFS traffic isoriginating at a privileged port or not..IP "SSIN_NFSSETLOCK" 0.5iA Boolean that determines whether NFS (daemon) style fileand record locking are enabled or not..IP "SSIN_PROG_ENV" 0.5iSet the compatibility mode of the process. Possible values areA_BSD, A_POSIX, or A_SYSV..IP "SSIN_UACSYS (RISC only)" 0.5iA Boolean that determines whether or not the system prints an"unaligned access fixup" message.  Use of this is restricted to thesuperuser..IP "SSIN_UACPARNT (RISC only)" 0.5iA Boolean that is set in the current process's parent procstructure.  It turns printing of ``unaligned access fixups'' onor off.  This flag is inherited across forks and execs.If parent is init, it returns EPERM..IP "SSIN_UACPROC (RISC only)" 0.5iA Boolean value that is set in the proc structure to turnoff/on printing of ``unaligned access fixup'' messages.  This flagis inherited across forks and execs..PPThe.I valueis a legal value for.I name.The.I nbytesargument defines the number of .I name-value pairs in.I buffer.The.I argand.I flagarguments are not used..RE.IP "\fIop\fR = SSI_ZERO_STRUCT" 0.5iEach member of a system structure is set to zero.  The.I argdefines the structure type. .spPossible values for.I argare:.RS.IP "SSIS_NFS_CLSTAT" 0.5iNFS client statistics..IP "SSIS_NFS_SVSTAT" 0.5iNFS server statistics..IP "SSIS_RPC_STAT" 0.5iRPC statistics.The.I flagargument is used for a particular.I argvalue, to further define the operation or a resultantaction to be performed.The.I bufferand.I nbytesarguments are not used..PPPermission checking is done on a structure-by-structure basis..RE.IP "\fIop\fR = SSI_SET_STRUCT" 0.5iEach member of a system structure is set to a supplied value. The.I argdefines the structure type. .spPossible values for.I argare as defined for op SSI_STRUCT_ZERO.The.I flagargument is used for a particular.I argvalue, to further define the operation or a resultantaction to be performed.The.I bufferargument is the address of a structure of the appropriate type thatcontains the desired values.The.I nbytesargument specifies the amount of data to be transferred that is stored at.IR buffer ..EE.SH Return Values.PPA zero (0) is returned if the call succeeds. If the call fails, \-1 is returned, and the global variable.I errnois set to indicate the error..SH Diagnostics.TP 15[EFAULT]Either.I bufferor.I argcauses an illegal address to be referenced..TP 15[EINVAL]The .I op,.I arg,or.I flagargument is invalid..TP[EPERM]Permission is denied for the operation requested.SH See Alsogetsysinfo(2)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?