getsysinfo.2

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

2
138
字号
.\" SCCSID: @(#)getsysinfo.2	2.3	5/19/87.TH getsysinfo 2.SH Namegetsysinfo \- get system information.SH Syntax.nf#include <sys/types.h>#include <sys/sysinfo.h>.PPgetsysinfo(\fIop, buffer, nbytes, start, arg\fP)unsigned	\fIop\fP;char		*\fIbuffer\fP;unsigned	 \fInbytes\fP;	int 		*\fIstart\fP;char		 *\fIarg\fP;	.fi.SH Description.NXR "getsysinfo system call"The.PN getsysinfosystem call retrieves information from the system..PPThe.I opargument specifies the operation to be performed.  Values for .I opare defined in the <sys/sysinfo.h> header file. .PPPossible .I opvalues are as follows:.IP "GSI_BOOTDEV" 0.3iReturn the BOOTDEV string, which is used for the installation..IP "GSI_NETBLK" 0.3iReturn the entire NETBLK structure, which is used for the networkinstallation..IP "GSI_PROG_ENV" 0.3iReturn the compatibility mode of the process.  Possible values areA_BSD, A_POSIX, A_SYSTEM_FIVE as defined in <sys/exec.h>..IP "GSI_MAX_UPROCS"Return the maximum number of processes allowed per user id..IP "GSI_TTYP"Return the major and minor numbers of the controlling terminal..IP "GSI_UACSYS (RISC only)"Return current value of flag that determines whether or not toprint "unaligned access fixup" message on a system-wide basis..IP "GSI_UACPARNT (RISC only)"Return current value of flag in parent process's structure forprinting unaligned access messages..IP "GSI_UACPROC (RISC only)"Return current value of flag in process's structure for printing ofunaligned access messages..IP "GSI_MMAP_ALIGNMENT (RISC only)"Return the minimum alignment required for an address specified with the.PN MAP_FIXEDoption in the.PN mmap(2)system call..PPThe.I nbytesargument defines the size of.IR buffer into which the system information is returned..PPThe.I startargument is the current logical location within the internal systemtable referenced by the op, and it must be initially set to.PN 0 .The .I startargument is updated to reflect the current logicallocation within the system table,allowing successive executions of.PN getsysinfoto retrieve information about all the system structures specified by op..PPThe .I startargument is set to 0 when all system information requested by.I ophas been retrieved..PPThe optional.I argargument may be used by certain .I op's for additional information.When .I arg is not required, it should be set to NULL..PPWhen information about multiple system structures is returned,it is stored within consecutive .I bufferlocations. The information for each system structure is dependent upon.I op..EE.SH Return Values.PPUpon successful completion, a value indicating the number ofrequested itemsstored in.I bufferis returned.If the information requested by .I opis not available,.I getsysinforeturns a zero.Otherwise, \-1 is returned, and the global variable,.PN errno ,is set to indicate the error..SH Diagnostics.TP 15[EFAULT]Either.I buffer,.I start,or.I argcauses an illegal address to be referenced..TP 15[EINVAL]The .I opargument is invalid..TP 15[EPERM]Permission is denied for the operation requested.SH See Alsosetsysinfo(2)

⌨️ 快捷键说明

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