ANSIfy, some KNF.

This commit is contained in:
simonb 2004-04-21 07:05:07 +00:00
parent eb71bd67da
commit b81e6f2ef6
7 changed files with 70 additions and 200 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ultrix_exec.h,v 1.3 2003/06/29 22:29:52 fvdl Exp $ */
/* $NetBSD: ultrix_exec.h,v 1.4 2004/04/21 07:05:07 simonb Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -34,4 +34,4 @@
extern const struct emul emul_ultrix;
int ultrix_exec_ecoff_probe __P((struct proc *, struct exec_package *));
int ultrix_exec_ecoff_probe(struct proc *, struct exec_package *);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ultrix_exec_ecoff.c,v 1.6 2004/02/13 11:36:20 wiz Exp $ */
/* $NetBSD: ultrix_exec_ecoff.c,v 1.7 2004/04/21 07:05:07 simonb Exp $ */
/*
* Copyright (c) 1995, 1997 Jonathan Stone (hereinafter referred to as the author)
@ -80,7 +80,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ultrix_exec_ecoff.c,v 1.6 2004/02/13 11:36:20 wiz Exp $");
__KERNEL_RCSID(0, "$NetBSD: ultrix_exec_ecoff.c,v 1.7 2004/04/21 07:05:07 simonb Exp $");
#include <sys/param.h>
#include <sys/exec.h>
@ -96,10 +96,9 @@ __KERNEL_RCSID(0, "$NetBSD: ultrix_exec_ecoff.c,v 1.6 2004/02/13 11:36:20 wiz Ex
*
*/
int
ultrix_exec_ecoff_probe(p, epp)
struct proc *p;
struct exec_package *epp;
ultrix_exec_ecoff_probe(struct proc *p, struct exec_package *epp)
{
/* XXX should add some check here */
return 0;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: ultrix_fs.c,v 1.28 2004/04/21 05:20:27 simonb Exp $ */
/* $NetBSD: ultrix_fs.c,v 1.29 2004/04/21 07:05:07 simonb Exp $ */
/*
* Copyright (c) 1995, 1997 Jonathan Stone
@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ultrix_fs.c,v 1.28 2004/04/21 05:20:27 simonb Exp $");
__KERNEL_RCSID(0, "$NetBSD: ultrix_fs.c,v 1.29 2004/04/21 07:05:07 simonb Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -151,16 +151,14 @@ struct ultrix_getmnt_args {
static void
make_ultrix_mntent __P(( struct statvfs *sp, struct ultrix_fs_data *tem));
make_ultrix_mntent(struct statvfs *, struct ultrix_fs_data *);
/*
* Construct an Ultrix getmnt() ultrix_fs_data from the native NetBSD
* struct statfs.
*/
static void
make_ultrix_mntent(sp, tem)
struct statvfs *sp;
struct ultrix_fs_data *tem;
make_ultrix_mntent(struct statvfs *sp, struct ultrix_fs_data *tem)
{
memset(tem, 0, sizeof (*tem));
@ -204,10 +202,7 @@ make_ultrix_mntent(sp, tem)
}
int
ultrix_sys_getmnt(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
ultrix_sys_getmnt(struct lwp *l, void *v, register_t *retval)
{
struct ultrix_sys_getmnt_args *uap = v;
struct proc *p = l->l_proc;
@ -348,10 +343,7 @@ struct ultrix_ufs_args {
};
int
ultrix_sys_mount(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
ultrix_sys_mount(struct lwp *l, void *v, register_t *retval)
{
struct ultrix_sys_mount_args *uap = v;
struct proc *p = l->l_proc;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ultrix_ioctl.c,v 1.23 2003/06/29 22:29:53 fvdl Exp $ */
/* $NetBSD: ultrix_ioctl.c,v 1.24 2004/04/21 07:05:07 simonb Exp $ */
/* from : NetBSD: sunos_ioctl.c,v 1.21 1995/10/07 06:27:31 mycroft Exp */
/*
@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ultrix_ioctl.c,v 1.23 2003/06/29 22:29:53 fvdl Exp $");
__KERNEL_RCSID(0, "$NetBSD: ultrix_ioctl.c,v 1.24 2004/04/21 07:05:07 simonb Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_ultrix.h"
@ -119,10 +119,10 @@ static u_long s2btab[] = {
(emul_cc) ? (emul_cc) : _POSIX_VDISABLE;
static void stios2btios __P((struct emul_termios *, struct termios *));
static void btios2stios __P((struct termios *, struct emul_termios *));
static void stios2stio __P((struct emul_termios *, struct emul_termio *));
static void stio2stios __P((struct emul_termio *, struct emul_termios *));
static void stios2btios(struct emul_termios *, struct termios *);
static void btios2stios(struct termios *, struct emul_termios *);
static void stios2stio(struct emul_termios *, struct emul_termio *);
static void stio2stios(struct emul_termio *, struct emul_termios *);
/*
* these two conversion functions have mostly been done
@ -141,9 +141,7 @@ static void stio2stios __P((struct emul_termio *, struct emul_termios *));
static void
stios2btios(st, bt)
struct emul_termios *st;
struct termios *bt;
stios2btios(struct emul_termios *st, struct termios *bt)
{
u_long l, r;
@ -273,9 +271,7 @@ stios2btios(st, bt)
* Convert bsd termios to "sunos" emulated termios
*/
static void
btios2stios(bt, st)
struct termios *bt;
struct emul_termios *st;
btios2stios(struct termios *bt, struct emul_termios *st)
{
u_long l, r;
@ -420,9 +416,7 @@ btios2stios(bt, st)
* Convert emulated struct termios to termio(?)
*/
static void
stios2stio(ts, t)
struct emul_termios *ts;
struct emul_termio *t;
stios2stio(struct emul_termios *ts, struct emul_termio *t)
{
t->c_iflag = ts->c_iflag;
t->c_oflag = ts->c_oflag;
@ -436,9 +430,7 @@ stios2stio(ts, t)
* Convert the other way
*/
static void
stio2stios(t, ts)
struct emul_termio *t;
struct emul_termios *ts;
stio2stios(struct emul_termio *t, struct emul_termios *ts)
{
ts->c_iflag = t->c_iflag;
ts->c_oflag = t->c_oflag;
@ -449,10 +441,7 @@ stio2stios(t, ts)
}
int
ultrix_sys_ioctl(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
ultrix_sys_ioctl(struct lwp *l, void *v, register_t *retval)
{
struct ultrix_sys_ioctl_args *uap = v;
struct proc *p = l->l_proc;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ultrix_misc.c,v 1.92 2003/12/20 19:01:30 fvdl Exp $ */
/* $NetBSD: ultrix_misc.c,v 1.93 2004/04/21 07:05:07 simonb Exp $ */
/*
* Copyright (c) 1995, 1997 Jonathan Stone (hereinafter referred to as the author)
@ -76,7 +76,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ultrix_misc.c,v 1.92 2003/12/20 19:01:30 fvdl Exp $");
__KERNEL_RCSID(0, "$NetBSD: ultrix_misc.c,v 1.93 2004/04/21 07:05:07 simonb Exp $");
#if defined(_KERNEL_OPT)
#include "opt_nfsserver.h"
@ -144,8 +144,8 @@ __KERNEL_RCSID(0, "$NetBSD: ultrix_misc.c,v 1.92 2003/12/20 19:01:30 fvdl Exp $"
#include <mips/cachectl.h>
#endif
static int ultrix_to_bsd_flock __P((struct ultrix_flock *, struct flock *));
static void bsd_to_ultrix_flock __P((struct flock *, struct ultrix_flock *));
static int ultrix_to_bsd_flock(struct ultrix_flock *, struct flock *);
static void bsd_to_ultrix_flock(struct flock *, struct ultrix_flock *);
extern struct sysent ultrix_sysent[];
extern const char * const ultrix_syscallnames[];
@ -153,7 +153,7 @@ extern char ultrix_sigcode[], ultrix_esigcode[];
#ifdef __HAVE_SYSCALL_INTERN
void syscall_intern(struct proc *);
#else
void syscall __P((void));
void syscall(void);
#endif
struct uvm_object *emul_ultrix_object;
@ -193,10 +193,7 @@ const struct emul emul_ultrix = {
#define GSI_PROG_ENV 1
int
ultrix_sys_getsysinfo(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
ultrix_sys_getsysinfo(struct lwp *l, void *v, register_t *retval)
{
struct ultrix_sys_getsysinfo_args *uap = v;
static short progenv = 0;
@ -215,10 +212,7 @@ ultrix_sys_getsysinfo(l, v, retval)
}
int
ultrix_sys_setsysinfo(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
ultrix_sys_setsysinfo(struct lwp *l, void *v, register_t *retval)
{
#ifdef notyet
@ -230,10 +224,7 @@ ultrix_sys_setsysinfo(l, v, retval)
}
int
ultrix_sys_waitpid(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
ultrix_sys_waitpid(struct lwp *l, void *v, register_t *retval)
{
struct ultrix_sys_waitpid_args *uap = v;
struct sys_wait4_args ua;
@ -247,10 +238,7 @@ ultrix_sys_waitpid(l, v, retval)
}
int
ultrix_sys_wait3(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
ultrix_sys_wait3(struct lwp *l, void *v, register_t *retval)
{
struct ultrix_sys_wait3_args *uap = v;
struct sys_wait4_args ua;
@ -271,10 +259,7 @@ ultrix_sys_wait3(l, v, retval)
* limit nfds to at most FD_MAX.
*/
int
ultrix_sys_select(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
ultrix_sys_select(struct lwp *l, void *v, register_t *retval)
{
struct sys_select_args *uap = v;
struct timeval atv;
@ -309,10 +294,7 @@ done:
#if defined(NFS)
int
async_daemon(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
async_daemon(struct lwp *l, void *v, register_t *retval)
{
struct sys_nfssvc_args ouap;
@ -327,10 +309,7 @@ async_daemon(l, v, retval)
#define SUN__MAP_NEW 0x80000000 /* if not, old mmap & cannot handle */
int
ultrix_sys_mmap(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
ultrix_sys_mmap(struct lwp *l, void *v, register_t *retval)
{
struct ultrix_sys_mmap_args *uap = v;
struct sys_mmap_args ouap;
@ -355,10 +334,7 @@ ultrix_sys_mmap(l, v, retval)
}
int
ultrix_sys_setsockopt(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
ultrix_sys_setsockopt(struct lwp *l, void *v, register_t *retval)
{
struct ultrix_sys_setsockopt_args *uap = v;
struct proc *p = l->l_proc;
@ -428,10 +404,7 @@ struct ultrix_utsname {
};
int
ultrix_sys_uname(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
ultrix_sys_uname(struct lwp *l, void *v, register_t *retval)
{
struct ultrix_sys_uname_args *uap = v;
struct ultrix_utsname sut;
@ -461,10 +434,7 @@ ultrix_sys_uname(l, v, retval)
}
int
ultrix_sys_setpgrp(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
ultrix_sys_setpgrp(struct lwp *l, void *v, register_t *retval)
{
struct ultrix_sys_setpgrp_args *uap = v;
struct proc *p = l->l_proc;
@ -484,10 +454,7 @@ ultrix_sys_setpgrp(l, v, retval)
#if defined (NFSSERVER)
int
ultrix_sys_nfssvc(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
ultrix_sys_nfssvc(struct lwp *l, void *v, register_t *retval)
{
#if 0 /* XXX */
@ -526,10 +493,7 @@ struct ultrix_ustat {
};
int
ultrix_sys_ustat(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
ultrix_sys_ustat(struct lwp *l, void *v, register_t *retval)
{
struct ultrix_sys_ustat_args *uap = v;
struct ultrix_ustat us;
@ -548,10 +512,7 @@ ultrix_sys_ustat(l, v, retval)
}
int
ultrix_sys_quotactl(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
ultrix_sys_quotactl(struct lwp *l, void *v, register_t *retval)
{
#ifdef notyet
@ -562,10 +523,7 @@ ultrix_sys_quotactl(l, v, retval)
}
int
ultrix_sys_vhangup(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
ultrix_sys_vhangup(struct lwp *l, void *v, register_t *retval)
{
return 0;
@ -577,10 +535,7 @@ ultrix_sys_vhangup(l, v, retval)
*/
#ifdef __mips
int
ultrix_sys_cacheflush(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
ultrix_sys_cacheflush(struct lwp *l, void *v, register_t *retval)
{
struct ultrix_sys_cacheflush_args /* {
syscallarg(void *) addr;
@ -597,10 +552,7 @@ ultrix_sys_cacheflush(l, v, retval)
int
ultrix_sys_cachectl(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
ultrix_sys_cachectl(struct lwp *l, void *v, register_t *retval)
{
struct ultrix_sys_cachectl_args /* {
syscallarg(void *) addr;
@ -619,10 +571,7 @@ ultrix_sys_cachectl(l, v, retval)
int
ultrix_sys_exportfs(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
ultrix_sys_exportfs(struct lwp *l, void *v, register_t *retval)
{
#ifdef notyet
struct ultrix_sys_exportfs_args *uap = v;
@ -636,10 +585,7 @@ ultrix_sys_exportfs(l, v, retval)
}
int
ultrix_sys_sigpending(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
ultrix_sys_sigpending(struct lwp *l, void *v, register_t *retval)
{
struct ultrix_sys_sigpending_args *uap = v;
sigset_t ss;
@ -652,10 +598,7 @@ ultrix_sys_sigpending(l, v, retval)
}
int
ultrix_sys_sigreturn(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
ultrix_sys_sigreturn(struct lwp *l, void *v, register_t *retval)
{
struct ultrix_sys_sigreturn_args *uap = v;
@ -665,10 +608,7 @@ ultrix_sys_sigreturn(l, v, retval)
}
int
ultrix_sys_sigcleanup(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
ultrix_sys_sigcleanup(struct lwp *l, void *v, register_t *retval)
{
struct ultrix_sys_sigcleanup_args *uap = v;
@ -678,10 +618,7 @@ ultrix_sys_sigcleanup(l, v, retval)
}
int
ultrix_sys_sigsuspend(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
ultrix_sys_sigsuspend(struct lwp *l, void *v, register_t *retval)
{
struct ultrix_sys_sigsuspend_args *uap = v;
int mask = SCARG(uap, mask);
@ -700,10 +637,7 @@ ultrix_sys_sigsuspend(l, v, retval)
#define ULTRIX_SV_OLDSIG 0x1000 /* Emulate old signal() for POSIX */
int
ultrix_sys_sigvec(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
ultrix_sys_sigvec(struct lwp *l, void *v, register_t *retval)
{
struct ultrix_sys_sigvec_args *uap = v;
struct sigvec nsv, osv;
@ -748,14 +682,10 @@ ultrix_sys_sigvec(l, v, retval)
}
int
ultrix_sys_shmsys(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
ultrix_sys_shmsys(struct lwp *l, void *v, register_t *retval)
{
#ifdef SYSVSHM
/* Ultrix SVSHM weirndess: */
struct ultrix_sys_shmsys_args *uap = v;
struct sys_shmat_args shmat_args;
@ -797,9 +727,7 @@ ultrix_sys_shmsys(l, v, retval)
}
static int
ultrix_to_bsd_flock(ufl, fl)
struct ultrix_flock *ufl;
struct flock *fl;
ultrix_to_bsd_flock(struct ultrix_flock *ufl, struct flock *fl)
{
fl->l_start = ufl->l_start;
@ -825,9 +753,7 @@ ultrix_to_bsd_flock(ufl, fl)
}
static void
bsd_to_ultrix_flock(fl, ufl)
struct flock *fl;
struct ultrix_flock *ufl;
bsd_to_ultrix_flock(struct flock *fl, struct ultrix_flock *ufl)
{
ufl->l_start = fl->l_start;
@ -849,10 +775,7 @@ bsd_to_ultrix_flock(fl, ufl)
}
int
ultrix_sys_fcntl(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
ultrix_sys_fcntl(struct lwp *l, void *v, register_t *retval)
{
struct ultrix_sys_fcntl_args *uap = v;
struct proc *p = l->l_proc;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ultrix_pathname.c,v 1.21 2004/04/21 05:20:27 simonb Exp $ */
/* $NetBSD: ultrix_pathname.c,v 1.22 2004/04/21 07:05:07 simonb Exp $ */
/*
* Copyright (c) 1992, 1993
@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ultrix_pathname.c,v 1.21 2004/04/21 05:20:27 simonb Exp $");
__KERNEL_RCSID(0, "$NetBSD: ultrix_pathname.c,v 1.22 2004/04/21 07:05:07 simonb Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -77,13 +77,10 @@ __KERNEL_RCSID(0, "$NetBSD: ultrix_pathname.c,v 1.21 2004/04/21 05:20:27 simonb
#include <compat/ultrix/ultrix_syscallargs.h>
#include <compat/common/compat_util.h>
static int ultrixstatfs __P((struct statvfs *sp, caddr_t buf));
static int ultrixstatfs(struct statvfs *, caddr_t);
int
ultrix_sys_creat(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
ultrix_sys_creat(struct lwp *l, void *v, register_t *retval)
{
struct ultrix_sys_creat_args *uap = v;
struct sys_open_args ap;
@ -101,10 +98,7 @@ ultrix_sys_creat(l, v, retval)
int
ultrix_sys_access(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
ultrix_sys_access(struct lwp *l, void *v, register_t *retval)
{
struct ultrix_sys_access_args *uap = v;
struct proc *p = l->l_proc;
@ -115,10 +109,7 @@ ultrix_sys_access(l, v, retval)
}
int
ultrix_sys_stat(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
ultrix_sys_stat(struct lwp *l, void *v, register_t *retval)
{
struct ultrix_sys_stat_args *uap = v;
struct proc *p = l->l_proc;
@ -129,10 +120,7 @@ ultrix_sys_stat(l, v, retval)
}
int
ultrix_sys_lstat(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
ultrix_sys_lstat(struct lwp *l, void *v, register_t *retval)
{
struct ultrix_sys_lstat_args *uap = v;
struct proc *p = l->l_proc;
@ -143,10 +131,7 @@ ultrix_sys_lstat(l, v, retval)
}
int
ultrix_sys_execv(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
ultrix_sys_execv(struct lwp *l, void *v, register_t *retval)
{
struct ultrix_sys_execv_args /* {
syscallarg(const char *) path;
@ -167,10 +152,7 @@ ultrix_sys_execv(l, v, retval)
}
int
ultrix_sys_execve(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
ultrix_sys_execve(struct lwp *l, void *v, register_t *retval)
{
struct ultrix_sys_execve_args /* {
syscallarg(const char *) path;
@ -192,10 +174,7 @@ ultrix_sys_execve(l, v, retval)
}
int
ultrix_sys_open(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
ultrix_sys_open(struct lwp *l, void *v, register_t *retval)
{
struct ultrix_sys_open_args *uap = v;
struct proc *p = l->l_proc;
@ -254,9 +233,7 @@ struct ultrix_statfs {
* block units to DEV_BSIZE necessary?
*/
static int
ultrixstatfs(sp, buf)
struct statvfs *sp;
caddr_t buf;
ultrixstatfs(struct statvfs *sp, caddr_t buf)
{
struct ultrix_statfs ssfs;
@ -274,10 +251,7 @@ ultrixstatfs(sp, buf)
int
ultrix_sys_statfs(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
ultrix_sys_statfs(struct lwp *l, void *v, register_t *retval)
{
struct ultrix_sys_statfs_args *uap = v;
struct proc *p = l->l_proc;
@ -308,10 +282,7 @@ ultrix_sys_statfs(l, v, retval)
* it goes here anyway.
*/
int
ultrix_sys_fstatfs(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
ultrix_sys_fstatfs(struct lwp *l, void *v, register_t *retval)
{
struct ultrix_sys_fstatfs_args *uap = v;
struct proc *p = l->l_proc;
@ -335,10 +306,7 @@ ultrix_sys_fstatfs(l, v, retval)
}
int
ultrix_sys_mknod(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
ultrix_sys_mknod(struct lwp *l, void *v, register_t *retval)
{
struct ultrix_sys_mknod_args *uap = v;
struct proc *p = l->l_proc;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ultrix_sysent.c,v 1.47 2003/01/18 23:44:06 thorpej Exp $ */
/* $NetBSD: ultrix_sysent.c,v 1.48 2004/04/21 07:05:07 simonb Exp $ */
/*
* System call switch table.
@ -8,7 +8,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ultrix_sysent.c,v 1.47 2003/01/18 23:44:06 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: ultrix_sysent.c,v 1.48 2004/04/21 07:05:07 simonb Exp $");
#if defined(_KERNEL_OPT)
#include "opt_nfsserver.h"
@ -1069,4 +1069,3 @@ struct sysent ultrix_sysent[] = {
{ 0, 0, 0,
sys_nosys }, /* 511 = filler */
};