diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 1996-04-17 05:24:25 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 1996-04-17 05:24:25 +0000 |
commit | 1417d9fd38968b85b80138ecf619d0cc8c197cc0 (patch) | |
tree | f533c3347d6ce030d053fe836a0e08fe5db5f80e /sys/compat/svr4 | |
parent | 61c97d6369b446092078e0e99a5541a8ee8b9417 (diff) |
Good fixes and changes from latest Net.
Diffstat (limited to 'sys/compat/svr4')
-rw-r--r-- | sys/compat/svr4/svr4_filio.c | 4 | ||||
-rw-r--r-- | sys/compat/svr4/svr4_ioctl.c | 6 | ||||
-rw-r--r-- | sys/compat/svr4/svr4_misc.c | 10 | ||||
-rw-r--r-- | sys/compat/svr4/svr4_net.c | 11 | ||||
-rw-r--r-- | sys/compat/svr4/svr4_signal.c | 14 | ||||
-rw-r--r-- | sys/compat/svr4/svr4_sockio.c | 6 | ||||
-rw-r--r-- | sys/compat/svr4/svr4_stream.c | 16 | ||||
-rw-r--r-- | sys/compat/svr4/svr4_termios.c | 23 | ||||
-rw-r--r-- | sys/compat/svr4/svr4_ttold.c | 4 |
9 files changed, 57 insertions, 37 deletions
diff --git a/sys/compat/svr4/svr4_filio.c b/sys/compat/svr4/svr4_filio.c index 6f553986c67..f7a5062922a 100644 --- a/sys/compat/svr4/svr4_filio.c +++ b/sys/compat/svr4/svr4_filio.c @@ -1,4 +1,4 @@ -/* $NetBSD: svr4_filio.c,v 1.3 1995/10/07 06:27:40 mycroft Exp $ */ +/* $NetBSD: svr4_filio.c,v 1.4 1996/03/30 22:37:52 christos Exp $ */ /* * Copyright (c) 1994 Christos Zoulas @@ -104,7 +104,7 @@ svr4_filioctl(fp, cmd, data, p, retval) return copyout(&num, data, sizeof(num)); default: - DPRINTF(("Unknown svr4 filio %x\n", cmd)); + DPRINTF(("Unknown svr4 filio %lx\n", cmd)); return 0; /* ENOSYS really */ } } diff --git a/sys/compat/svr4/svr4_ioctl.c b/sys/compat/svr4/svr4_ioctl.c index a56bd290cbf..d230a0e5dca 100644 --- a/sys/compat/svr4/svr4_ioctl.c +++ b/sys/compat/svr4/svr4_ioctl.c @@ -1,5 +1,5 @@ -/* $OpenBSD: svr4_ioctl.c,v 1.3 1996/02/26 23:31:57 niklas Exp $ */ -/* $NetBSD: svr4_ioctl.c,v 1.14 1996/02/10 00:48:08 christos Exp $ */ +/* $OpenBSD: svr4_ioctl.c,v 1.4 1996/04/17 05:24:17 mickey Exp $ */ +/* $NetBSD: svr4_ioctl.c,v 1.15 1996/03/30 22:37:57 christos Exp $ */ /* * Copyright (c) 1994 Christos Zoulas @@ -131,7 +131,7 @@ svr4_sys_ioctl(p, v, retval) return svr4_sockioctl(fp, cmd, SCARG(uap, data), p, retval); default: - DPRINTF(("Unimplemented ioctl %x\n", cmd)); + DPRINTF(("Unimplemented ioctl %lx\n", cmd)); return 0; /* XXX: really ENOSYS */ } } diff --git a/sys/compat/svr4/svr4_misc.c b/sys/compat/svr4/svr4_misc.c index ae843100e61..39a7e5795fa 100644 --- a/sys/compat/svr4/svr4_misc.c +++ b/sys/compat/svr4/svr4_misc.c @@ -1,5 +1,5 @@ -/* $OpenBSD: svr4_misc.c,v 1.3 1996/02/26 23:31:57 niklas Exp $ */ -/* $NetBSD: svr4_misc.c,v 1.35 1996/02/10 17:12:31 christos Exp $ */ +/* $OpenBSD: svr4_misc.c,v 1.4 1996/04/17 05:24:18 mickey Exp $ */ +/* $NetBSD: svr4_misc.c,v 1.36 1996/03/30 22:38:02 christos Exp $ */ /* * Copyright (c) 1994 Christos Zoulas @@ -584,7 +584,7 @@ svr4_sys_break(p, v, retval) new = round_page(SCARG(uap, nsize)); diff = new - old; - DPRINTF(("break(1): old %x new %x diff %x\n", old, new, diff)); + DPRINTF(("break(1): old %lx new %lx diff %x\n", old, new, diff)); if (diff > p->p_rlimit[RLIMIT_DATA].rlim_cur) return ENOMEM; @@ -594,7 +594,7 @@ svr4_sys_break(p, v, retval) vm->vm_dsize, ctob(vm->vm_dsize))); diff = new - old; - DPRINTF(("break(3): old %x new %x diff %x\n", old, new, diff)); + DPRINTF(("break(3): old %lx new %lx diff %x\n", old, new, diff)); if (diff > 0) { rv = vm_allocate(&vm->vm_map, &old, diff, FALSE); @@ -935,7 +935,7 @@ svr4_setinfo(p, st, s) i.si_code = SVR4_CLD_KILLED; } - DPRINTF(("siginfo [pid %d signo %d code %d errno %d status %d]\n", + DPRINTF(("siginfo [pid %ld signo %d code %d errno %d status %d]\n", i.si_pid, i.si_signo, i.si_code, i.si_errno, i.si_status)); return copyout(&i, s, sizeof(i)); diff --git a/sys/compat/svr4/svr4_net.c b/sys/compat/svr4/svr4_net.c index a425818e2b0..778bd936c8b 100644 --- a/sys/compat/svr4/svr4_net.c +++ b/sys/compat/svr4/svr4_net.c @@ -1,5 +1,5 @@ -/* $OpenBSD: svr4_net.c,v 1.3 1996/02/26 23:31:59 niklas Exp $ */ -/* $NetBSD: svr4_net.c,v 1.6 1996/02/04 02:01:07 christos Exp $ */ +/* $OpenBSD: svr4_net.c,v 1.4 1996/04/17 05:24:19 mickey Exp $ */ +/* $NetBSD: svr4_net.c,v 1.8 1996/03/30 22:41:02 christos Exp $ */ /* * Copyright (c) 1994 Christos Zoulas @@ -49,6 +49,7 @@ #include <sys/proc.h> #include <sys/vnode.h> #include <sys/device.h> +#include <sys/conf.h> #include <compat/svr4/svr4_types.h> @@ -71,10 +72,10 @@ enum { int svr4_netattach __P((int)); -static int svr4_netclose __P((struct file *fp, struct proc *p)); +static int svr4_soo_close __P((struct file *fp, struct proc *p)); static struct fileops svr4_netops = { - soo_read, soo_write, soo_ioctl, soo_select, svr4_netclose + soo_read, soo_write, soo_ioctl, soo_select, svr4_soo_close }; @@ -164,7 +165,7 @@ svr4_netopen(dev, flag, mode, p) } static int -svr4_netclose(fp, p) +svr4_soo_close(fp, p) struct file *fp; struct proc *p; { diff --git a/sys/compat/svr4/svr4_signal.c b/sys/compat/svr4/svr4_signal.c index 6fa34044718..4ba26f57853 100644 --- a/sys/compat/svr4/svr4_signal.c +++ b/sys/compat/svr4/svr4_signal.c @@ -1,5 +1,5 @@ -/* $OpenBSD: svr4_signal.c,v 1.3 1996/02/26 23:31:59 niklas Exp $ */ -/* $NetBSD: svr4_signal.c,v 1.21 1996/02/09 23:12:18 christos Exp $ */ +/* $OpenBSD: svr4_signal.c,v 1.4 1996/04/17 05:24:20 mickey Exp $ */ +/* $NetBSD: svr4_signal.c,v 1.23 1996/03/30 22:38:07 christos Exp $ */ /* * Copyright (c) 1994 Christos Zoulas * All rights reserved. @@ -57,13 +57,13 @@ #define svr4_sigismember(s, n) ((s)->bits[svr4_sigword(n)] & svr4_sigmask(n)) #define svr4_sigaddset(s, n) ((s)->bits[svr4_sigword(n)] |= svr4_sigmask(n)) -static __inline int svr4_sigfillset __P((svr4_sigset_t *)); +static __inline void svr4_sigfillset __P((svr4_sigset_t *)); void svr4_to_bsd_sigaction __P((const struct svr4_sigaction *, struct sigaction *)); void bsd_to_svr4_sigaction __P((const struct sigaction *, struct svr4_sigaction *)); -static __inline int +static __inline void svr4_sigfillset(s) svr4_sigset_t *s; { @@ -631,19 +631,19 @@ svr4_sys_context(p, v, retval) switch (SCARG(uap, func)) { case 0: - DPRINTF(("getcontext(%x)\n", SCARG(uap, uc))); + DPRINTF(("getcontext(%p)\n", SCARG(uap, uc))); svr4_getcontext(p, &uc, p->p_sigmask, p->p_sigacts->ps_sigstk.ss_flags & SS_ONSTACK); return copyout(&uc, SCARG(uap, uc), sizeof(uc)); case 1: - DPRINTF(("setcontext(%x)\n", SCARG(uap, uc))); + DPRINTF(("setcontext(%p)\n", SCARG(uap, uc))); if ((error = copyin(SCARG(uap, uc), &uc, sizeof(uc))) != 0) return error; return svr4_setcontext(p, &uc); default: - DPRINTF(("context(%d, %x)\n", SCARG(uap, func), + DPRINTF(("context(%d, %p)\n", SCARG(uap, func), SCARG(uap, uc))); return ENOSYS; } diff --git a/sys/compat/svr4/svr4_sockio.c b/sys/compat/svr4/svr4_sockio.c index e7c68f44ea1..8340b5aed58 100644 --- a/sys/compat/svr4/svr4_sockio.c +++ b/sys/compat/svr4/svr4_sockio.c @@ -1,5 +1,5 @@ -/* $OpenBSD: svr4_sockio.c,v 1.2 1996/02/26 23:32:00 niklas Exp $ */ -/* $NetBSD: svr4_sockio.c,v 1.6 1996/02/09 23:12:20 christos Exp $ */ +/* $OpenBSD: svr4_sockio.c,v 1.3 1996/04/17 05:24:21 mickey Exp $ */ +/* $NetBSD: svr4_sockio.c,v 1.7 1996/03/30 22:38:14 christos Exp $ */ /* * Copyright (c) 1995 Christos Zoulas @@ -135,7 +135,7 @@ svr4_sockioctl(fp, cmd, data, p, retval) default: - DPRINTF(("Unknown svr4 sockio %x\n", cmd)); + DPRINTF(("Unknown svr4 sockio %lx\n", cmd)); return 0; /* ENOSYS really */ } } diff --git a/sys/compat/svr4/svr4_stream.c b/sys/compat/svr4/svr4_stream.c index fcd4a109afe..e98ac9b7196 100644 --- a/sys/compat/svr4/svr4_stream.c +++ b/sys/compat/svr4/svr4_stream.c @@ -1,5 +1,5 @@ -/* $OpenBSD: svr4_stream.c,v 1.2 1996/02/26 23:32:03 niklas Exp $ */ -/* $NetBSD: svr4_stream.c,v 1.11 1996/02/10 00:48:12 christos Exp $ */ +/* $OpenBSD: svr4_stream.c,v 1.3 1996/04/17 05:24:22 mickey Exp $ */ +/* $NetBSD: svr4_stream.c,v 1.12 1996/03/30 22:38:19 christos Exp $ */ /* * Copyright (c) 1994 Christos Zoulas @@ -228,7 +228,7 @@ svr4_sockmod(fp, ioc, p) return 0; default: - DPRINTF(("Unknown sockmod ioctl %x\n", ioc->cmd)); + DPRINTF(("Unknown sockmod ioctl %lx\n", ioc->cmd)); return 0; } @@ -324,7 +324,7 @@ svr4_timod(fp, ioc, p) return 0; default: - DPRINTF(("Unknown timod ioctl %x\n", ioc->cmd)); + DPRINTF(("Unknown timod ioctl %lx\n", ioc->cmd)); return 0; } } @@ -340,7 +340,7 @@ svr4_showioc(str, ioc) int error; int i; - printf("%s cmd = %d, timeout = %d, len = %d, buf = %p { ", + printf("%s cmd = %ld, timeout = %d, len = %d, buf = %p { ", str, ioc->cmd, ioc->timeout, ioc->len, ioc->buf); if ((error = copyin(ioc->buf, ptr, ioc->len)) != 0) { @@ -430,7 +430,7 @@ svr4_streamioctl(fp, cmd, dat, p, retval) break; default: - DPRINTF(("Unimplemented module %c %d\n", + DPRINTF(("Unimplemented module %c %ld\n", (char) (cmd >> 8), cmd & 0xff)); return 0; } @@ -551,7 +551,7 @@ svr4_streamioctl(fp, cmd, dat, p, retval) return 0; default: - DPRINTF(("unimpl cmd = %x\n", cmd)); + DPRINTF(("unimpl cmd = %lx\n", cmd)); break; } @@ -751,7 +751,7 @@ svr4_sys_putmsg(p, v, retval) return error; } default: - DPRINTF(("putmsg: Unimplemented command %x\n", sc.cmd)); + DPRINTF(("putmsg: Unimplemented command %lx\n", sc.cmd)); return ENOSYS; } } diff --git a/sys/compat/svr4/svr4_termios.c b/sys/compat/svr4/svr4_termios.c index b9c4a2f8b6e..e00a0d80ddc 100644 --- a/sys/compat/svr4/svr4_termios.c +++ b/sys/compat/svr4/svr4_termios.c @@ -1,4 +1,4 @@ -/* $NetBSD: svr4_termios.c,v 1.6 1995/10/14 20:24:58 christos Exp $ */ +/* $NetBSD: svr4_termios.c,v 1.8 1996/03/30 22:38:23 christos Exp $ */ /* * Copyright (c) 1994 Christos Zoulas @@ -541,8 +541,27 @@ svr4_termioctl(fp, cmd, data, p, retval) return (*ctl)(fp, cmd, (caddr_t) &bt, p); + case SVR4_TIOCGWINSZ: + { + struct svr4_winsize ws; + + error = (*ctl)(fp, TIOCGWINSZ, (caddr_t) &ws, p); + if (error) + return error; + return copyout(&st, data, sizeof(st)); + } + + case SVR4_TIOCSWINSZ: + { + struct svr4_winsize ws; + + if ((error = copyin(data, &ws, sizeof(ws))) != 0) + return error; + return (*ctl)(fp, TIOCSWINSZ, (caddr_t) &ws, p); + } + default: - DPRINTF(("Unknown svr4 termios %x\n", cmd)); + DPRINTF(("Unknown svr4 termios %lx\n", cmd)); return ENOSYS; } } diff --git a/sys/compat/svr4/svr4_ttold.c b/sys/compat/svr4/svr4_ttold.c index 0ce97072dad..bfc1c574781 100644 --- a/sys/compat/svr4/svr4_ttold.c +++ b/sys/compat/svr4/svr4_ttold.c @@ -1,4 +1,4 @@ -/* $NetBSD: svr4_ttold.c,v 1.7 1995/10/14 20:25:01 christos Exp $ */ +/* $NetBSD: svr4_ttold.c,v 1.8 1996/03/30 22:38:27 christos Exp $ */ /* * Copyright (c) 1994 Christos Zoulas @@ -282,7 +282,7 @@ svr4_ttoldioctl(fp, cmd, data, p, retval) } default: - DPRINTF(("Unknown svr4 ttold %x\n", cmd)); + DPRINTF(("Unknown svr4 ttold %lx\n", cmd)); return 0; /* ENOSYS really */ } } |