diff options
author | 2011-01-03 23:08:07 +0000 | |
---|---|---|
committer | 2011-01-03 23:08:07 +0000 | |
commit | e4ff18b20dc541b5e9346f2cba52f0e542cec7d8 (patch) | |
tree | de7e104b8af974805e6b93383d14a35a7de2ed9d | |
parent | Unify roff macro argument parsing (in roff.c, roff_userdef()) and man macro (diff) | |
download | wireguard-openbsd-e4ff18b20dc541b5e9346f2cba52f0e542cec7d8.tar.xz wireguard-openbsd-e4ff18b20dc541b5e9346f2cba52f0e542cec7d8.zip |
Remove the old COMPAT_23 SysV IPC structures and the never implemented
semconfig() declaration. Move the COMPAT_35 SysV IPC structures into
the only source files that uses them
ok millert@, kettenis@, deraadt@
-rw-r--r-- | sys/compat/common/kern_ipc_35.c | 59 | ||||
-rw-r--r-- | sys/sys/ipc.h | 24 | ||||
-rw-r--r-- | sys/sys/msg.h | 38 | ||||
-rw-r--r-- | sys/sys/sem.h | 31 | ||||
-rw-r--r-- | sys/sys/shm.h | 28 |
5 files changed, 62 insertions, 118 deletions
diff --git a/sys/compat/common/kern_ipc_35.c b/sys/compat/common/kern_ipc_35.c index 137beebfb4e..eb576b8f64b 100644 --- a/sys/compat/common/kern_ipc_35.c +++ b/sys/compat/common/kern_ipc_35.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_ipc_35.c,v 1.3 2004/07/15 11:00:12 millert Exp $ */ +/* $OpenBSD: kern_ipc_35.c,v 1.4 2011/01/03 23:08:07 guenther Exp $ */ /* * Copyright (c) 2004 Todd C. Miller <Todd.Miller@courtesan.com> @@ -27,6 +27,63 @@ #include <sys/mount.h> #include <sys/syscallargs.h> +/* + * Old-style (OpenBSD 3.5 and earlier) structures, where ipc_perm + * used a 16bit int for 'mode'. + */ +struct ipc_perm35 { + uid_t cuid; /* creator user id */ + gid_t cgid; /* creator group id */ + uid_t uid; /* user id */ + gid_t gid; /* group id */ + u_int16_t mode; /* r/w permission */ + unsigned short seq; /* sequence # (to generate unique id) */ + key_t key; /* user specified msg/sem/shm key */ +}; + +struct msqid_ds35 { + struct ipc_perm35 msg_perm; /* msg queue permission bits */ + struct msg *msg_first; /* first message in the queue */ + struct msg *msg_last; /* last message in the queue */ + unsigned long msg_cbytes; /* number of bytes in use on queue */ + unsigned long msg_qnum; /* number of msgs in the queue */ + unsigned long msg_qbytes; /* max # of bytes on the queue */ + pid_t msg_lspid; /* pid of last msgsnd() */ + pid_t msg_lrpid; /* pid of last msgrcv() */ + time_t msg_stime; /* time of last msgsnd() */ + long msg_pad1; + time_t msg_rtime; /* time of last msgrcv() */ + long msg_pad2; + time_t msg_ctime; /* time of last msgctl() */ + long msg_pad3; + long msg_pad4[4]; +}; + +struct semid_ds35 { + struct ipc_perm35 sem_perm; /* operation permission struct */ + struct sem *sem_base; /* pointer to first semaphore in set */ + unsigned short sem_nsems; /* number of sems in set */ + time_t sem_otime; /* last operation time */ + long sem_pad1; /* SVABI/386 says I need this here */ + time_t sem_ctime; /* last change time */ + /* Times measured in secs since */ + /* 00:00:00 GMT, Jan. 1, 1970 */ + long sem_pad2; /* SVABI/386 says I need this here */ + long sem_pad3[4]; /* SVABI/386 says I need this here */ +}; + +struct shmid_ds35 { + struct ipc_perm35 shm_perm; /* operation permission structure */ + int shm_segsz; /* size of segment in bytes */ + pid_t shm_lpid; /* process ID of last shm op */ + pid_t shm_cpid; /* process ID of creator */ + shmatt_t shm_nattch; /* number of current attaches */ + time_t shm_atime; /* time of last shmat() */ + time_t shm_dtime; /* time of last shmdt() */ + time_t shm_ctime; /* time of last change by shmctl() */ + void *shm_internal;/* implementation specific data */ +}; + #ifdef SYSVMSG /* * Old-style shmget(2) used int for the size parameter, we now use size_t. diff --git a/sys/sys/ipc.h b/sys/sys/ipc.h index 888064420cb..77f17233286 100644 --- a/sys/sys/ipc.h +++ b/sys/sys/ipc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ipc.h,v 1.10 2004/07/15 11:24:46 millert Exp $ */ +/* $OpenBSD: ipc.h,v 1.11 2011/01/03 23:08:07 guenther Exp $ */ /* $NetBSD: ipc.h,v 1.15 1996/02/09 18:25:12 christos Exp $ */ /* @@ -58,28 +58,6 @@ struct ipc_perm { key_t key; /* user specified msg/sem/shm key */ }; -#ifdef _KERNEL -struct ipc_perm23 { - unsigned short cuid; /* creator user id */ - unsigned short cgid; /* creator group id */ - unsigned short uid; /* user id */ - unsigned short gid; /* group id */ - unsigned short mode; /* r/w permission */ - unsigned short seq; /* sequence # (to generate unique msg/sem/shm id) */ - key_t key; /* user specified msg/sem/shm key */ -}; - -struct ipc_perm35 { - uid_t cuid; /* creator user id */ - gid_t cgid; /* creator group id */ - uid_t uid; /* user id */ - gid_t gid; /* group id */ - u_int16_t mode; /* r/w permission */ - unsigned short seq; /* sequence # (to generate unique msg/sem/shm id) */ - key_t key; /* user specified msg/sem/shm key */ -}; -#endif - /* common mode bits */ #define IPC_R 000400 /* read permission */ #define IPC_W 000200 /* write/alter permission */ diff --git a/sys/sys/msg.h b/sys/sys/msg.h index 38c552e15da..bdb931248a1 100644 --- a/sys/sys/msg.h +++ b/sys/sys/msg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: msg.h,v 1.15 2009/08/09 10:40:17 blambert Exp $ */ +/* $OpenBSD: msg.h,v 1.16 2011/01/03 23:08:07 guenther Exp $ */ /* $NetBSD: msg.h,v 1.9 1996/02/09 18:25:18 christos Exp $ */ /* @@ -52,42 +52,6 @@ struct msqid_ds { }; #ifdef _KERNEL -struct msqid_ds23 { - struct ipc_perm23 msg_perm; /* msg queue permission bits */ - struct msg *msg_first; /* first message in the queue */ - struct msg *msg_last; /* last message in the queue */ - unsigned long msg_cbytes; /* number of bytes in use on the queue */ - unsigned long msg_qnum; /* number of msgs in the queue */ - unsigned long msg_qbytes; /* max # of bytes on the queue */ - pid_t msg_lspid; /* pid of last msgsnd() */ - pid_t msg_lrpid; /* pid of last msgrcv() */ - time_t msg_stime; /* time of last msgsnd() */ - long msg_pad1; - time_t msg_rtime; /* time of last msgrcv() */ - long msg_pad2; - time_t msg_ctime; /* time of last msgctl() */ - long msg_pad3; - long msg_pad4[4]; -}; - -struct msqid_ds35 { - struct ipc_perm35 msg_perm; /* msg queue permission bits */ - struct msg *msg_first; /* first message in the queue */ - struct msg *msg_last; /* last message in the queue */ - unsigned long msg_cbytes; /* number of bytes in use on queue */ - unsigned long msg_qnum; /* number of msgs in the queue */ - unsigned long msg_qbytes; /* max # of bytes on the queue */ - pid_t msg_lspid; /* pid of last msgsnd() */ - pid_t msg_lrpid; /* pid of last msgrcv() */ - time_t msg_stime; /* time of last msgsnd() */ - long msg_pad1; - time_t msg_rtime; /* time of last msgrcv() */ - long msg_pad2; - time_t msg_ctime; /* time of last msgctl() */ - long msg_pad3; - long msg_pad4[4]; -}; - struct msg { long msg_type; size_t msg_len; diff --git a/sys/sys/sem.h b/sys/sys/sem.h index e42deabb050..0d6d7bdddf5 100644 --- a/sys/sys/sem.h +++ b/sys/sys/sem.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sem.h,v 1.20 2009/04/03 04:22:49 guenther Exp $ */ +/* $OpenBSD: sem.h,v 1.21 2011/01/03 23:08:07 guenther Exp $ */ /* $NetBSD: sem.h,v 1.8 1996/02/09 18:25:29 christos Exp $ */ /* @@ -65,34 +65,6 @@ struct semid_ds { long sem_pad3[4]; /* SVABI/386 says I need this here */ }; -#ifdef _KERNEL -struct semid_ds23 { - struct ipc_perm23 sem_perm; /* operation permission struct */ - struct sem *sem_base; /* pointer to first semaphore in set */ - unsigned short sem_nsems; /* number of sems in set */ - time_t sem_otime; /* last operation time */ - long sem_pad1; /* SVABI/386 says I need this here */ - time_t sem_ctime; /* last change time */ - /* Times measured in secs since */ - /* 00:00:00 GMT, Jan. 1, 1970 */ - long sem_pad2; /* SVABI/386 says I need this here */ - long sem_pad3[4]; /* SVABI/386 says I need this here */ -}; - -struct semid_ds35 { - struct ipc_perm35 sem_perm; /* operation permission struct */ - struct sem *sem_base; /* pointer to first semaphore in set */ - unsigned short sem_nsems; /* number of sems in set */ - time_t sem_otime; /* last operation time */ - long sem_pad1; /* SVABI/386 says I need this here */ - time_t sem_ctime; /* last change time */ - /* Times measured in secs since */ - /* 00:00:00 GMT, Jan. 1, 1970 */ - long sem_pad2; /* SVABI/386 says I need this here */ - long sem_pad3[4]; /* SVABI/386 says I need this here */ -}; -#endif - /* * semop's sops parameter structure */ @@ -211,7 +183,6 @@ int semctl(int, int, int, ...); int __semctl(int, int, int, union semun *); int semget(key_t, int, int); int semop(int, struct sembuf *, size_t); -int semconfig(int); __END_DECLS #else void seminit(void); diff --git a/sys/sys/shm.h b/sys/sys/shm.h index 94802081da8..c984f373025 100644 --- a/sys/sys/shm.h +++ b/sys/sys/shm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: shm.h,v 1.22 2009/12/08 22:12:07 miod Exp $ */ +/* $OpenBSD: shm.h,v 1.23 2011/01/03 23:08:07 guenther Exp $ */ /* $NetBSD: shm.h,v 1.20 1996/04/09 20:55:35 cgd Exp $ */ /* @@ -112,32 +112,6 @@ struct shmid_ds { void *shm_internal; /* implementation specific data */ }; -#ifdef _KERNEL -struct shmid_ds23 { - struct ipc_perm23 shm_perm; /* operation permission structure */ - int shm_segsz; /* size of segment in bytes */ - pid_t shm_lpid; /* process ID of last shm op */ - pid_t shm_cpid; /* process ID of creator */ - shmatt_t shm_nattch; /* number of current attaches */ - time_t shm_atime; /* time of last shmat() */ - time_t shm_dtime; /* time of last shmdt() */ - time_t shm_ctime; /* time of last change by shmctl() */ - void *shm_internal; /* implementation specific data */ -}; - -struct shmid_ds35 { - struct ipc_perm35 shm_perm; /* operation permission structure */ - int shm_segsz; /* size of segment in bytes */ - pid_t shm_lpid; /* process ID of last shm op */ - pid_t shm_cpid; /* process ID of creator */ - shmatt_t shm_nattch; /* number of current attaches */ - time_t shm_atime; /* time of last shmat() */ - time_t shm_dtime; /* time of last shmdt() */ - time_t shm_ctime; /* time of last change by shmctl() */ - void *shm_internal;/* implementation specific data */ -}; -#endif - #if __BSD_VISIBLE /* * System V style catch-all structure for shared memory constants that |