Fix misc formatting errors in makesyscalls.sh.

Add CPT_NOA type which is COMPAT with NOARGS -- do not produce argument
struct in sysproto.

Change accept, recvfrom, getsockname to CPT_NOA type.
Fix getrlimit, setrlimit argument #2 name to struct rlimit.
This commit is contained in:
swallace 1995-10-07 23:56:20 +00:00
parent d5c6b3a46c
commit d652154286
2 changed files with 29 additions and 26 deletions

View File

@ -1,6 +1,6 @@
#! /bin/sh -
# @(#)makesyscalls.sh 8.1 (Berkeley) 6/10/93
# $Id: makesyscalls.sh,v 1.14 1995/09/19 13:50:26 bde Exp $
# $Id: makesyscalls.sh,v 1.15 1995/10/07 06:24:07 swallace Exp $
set -e
@ -108,7 +108,6 @@ s/\$//g
printf "#include <sys/types.h>\n", $0 > sysarg
printf "#include <sys/param.h>\n", $0 > sysarg
printf "#include <sys/mount.h>\n\n", $0 > sysarg
printf "struct args { int dummy; };\n\n", $0 > sysarg
printf " * created from%s\n */\n\n", $0 > sysnames
printf "char *%s[] = {\n", namesname > sysnames
@ -205,10 +204,10 @@ s/\$//g
funcalias = funcname
if (argalias == "") {
argalias = funcname "_args"
if ($2 == "COMPAT")
argalias = "o" argalias
}
f++
if ($2 == "COMPAT")
argalias = "o" argalias
if ($f != "(")
parserr($f, ")")
@ -246,8 +245,8 @@ s/\$//g
}
$2 == "STD" || $2 == "NODEF" || $2 == "NOARGS" || $2 == "NOPROTO" {
parseline()
if (( !nosys || funcname != "nosys" ) && ( !lkmnosys ||
funcname != "lkmnosys")) {
if ((!nosys || funcname != "nosys") && \
(funcname != "lkmnosys")) {
if (argc != 0 && $2 != "NOARGS" && $2 != "NOPROTO") {
printf("struct\t%s {\n", argalias) > sysarg
for (i = 1; i <= argc; i++)
@ -255,14 +254,16 @@ s/\$//g
argname[i]) > sysarg
printf("};\n") > sysarg
}
else
argalias = "args"
if ($2 != "NOPROTO") {
if (funcname == "exit")
printf("__dead ") > sysdcl
printf("%s\t%s __P((struct proc *, struct %s *, int []));\n", \
rettype, funcname, argalias) > sysdcl
}
else if($2 != "NOARGS" && $2 != "NOPROTO")
printf("struct\t%s {\n\tint dummy;\n};\n", \
argalias) > sysarg
}
if ($2 != "NOPROTO" && (!nosys || funcname != "nosys") && \
(!lkmnosys || funcname != "lkmnosys")) {
if (funcname == "exit")
printf("__dead ") > sysdcl
printf("%s\t%s __P((struct proc *, struct %s *, int []));\n", \
rettype, funcname, argalias) > sysdcl
}
if (funcname == "nosys")
nosys = 1
@ -283,17 +284,18 @@ s/\$//g
syscall++
next
}
$2 == "COMPAT" {
$2 == "COMPAT" || $2 == "CPT_NOA" {
parseline()
if (argc != 0) {
if (argc != 0 && $2 != "CPT_NOA") {
printf("struct\t%s {\n", argalias) > syscompat
for (i = 1; i <= argc; i++)
printf("\t%s %s;\n", argtype[i],
argname[i]) > syscompat
printf("};\n") > syscompat
}
else
argalias = "args"
else if($2 != "CPT_NOA")
printf("struct\t%s {\n\tint dummy;\n};\n", \
argalias) > sysarg
printf("%s\to%s __P((struct proc *, struct %s *, int []));\n", \
rettype, funcname, argalias) > syscompatdcl
printf("\t{ compat(%d,%s) },\t\t/* %d = old %s */\n", \

View File

@ -1,4 +1,4 @@
$Id: syscalls.master,v 1.16 1995/09/19 13:30:51 bde Exp $
$Id: syscalls.master,v 1.17 1995/10/07 06:24:08 swallace Exp $
; from: @(#)syscalls.master 8.2 (Berkeley) 1/13/94
;
; System call name/number master file.
@ -117,7 +117,7 @@
64 COMPAT BSD { int getpagesize(void); } \
getpagesize getpagesize_args int
65 STD BSD { int msync(caddr_t addr, size_t len, int flags); }
66 STD BSD { int vfork(void); } vfork fork_args int
66 NOARGS BSD { int vfork(void); } vfork fork_args int
67 OBSOL NOHIDE vread
68 OBSOL NOHIDE vwrite
69 STD BSD { int sbrk(int incr); }
@ -137,7 +137,7 @@
82 STD POSIX { int setpgid(int pid, int pgid); }
83 STD BSD { int setitimer(u_int which, struct itimerval *itv, \
struct itimerval *oitv); }
84 COMPAT BSD { int wait(void); } wait wait_args int
84 COMPAT BSD { int wait(void); }
85 STD BSD { int swapon(char *name); }
86 STD BSD { int getitimer(u_int which, struct itimerval *itv); }
87 COMPAT BSD { int gethostname(char *hostname, u_int len); } \
@ -155,7 +155,7 @@
96 STD BSD { int setpriority(int which, int who, int prio); }
97 STD BSD { int socket(int domain, int type, int protocol); }
98 STD BSD { int connect(int s, caddr_t name, int namelen); }
99 COMPAT BSD { int accept(int s, caddr_t name, int *anamelen); } \
99 CPT_NOA BSD { int accept(int s, caddr_t name, int *anamelen); } \
accept accept_args int
100 STD BSD { int getpriority(int which, int who); }
101 COMPAT BSD { int send(int s, caddr_t buf, int len, int flags); }
@ -189,7 +189,7 @@
struct timezone *tzp); }
123 STD BSD { int fchown(int fd, int uid, int gid); }
124 STD BSD { int fchmod(int fd, int mode); }
125 COMPAT BSD { int recvfrom(int s, caddr_t buf, size_t len, \
125 CPT_NOA BSD { int recvfrom(int s, caddr_t buf, size_t len, \
int flags, caddr_t from, int *fromlenaddr); } \
recvfrom recvfrom_args int
126 STD BSD { int setreuid(int ruid, int euid); }
@ -220,7 +220,8 @@
148 STD BSD { int quotactl(char *path, int cmd, int uid, \
caddr_t arg); }
149 COMPAT BSD { int quota(void); }
150 COMPAT BSD { int getsockname(int fdec, caddr_t asa, int *alen); }
150 CPT_NOA BSD { int getsockname(int fdec, caddr_t asa, int *alen); }\
getsockname getsockname_args int
; Syscalls 151-180 inclusive are reserved for vendor-specific
; system calls. (This includes various calls added for compatibity
@ -305,10 +306,10 @@
192 STD POSIX { int fpathconf(int fd, int name); }
193 UNIMPL NOHIDE nosys
194 STD BSD { int getrlimit(u_int which, \
struct ogetrlimit *rlp); } \
struct orlimit *rlp); } \
getrlimit __getrlimit_args int
195 STD BSD { int setrlimit(u_int which, \
struct ogetrlimit *rlp); } \
struct orlimit *rlp); } \
setrlimit __setrlimit_args int
196 STD BSD { int getdirentries(int fd, char *buf, u_int count, \
long *basep); }