1 | /*
|
---|
2 | sys/svrctl.h
|
---|
3 |
|
---|
4 | Created: Feb 15, 1994 by Philip Homburg <philip@cs.vu.nl>
|
---|
5 | */
|
---|
6 |
|
---|
7 | #ifndef _SYS__SVRCTL_H
|
---|
8 | #define _SYS__SVRCTL_H
|
---|
9 |
|
---|
10 | #ifndef _TYPES_H
|
---|
11 | #include <sys/types.h>
|
---|
12 | #endif
|
---|
13 |
|
---|
14 | /* Server control commands have the same encoding as the commands for ioctls. */
|
---|
15 | #include <minix/ioctl.h>
|
---|
16 |
|
---|
17 | /* MM controls. */
|
---|
18 | #define MMSIGNON _IO ('M', 4)
|
---|
19 | #define MMSWAPON _IOW('M', 5, struct mmswapon)
|
---|
20 | #define MMSWAPOFF _IO ('M', 6)
|
---|
21 | #define MMGETPARAM _IOW('M', 5, struct sysgetenv)
|
---|
22 | #define MMSETPARAM _IOR('M', 7, struct sysgetenv)
|
---|
23 |
|
---|
24 | /* FS controls. */
|
---|
25 | #define FSSIGNON _IOW('F', 2, struct fssignon)
|
---|
26 | #define FSDEVMAP _IORW('F', 5, struct fsdevmap)
|
---|
27 | #define FSDEVUNMAP _IOW('F', 6, struct fsdevunmap)
|
---|
28 |
|
---|
29 | /* Kernel controls. */
|
---|
30 | #define SYSSENDMASK _IO ('S', 4)
|
---|
31 | #define SYSSIGNON _IOR('S', 2, struct systaskinfo)
|
---|
32 | #define SYSGETENV _IOW('S', 1, struct sysgetenv)
|
---|
33 |
|
---|
34 | struct mmswapon {
|
---|
35 | u32_t offset; /* Starting offset within file. */
|
---|
36 | u32_t size; /* Size of swap area. */
|
---|
37 | char file[128]; /* Name of swap file/device. */
|
---|
38 | };
|
---|
39 |
|
---|
40 | struct svrqueryparam {
|
---|
41 | char *param; /* Names of parameters to query. */
|
---|
42 | size_t psize; /* Length of param[]. */
|
---|
43 | char *value; /* To return values. */
|
---|
44 | size_t vsize;
|
---|
45 | };
|
---|
46 |
|
---|
47 | /* A proper system call must be created later. */
|
---|
48 | #include <minix/dmap.h>
|
---|
49 | struct fssignon {
|
---|
50 | dev_t dev; /* Device to manage. */
|
---|
51 | enum dev_style style; /* Management style. */
|
---|
52 | };
|
---|
53 |
|
---|
54 | struct fsdevunmap {
|
---|
55 | dev_t dev; /* Device to unmap. */
|
---|
56 | };
|
---|
57 |
|
---|
58 | struct systaskinfo {
|
---|
59 | int proc_nr; /* Process number of caller. */
|
---|
60 | };
|
---|
61 |
|
---|
62 | struct sysgetenv {
|
---|
63 | char *key; /* Name requested. */
|
---|
64 | size_t keylen; /* Length of name including \0. */
|
---|
65 | char *val; /* Buffer for returned data. */
|
---|
66 | size_t vallen; /* Size of return data buffer. */
|
---|
67 | };
|
---|
68 |
|
---|
69 | _PROTOTYPE( int svrctl, (int _request, void *_data) );
|
---|
70 |
|
---|
71 | #endif /* _SYS__SVRCTL_H */
|
---|