|
|
#include <sys/sysi86.h>long sysi86 (cmd, arg) int cmd;
struct rtc_t {
char rtc_sec, rtc_asec, rtc_min, rtc_amin,
rtc_hr, rtc_ahr, rtc_dow, rtc_dom,
rtc_mon, rtc_yr, rtc_statusg,
rtc_statusb, rtc_statusc, rtc_statusd;
};
This function reads the hardware time-of-day clock and returns the data in the structure referenced by the argument.
struct rtc_cent_t {
char rtc_sec, rtc_asec, rtc_min, rtc_amin,
rtc_hr, rtc_ahr, rtc_dow, rtc_dom,
rtc_mon, rtc_yr, rtc_cent, rtc_statusg,
rtc_statusb, rtc_statusc, rtc_statusd;
};
This function reads the hardware time-of-day clock and returns the data
in the structure referenced by the argument. This command is available only to
root.
sysi86(RDUBLK, pid, buf, n)
int pid;
char *buf;
ind n;
The low-order byte of the integer contains the value of fpkind, a variable specifying whether an 80287 or 80387 floating-point co-processor is present, emulated in software, or not supported. The values are defined in the header file <sys/fp.h>.
The argument is a pointer to a request structure that contains the values to be placed in the descriptor. The request structure is declared in the <sys/sysi86.h> header file.
If the argument is the NULL pointer, then the pipe filesystem is disabled. This causes all subsequent pipe( ) calls to fail with error ENODEV. Existing anonymous pipes are not affected.
Named pipes use the filesystem on which they reside, not the pipe filesystem, and so are never affected by SI86SETPIPE.
Only root can set or disable the pipe filesystem. Upon successful completion a value of 0 is returned. Otherwise, a value of -1 is returned and errno is set the indicate the error:
The format of the swap buffer is:
typedef struct swapint {
char si_cmd; /* One of the command codes */
/* listed below. */
char *si_buf; /* For an SI_LIST function, this*/
/* is a pointer to a buffer of */
/* sizeof(swpt_t)*MSFILES bytes.*/
/* For the other cases, it is a */
/* pointer to a pathname of a */
/* swap file. */
int si_swplo; /* The first block number of the*/
/* swap file. Used only for */
/* SI_ADD and SI_DEL. */
int si_nblks; /* The size of the swap file in */
/* blocks. Used only for an */
/* SI_ADD request. */
} swpi_t;
/* The following are the possible values for si_cmd. */
#define SI_LIST 0 /* List the currently active */
/* swap files. */
#define SI_ADD 1 /* Add a new swap file. */
#define SI_DEL 2 /* Delete one of the currently */
/* active swap files. */
Note that the add and delete options of the command may only be used by root.
Typically, a swap area is added by a single call to sysi86. First, the swap buffer is primed with appropriate entries for the structure members. Then sysi86 is invoked.
#include <sys/sysi86.h> #include <sys/swap.h>struct swapint swapbuf; /*swap into buffer ptr*/
sysi86(SI86SWPI, &swapbuf);
If this command succeeds, it returns 0 to the calling process. This command fails, returning -1, if one or more of the following is true:
pathconf(S) can be used to determine whether or not a filesystem supports pipes.