Make system calls conform to a standard prototype and bring those

prototypes into scope.
This commit is contained in:
thorpej 1995-09-19 22:44:25 +00:00
parent 134a6981d1
commit 19ccdce168
3 changed files with 156 additions and 127 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: osf1_ioctl.c,v 1.1 1995/02/13 21:39:04 cgd Exp $ */ /* $NetBSD: osf1_ioctl.c,v 1.2 1995/09/19 22:44:25 thorpej Exp $ */
/* /*
* Copyright (c) 1994, 1995 Carnegie-Mellon University. * Copyright (c) 1994, 1995 Carnegie-Mellon University.
@ -57,15 +57,16 @@ int osf1_ioctl_t __P((struct proc *p, struct ioctl_args *nuap,
register_t *retval, int cmd, int dir, int len)); register_t *retval, int cmd, int dir, int len));
int int
osf1_ioctl(p, uap, retval) osf1_ioctl(p, v, retval)
struct proc *p; struct proc *p;
void *v;
register_t *retval;
{
struct osf1_ioctl_args /* { struct osf1_ioctl_args /* {
syscallarg(int) fd; syscallarg(int) fd;
syscallarg(int) com; syscallarg(int) com;
syscallarg(caddr_t) data; syscallarg(caddr_t) data;
} */ *uap; } */ *uap = v;
register_t *retval;
{
struct ioctl_args /* { struct ioctl_args /* {
syscallarg(int) fd; syscallarg(int) fd;
syscallarg(int) com; syscallarg(int) com;

View File

@ -1,4 +1,4 @@
/* $NetBSD: osf1_misc.c,v 1.4 1995/06/28 04:41:30 cgd Exp $ */ /* $NetBSD: osf1_misc.c,v 1.5 1995/09/19 22:44:26 thorpej Exp $ */
/* /*
* Copyright (c) 1994, 1995 Carnegie-Mellon University. * Copyright (c) 1994, 1995 Carnegie-Mellon University.
@ -75,15 +75,16 @@ struct emul emul_osf1 = {
}; };
int int
osf1_open(p, uap, retval) osf1_open(p, v, retval)
struct proc *p; struct proc *p;
void *v;
register_t *retval;
{
struct osf1_open_args /* { struct osf1_open_args /* {
syscallarg(char *) path; syscallarg(char *) path;
syscallarg(int) flags; syscallarg(int) flags;
syscallarg(int) mode; syscallarg(int) mode;
} */ *uap; } */ *uap = v;
register_t *retval;
{
struct open_args /* { struct open_args /* {
syscallarg(char *) path; syscallarg(char *) path;
syscallarg(int) flags; syscallarg(int) flags;
@ -105,17 +106,18 @@ osf1_open(p, uap, retval)
} }
int int
osf1_setsysinfo(p, uap, retval) osf1_setsysinfo(p, v, retval)
struct proc *p; struct proc *p;
void *v;
register_t *retval;
{
struct osf1_setsysinfo_args /* { struct osf1_setsysinfo_args /* {
syscallarg(u_long) op; syscallarg(u_long) op;
syscallarg(caddr_t) buffer; syscallarg(caddr_t) buffer;
syscallarg(u_long) nbytes; syscallarg(u_long) nbytes;
syscallarg(caddr_t) arg; syscallarg(caddr_t) arg;
syscallarg(u_long) flag; syscallarg(u_long) flag;
} */ *uap; } */ *uap = v;
register_t *retval;
{
return (0); return (0);
} }
@ -124,14 +126,15 @@ osf1_setsysinfo(p, uap, retval)
#define OSF1_RLIMIT_NOFILE 6 /* OSF1's RLIMIT_NOFILE */ #define OSF1_RLIMIT_NOFILE 6 /* OSF1's RLIMIT_NOFILE */
#define OSF1_RLIMIT_NLIMITS 8 /* Number of OSF1 rlimits */ #define OSF1_RLIMIT_NLIMITS 8 /* Number of OSF1 rlimits */
osf1_getrlimit(p, uap, retval) osf1_getrlimit(p, v, retval)
struct proc *p; struct proc *p;
struct osf1_getrlimit_args /* { void *v;
syscallarg(u_int) which;
syscallarg(struct rlimit *) rlp;
} */ *uap;
register_t *retval; register_t *retval;
{ {
struct osf1_getrlimit_args /* {
syscallarg(u_int) which;
syscallarg(struct rlimit *) rlp;
} */ *uap = v;
struct getrlimit_args /* { struct getrlimit_args /* {
syscallarg(u_int) which; syscallarg(u_int) which;
syscallarg(struct rlimit *) rlp; syscallarg(struct rlimit *) rlp;
@ -151,14 +154,15 @@ osf1_getrlimit(p, uap, retval)
return getrlimit(p, &a, retval); return getrlimit(p, &a, retval);
} }
osf1_setrlimit(p, uap, retval) osf1_setrlimit(p, v, retval)
struct proc *p; struct proc *p;
void *v;
register_t *retval;
{
struct osf1_setrlimit_args /* { struct osf1_setrlimit_args /* {
syscallarg(u_int) which; syscallarg(u_int) which;
syscallarg(struct rlimit *) rlp; syscallarg(struct rlimit *) rlp;
} */ *uap; } */ *uap = v;
register_t *retval;
{
struct setrlimit_args /* { struct setrlimit_args /* {
syscallarg(u_int) which; syscallarg(u_int) which;
syscallarg(struct rlimit *) rlp; syscallarg(struct rlimit *) rlp;
@ -189,18 +193,19 @@ osf1_setrlimit(p, uap, retval)
#define OSF1_MAP_UNALIGNED 0x800 #define OSF1_MAP_UNALIGNED 0x800
int int
osf1_mmap(p, uap, retval) osf1_mmap(p, v, retval)
struct proc *p; struct proc *p;
void *v;
register_t *retval;
{
struct osf1_mmap_args /* { struct osf1_mmap_args /* {
syscallarg(caddr_t) addr; syscallarg(caddr_t) addr;
syscallarg(size_t) len; syscallarg(size_t) len;
syscallarg(int) prot; syscallarg(int) prot;
syscallarg(int) flags; syscallarg(int) flags;
syscallarg(int) fd; syscallarg(int) fd;
syscallarg(off_t) pos; syscallarg(off_t) pos;
} */ *uap; } */ *uap = v;
register_t *retval;
{
struct mmap_args /* { struct mmap_args /* {
syscallarg(caddr_t) addr; syscallarg(caddr_t) addr;
syscallarg(size_t) len; syscallarg(size_t) len;
@ -246,14 +251,15 @@ osf1_mmap(p, uap, retval)
} }
int int
osf1_usleep_thread(p, uap, retval) osf1_usleep_thread(p, v, retval)
struct proc *p; struct proc *p;
void *v;
register_t *retval;
{
struct osf1_usleep_thread_args /* { struct osf1_usleep_thread_args /* {
syscallarg(struct timeval *) sleep; syscallarg(struct timeval *) sleep;
syscallarg(struct timeval *) slept; syscallarg(struct timeval *) slept;
} */ *uap; } */ *uap = v;
register_t *retval;
{
struct timeval tv, endtv; struct timeval tv, endtv;
u_long ticks; u_long ticks;
int error, s; int error, s;
@ -309,15 +315,16 @@ copysigaction(osf, bsd)
} }
int int
osf1_sigaction(p, uap, retval) osf1_sigaction(p, v, retval)
struct proc *p; struct proc *p;
struct osf1_sigaction_args /* { void *v;
syscallarg(int) signum;
syscallarg(struct sigaction *) nsa;
syscallarg(struct sigaction *) osa;
} */ *uap;
register_t *retval; register_t *retval;
{ {
struct osf1_sigaction_args /* {
syscallarg(int) signum;
syscallarg(struct sigaction *) nsa;
syscallarg(struct sigaction *) osa;
} */ *uap = v;
struct sigaction_args /* { struct sigaction_args /* {
syscallarg(int) signum; syscallarg(int) signum;
syscallarg(struct sigaction *) nsa; syscallarg(struct sigaction *) nsa;
@ -385,14 +392,15 @@ struct osf1_stat {
* Get file status; this version follows links. * Get file status; this version follows links.
*/ */
/* ARGSUSED */ /* ARGSUSED */
osf1_stat(p, uap, retval) osf1_stat(p, v, retval)
struct proc *p; struct proc *p;
void *v;
register_t *retval;
{
register struct osf1_stat_args /* { register struct osf1_stat_args /* {
syscallarg(char *) path; syscallarg(char *) path;
syscallarg(struct osf1_stat *) ub; syscallarg(struct osf1_stat *) ub;
} */ *uap; } */ *uap = v;
register_t *retval;
{
struct stat sb; struct stat sb;
struct osf1_stat osb; struct osf1_stat osb;
int error; int error;
@ -415,14 +423,15 @@ osf1_stat(p, uap, retval)
* Get file status; this version does not follow links. * Get file status; this version does not follow links.
*/ */
/* ARGSUSED */ /* ARGSUSED */
osf1_lstat(p, uap, retval) osf1_lstat(p, v, retval)
struct proc *p; struct proc *p;
void *v;
register_t *retval;
{
register struct osf1_lstat_args /* { register struct osf1_lstat_args /* {
syscallarg(char *) path; syscallarg(char *) path;
syscallarg(struct osf1_stat *) ub; syscallarg(struct osf1_stat *) ub;
} */ *uap; } */ *uap = v;
register_t *retval;
{
struct stat sb; struct stat sb;
struct osf1_stat osb; struct osf1_stat osb;
int error; int error;
@ -444,14 +453,15 @@ osf1_lstat(p, uap, retval)
/* /*
* Return status information about a file descriptor. * Return status information about a file descriptor.
*/ */
osf1_fstat(p, uap, retval) osf1_fstat(p, v, retval)
struct proc *p; struct proc *p;
void *v;
register_t *retval;
{
register struct osf1_fstat_args /* { register struct osf1_fstat_args /* {
syscallarg(int) fd; syscallarg(int) fd;
syscallarg(struct osf1_stat *) sb; syscallarg(struct osf1_stat *) sb;
} */ *uap; } */ *uap = v;
register_t *retval;
{
register struct filedesc *fdp = p->p_fd; register struct filedesc *fdp = p->p_fd;
register struct file *fp; register struct file *fp;
struct stat ub; struct stat ub;
@ -514,15 +524,16 @@ cvtstat2osf1(st, ost)
} }
int int
osf1_mknod(p, uap, retval) osf1_mknod(p, v, retval)
struct proc *p; struct proc *p;
void *v;
register_t *retval;
{
struct osf1_mknod_args /* { struct osf1_mknod_args /* {
syscallarg(char *) path; syscallarg(char *) path;
syscallarg(int) mode; syscallarg(int) mode;
syscallarg(int) dev; syscallarg(int) dev;
} */ *uap; } */ *uap = v;
register_t *retval;
{
struct mknod_args a; struct mknod_args a;
SCARG(&a, path) = SCARG(uap, path); SCARG(&a, path) = SCARG(uap, path);
@ -544,15 +555,16 @@ osf1_mknod(p, uap, retval)
#define OSF1_FSYNC 0x04000 /* XXX OSF1_O_SYNC */ #define OSF1_FSYNC 0x04000 /* XXX OSF1_O_SYNC */
int int
osf1_fcntl(p, uap, retval) osf1_fcntl(p, v, retval)
struct proc *p; struct proc *p;
void *v;
register_t *retval;
{
struct osf1_fcntl_args /* { struct osf1_fcntl_args /* {
syscallarg(int) fd; syscallarg(int) fd;
syscallarg(int) cmd; syscallarg(int) cmd;
syscallarg(void *) arg; syscallarg(void *) arg;
} */ *uap; } */ *uap = v;
register_t *retval;
{
struct fcntl_args a; struct fcntl_args a;
long tmp; long tmp;
int error; int error;
@ -613,15 +625,16 @@ osf1_fcntl(p, uap, retval)
} }
int int
osf1_socket(p, uap, retval) osf1_socket(p, v, retval)
struct proc *p; struct proc *p;
void *v;
register_t *retval;
{
register struct osf1_socket_args /* { register struct osf1_socket_args /* {
syscallarg(int) domain; syscallarg(int) domain;
syscallarg(int) type; syscallarg(int) type;
syscallarg(int) protocol; syscallarg(int) protocol;
} */ *uap; } */ *uap = v;
register_t *retval;
{
struct socket_args a; struct socket_args a;
if (SCARG(uap, type) > AF_LINK) if (SCARG(uap, type) > AF_LINK)
@ -635,8 +648,11 @@ osf1_socket(p, uap, retval)
} }
int int
osf1_sendto(p, uap, retval) osf1_sendto(p, v, retval)
struct proc *p; struct proc *p;
void *v;
register_t *retval;
{
register struct sendto_args /* { register struct sendto_args /* {
syscallarg(int) s; syscallarg(int) s;
syscallarg(caddr_t) buf; syscallarg(caddr_t) buf;
@ -644,9 +660,7 @@ osf1_sendto(p, uap, retval)
syscallarg(int) flags; syscallarg(int) flags;
syscallarg(caddr_t) to; syscallarg(caddr_t) to;
syscallarg(int) tolen; syscallarg(int) tolen;
} */ *uap; } */ *uap = v;
register_t *retval;
{
struct sendto_args a; struct sendto_args a;
if (SCARG(uap, flags) & ~0x7f) /* unsupported flags */ if (SCARG(uap, flags) & ~0x7f) /* unsupported flags */
@ -673,13 +687,14 @@ osf1_sendto(p, uap, retval)
#define OSF1_RB_ALLFLAGS 0x0ff /* all of the above */ #define OSF1_RB_ALLFLAGS 0x0ff /* all of the above */
int int
osf1_reboot(p, uap, retval) osf1_reboot(p, v, retval)
struct proc *p; struct proc *p;
struct osf1_reboot_args /* { void *v;
syscallarg(int) opt;
} */ *uap;
register_t *retval; register_t *retval;
{ {
struct osf1_reboot_args /* {
syscallarg(int) opt;
} */ *uap = v;
struct reboot_args a; struct reboot_args a;
if (SCARG(uap, opt) & ~OSF1_RB_ALLFLAGS && if (SCARG(uap, opt) & ~OSF1_RB_ALLFLAGS &&
@ -704,15 +719,16 @@ osf1_reboot(p, uap, retval)
} }
int int
osf1_lseek(p, uap, retval) osf1_lseek(p, v, retval)
struct proc *p; struct proc *p;
struct osf1_lseek_args /* { void *v;
syscallarg(int) fd;
syscallarg(off_t) offset;
syscallarg(int) whence;
} */ *uap;
register_t *retval; register_t *retval;
{ {
struct osf1_lseek_args /* {
syscallarg(int) fd;
syscallarg(off_t) offset;
syscallarg(int) whence;
} */ *uap = v;
struct lseek_args a; struct lseek_args a;
SCARG(&a, fd) = SCARG(uap, fd); SCARG(&a, fd) = SCARG(uap, fd);
@ -738,13 +754,14 @@ osf1_lseek(p, uap, retval)
* this function call. * this function call.
*/ */
int int
osf1_setuid(p, uap, retval) osf1_setuid(p, v, retval)
struct proc *p; struct proc *p;
struct osf1_setuid_args /* { void *v;
syscallargs(uid_t) uid;
} */ *uap;
register_t *retval; register_t *retval;
{ {
struct osf1_setuid_args /* {
syscallargs(uid_t) uid;
} */ *uap = v;
register struct pcred *pc = p->p_cred; register struct pcred *pc = p->p_cred;
uid_t uid = SCARG(uap, uid); uid_t uid = SCARG(uap, uid);
int error; int error;
@ -773,13 +790,14 @@ osf1_setuid(p, uap, retval)
* setuid(), you'll get a correct description of setgid(). * setuid(), you'll get a correct description of setgid().
*/ */
int int
osf1_setgid(p, uap, retval) osf1_setgid(p, v, retval)
struct proc *p; struct proc *p;
struct osf1_setgid_args /* { void *v;
syscallargs(gid_t) gid;
} */ *uap;
register_t *retval; register_t *retval;
{ {
struct osf1_setgid_args /* {
syscallargs(gid_t) gid;
} */ *uap = v;
register struct pcred *pc = p->p_cred; register struct pcred *pc = p->p_cred;
gid_t gid = SCARG(uap, gid); gid_t gid = SCARG(uap, gid);
int error; int error;
@ -808,15 +826,16 @@ struct osf1_iovec {
}; };
int int
osf1_readv(p, uap, retval) osf1_readv(p, v, retval)
struct proc *p; struct proc *p;
void *v;
register_t *retval;
{
struct osf1_readv_args /* { struct osf1_readv_args /* {
syscallarg(int) fd; syscallarg(int) fd;
syscallarg(struct osf1_iovec *) iovp; syscallarg(struct osf1_iovec *) iovp;
syscallarg(u_int) iovcnt; syscallarg(u_int) iovcnt;
} */ *uap; } */ *uap = v;
register_t *retval;
{
struct readv_args /* { struct readv_args /* {
syscallarg(int) fd; syscallarg(int) fd;
syscallarg(struct iovec *) iovp; syscallarg(struct iovec *) iovp;
@ -863,15 +882,16 @@ punt:
} }
int int
osf1_writev(p, uap, retval) osf1_writev(p, v, retval)
struct proc *p; struct proc *p;
void *v;
register_t *retval;
{
struct osf1_writev_args /* { struct osf1_writev_args /* {
syscallarg(int) fd; syscallarg(int) fd;
syscallarg(struct osf1_iovec *) iovp; syscallarg(struct osf1_iovec *) iovp;
syscallarg(u_int) iovcnt; syscallarg(u_int) iovcnt;
} */ *uap; } */ *uap = v;
register_t *retval;
{
struct writev_args /* { struct writev_args /* {
syscallarg(int) fd; syscallarg(int) fd;
syscallarg(struct iovec *) iovp; syscallarg(struct iovec *) iovp;
@ -919,14 +939,15 @@ punt:
/* More of the stupid off_t padding! */ /* More of the stupid off_t padding! */
int int
osf1_truncate(p, uap, retval) osf1_truncate(p, v, retval)
struct proc *p; struct proc *p;
void *v;
register_t retval;
{
struct osf1_truncate_args /* { struct osf1_truncate_args /* {
syscallarg(char *) path; syscallarg(char *) path;
syscallarg(off_t) length; syscallarg(off_t) length;
} */ *uap; } */ *uap = v;
register_t retval;
{
struct truncate_args a; struct truncate_args a;
SCARG(&a, path) = SCARG(uap, path); SCARG(&a, path) = SCARG(uap, path);
@ -937,14 +958,15 @@ osf1_truncate(p, uap, retval)
} }
int int
osf1_ftruncate(p, uap, retval) osf1_ftruncate(p, v, retval)
struct proc *p; struct proc *p;
void *v;
register_t retval;
{
struct osf1_ftruncate_args /* { struct osf1_ftruncate_args /* {
syscallarg(int) fd; syscallarg(int) fd;
syscallarg(off_t) length; syscallarg(off_t) length;
} */ *uap; } */ *uap = v;
register_t retval;
{
struct ftruncate_args a; struct ftruncate_args a;
SCARG(&a, fd) = SCARG(uap, fd); SCARG(&a, fd) = SCARG(uap, fd);
@ -955,13 +977,14 @@ osf1_ftruncate(p, uap, retval)
} }
int int
osf1_getsid(p, uap, retval) osf1_getsid(p, v, retval)
struct proc *p; struct proc *p;
struct osf1_getsid_args /* { void *v;
syscallarg(pid_t) pid;
} */ *uap;
register_t *retval; register_t *retval;
{ {
struct osf1_getsid_args /* {
syscallarg(pid_t) pid;
} */ *uap = v;
struct proc *t; struct proc *t;
if (SCARG(uap, pid) == 0) if (SCARG(uap, pid) == 0)

View File

@ -1,4 +1,4 @@
/* $NetBSD: osf1_mount.c,v 1.3 1995/06/18 14:46:44 cgd Exp $ */ /* $NetBSD: osf1_mount.c,v 1.4 1995/09/19 22:44:27 thorpej Exp $ */
/* /*
* Copyright (c) 1994, 1995 Carnegie-Mellon University. * Copyright (c) 1994, 1995 Carnegie-Mellon University.
@ -189,15 +189,16 @@ bsd2osf_statfs(bsfs, osfs)
} }
int int
osf1_statfs(p, uap, retval) osf1_statfs(p, v, retval)
struct proc *p; struct proc *p;
void *v;
register_t *retval;
{
struct osf1_statfs_args /* { struct osf1_statfs_args /* {
syscallarg(char *) path; syscallarg(char *) path;
syscallarg(struct osf1_statfs *) buf; syscallarg(struct osf1_statfs *) buf;
syscallarg(int) len; syscallarg(int) len;
} */ *uap; } */ *uap = v;
register_t *retval;
{
struct mount *mp; struct mount *mp;
struct statfs *sp; struct statfs *sp;
struct osf1_statfs osfs; struct osf1_statfs osfs;
@ -219,15 +220,16 @@ osf1_statfs(p, uap, retval)
} }
int int
osf1_fstatfs(p, uap, retval) osf1_fstatfs(p, v, retval)
struct proc *p; struct proc *p;
struct osf1_fstatfs_args /* { void *v;
syscallarg(int) fd;
syscallarg(struct osf1_statfs *) buf;
syscallarg(int) len;
} */ *uap;
register_t *retval; register_t *retval;
{ {
struct osf1_fstatfs_args /* {
syscallarg(int) fd;
syscallarg(struct osf1_statfs *) buf;
syscallarg(int) len;
} */ *uap = v;
struct file *fp; struct file *fp;
struct mount *mp; struct mount *mp;
struct statfs *sp; struct statfs *sp;
@ -247,15 +249,16 @@ osf1_fstatfs(p, uap, retval)
} }
int int
osf1_getfsstat(p, uap, retval) osf1_getfsstat(p, v, retval)
struct proc *p; struct proc *p;
void *v;
register_t *retval;
{
register struct osf1_getfsstat_args /* { register struct osf1_getfsstat_args /* {
syscallarg(struct osf1_statfs *) buf; syscallarg(struct osf1_statfs *) buf;
syscallarg(long) bufsize; syscallarg(long) bufsize;
syscallarg(int) flags; syscallarg(int) flags;
} */ *uap; } */ *uap = v;
register_t *retval;
{
struct mount *mp, *nmp; struct mount *mp, *nmp;
struct statfs *sp; struct statfs *sp;
struct osf1_statfs osfs; struct osf1_statfs osfs;
@ -299,14 +302,15 @@ osf1_getfsstat(p, uap, retval)
} }
int int
osf1_unmount(p, uap, retval) osf1_unmount(p, v, retval)
struct proc *p; struct proc *p;
void *v;
register_t *retval;
{
struct osf1_unmount_args /* { struct osf1_unmount_args /* {
syscallarg(char *) path; syscallarg(char *) path;
syscallarg(int) flags; syscallarg(int) flags;
} */ *uap; } */ *uap = v;
register_t *retval;
{
struct unmount_args a; struct unmount_args a;
SCARG(&a, path) = SCARG(uap, path); SCARG(&a, path) = SCARG(uap, path);
@ -322,16 +326,17 @@ osf1_unmount(p, uap, retval)
} }
int int
osf1_mount(p, uap, retval) osf1_mount(p, v, retval)
struct proc *p; struct proc *p;
void *v;
register_t *retval;
{
struct osf1_mount_args /* { struct osf1_mount_args /* {
syscallarg(int) type; syscallarg(int) type;
syscallarg(char *) path; syscallarg(char *) path;
syscallarg(int) flags; syscallarg(int) flags;
syscallarg(caddr_t) data; syscallarg(caddr_t) data;
} */ *uap; } */ *uap = v;
register_t *retval;
{
struct mount_args a; struct mount_args a;
int error; int error;