CVS commit: src/sys/compat/osf1
Module Name:src Committed By: christos Date: Sun Mar 17 14:11:49 UTC 2019 Modified Files: src/sys/compat/osf1: files.osf1 Log Message: fix the build: include the needed osf1 files for compat_linux on alpha To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/compat/osf1/files.osf1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/osf1/files.osf1 diff -u src/sys/compat/osf1/files.osf1:1.20 src/sys/compat/osf1/files.osf1:1.21 --- src/sys/compat/osf1/files.osf1:1.20 Sun Nov 16 20:01:57 2014 +++ src/sys/compat/osf1/files.osf1 Sun Mar 17 10:11:48 2019 @@ -1,4 +1,4 @@ -# $NetBSD: files.osf1,v 1.20 2014/11/17 01:01:57 uebayasi Exp $ +# $NetBSD: files.osf1,v 1.21 2019/03/17 14:11:48 christos Exp $ # # Config file description for machine-independent OSF/1 compat code. # Included by ports that need it. @@ -15,24 +15,24 @@ file compat/osf1/osf1_syscalls.c compat_ file compat/osf1/osf1_sysent.c compat_osf1 # OSF/1 <-> NetBSD structure, flag, and value conversion files -file compat/osf1/osf1_cvt.c compat_osf1 +file compat/osf1/osf1_cvt.c compat_osf1 | compat_linux file compat/osf1/osf1_errno.c compat_osf1 -file compat/osf1/osf1_signo.c compat_osf1 +file compat/osf1/osf1_signo.c compat_osf1 | compat_linux # functionality emulation files file compat/osf1/osf1_descrip.c compat_osf1 file compat/osf1/osf1_exec.c compat_osf1 file compat/osf1/osf1_exec_ecoff.c compat_osf1 & exec_ecoff -file compat/osf1/osf1_file.c compat_osf1 -file compat/osf1/osf1_generic.c compat_osf1 +file compat/osf1/osf1_file.c compat_osf1 | compat_linux +file compat/osf1/osf1_generic.c compat_osf1 | compat_linux file compat/osf1/osf1_ioctl.c compat_osf1 -file compat/osf1/osf1_misc.c compat_osf1 +file compat/osf1/osf1_misc.c compat_osf1 | compat_linux file compat/osf1/osf1_mmap.c compat_osf1 file compat/osf1/osf1_mod.c compat_osf1 -file compat/osf1/osf1_mount.c compat_osf1 +file compat/osf1/osf1_mount.c compat_osf1 | compat_linux file compat/osf1/osf1_prot.c compat_osf1 -file compat/osf1/osf1_resource.c compat_osf1 +file compat/osf1/osf1_resource.c compat_osf1 | compat_linux file compat/osf1/osf1_signal.c compat_osf1 file compat/osf1/osf1_socket.c compat_osf1 file compat/osf1/osf1_sysv_ipc.c compat_osf1 -file compat/osf1/osf1_time.c compat_osf1 +file compat/osf1/osf1_time.c compat_osf1 | compat_linux
CVS commit: src/sys/compat/osf1
Module Name:src Committed By: hannken Date: Thu Apr 13 09:17:55 UTC 2017 Modified Files: src/sys/compat/osf1: osf1_mount.c Log Message: Switch osf1_sys_getfsstat() to mountlist iterator. Compile tested only. To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/sys/compat/osf1/osf1_mount.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/osf1/osf1_mount.c diff -u src/sys/compat/osf1/osf1_mount.c:1.53 src/sys/compat/osf1/osf1_mount.c:1.54 --- src/sys/compat/osf1/osf1_mount.c:1.53 Fri Oct 23 19:40:11 2015 +++ src/sys/compat/osf1/osf1_mount.c Thu Apr 13 09:17:55 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: osf1_mount.c,v 1.53 2015/10/23 19:40:11 maxv Exp $ */ +/* $NetBSD: osf1_mount.c,v 1.54 2017/04/13 09:17:55 hannken Exp $ */ /* * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. @@ -58,7 +58,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: osf1_mount.c,v 1.53 2015/10/23 19:40:11 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: osf1_mount.c,v 1.54 2017/04/13 09:17:55 hannken Exp $"); #include #include @@ -132,7 +132,8 @@ osf1_sys_fstatfs(struct lwp *l, const st int osf1_sys_getfsstat(struct lwp *l, const struct osf1_sys_getfsstat_args *uap, register_t *retval) { - struct mount *mp, *nmp; + mount_iterator_t *iter; + struct mount *mp; struct statvfs *sp; struct osf1_statfs osfs; char *osf_sfsp; @@ -143,13 +144,9 @@ osf1_sys_getfsstat(struct lwp *l, const maxcount = SCARG(uap, bufsize) / sizeof(struct osf1_statfs); osf_sfsp = (void *)SCARG(uap, buf); - mutex_enter(_lock); - for (count = 0, mp = TAILQ_FIRST(); - mp != NULL; - mp = nmp) { - if (vfs_busy(mp, )) { - continue; - } + mountlist_iterator_init(); + count = 0; + while ((mp = mountlist_iterator_next(iter)) != NULL) { if (osf_sfsp && count < maxcount) { sp = >mnt_stat; /* @@ -164,16 +161,15 @@ osf1_sys_getfsstat(struct lwp *l, const osf1_cvt_statfs_from_native(sp, ); if ((error = copyout(, osf_sfsp, sizeof (struct osf1_statfs { - vfs_unbusy(mp, false, NULL); + mountlist_iterator_destroy(iter); return (error); } osf_sfsp += sizeof (struct osf1_statfs); } } count++; - vfs_unbusy(mp, false, ); } - mutex_exit(_lock); + mountlist_iterator_destroy(iter); if (osf_sfsp && count > maxcount) *retval = maxcount; else
CVS commit: src/sys/compat/osf1
Module Name:src Committed By: christos Date: Thu Sep 24 14:43:22 UTC 2015 Modified Files: src/sys/compat/osf1: osf1_syscall.h osf1_syscallargs.h osf1_syscalls.c osf1_sysent.c Log Message: regen To generate a diff of this commit: cvs rdiff -u -r1.62 -r1.63 src/sys/compat/osf1/osf1_syscall.h cvs rdiff -u -r1.63 -r1.64 src/sys/compat/osf1/osf1_syscallargs.h \ src/sys/compat/osf1/osf1_sysent.c cvs rdiff -u -r1.61 -r1.62 src/sys/compat/osf1/osf1_syscalls.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/osf1/osf1_syscall.h diff -u src/sys/compat/osf1/osf1_syscall.h:1.62 src/sys/compat/osf1/osf1_syscall.h:1.63 --- src/sys/compat/osf1/osf1_syscall.h:1.62 Sat Mar 7 11:41:54 2015 +++ src/sys/compat/osf1/osf1_syscall.h Thu Sep 24 10:43:22 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: osf1_syscall.h,v 1.62 2015/03/07 16:41:54 christos Exp $ */ +/* $NetBSD: osf1_syscall.h,v 1.63 2015/09/24 14:43:22 christos Exp $ */ /* * System call numbers. Index: src/sys/compat/osf1/osf1_syscallargs.h diff -u src/sys/compat/osf1/osf1_syscallargs.h:1.63 src/sys/compat/osf1/osf1_syscallargs.h:1.64 --- src/sys/compat/osf1/osf1_syscallargs.h:1.63 Sat Mar 7 11:41:54 2015 +++ src/sys/compat/osf1/osf1_syscallargs.h Thu Sep 24 10:43:22 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: osf1_syscallargs.h,v 1.63 2015/03/07 16:41:54 christos Exp $ */ +/* $NetBSD: osf1_syscallargs.h,v 1.64 2015/09/24 14:43:22 christos Exp $ */ /* * System call argument lists. Index: src/sys/compat/osf1/osf1_sysent.c diff -u src/sys/compat/osf1/osf1_sysent.c:1.63 src/sys/compat/osf1/osf1_sysent.c:1.64 --- src/sys/compat/osf1/osf1_sysent.c:1.63 Sat Mar 7 11:41:54 2015 +++ src/sys/compat/osf1/osf1_sysent.c Thu Sep 24 10:43:22 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: osf1_sysent.c,v 1.63 2015/03/07 16:41:54 christos Exp $ */ +/* $NetBSD: osf1_sysent.c,v 1.64 2015/09/24 14:43:22 christos Exp $ */ /* * System call switch table. @@ -8,7 +8,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: osf1_sysent.c,v 1.63 2015/03/07 16:41:54 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: osf1_sysent.c,v 1.64 2015/09/24 14:43:22 christos Exp $"); #if defined(_KERNEL_OPT) #include "opt_compat_43.h" @@ -24,1031 +24,1756 @@ __KERNEL_RCSID(0, "$NetBSD: osf1_sysent. #define s(type) sizeof(type) #define n(type) (sizeof(type)/sizeof (register_t)) -#define ns(type) n(type), s(type) +#define ns(type) .sy_narg = n(type), .sy_argsize = s(type) struct sysent osf1_sysent[] = { - { 0, 0, 0, - (sy_call_t *)sys_nosys, 0, 0 }, /* 0 = syscall */ - { ns(struct sys_exit_args), 0, - (sy_call_t *)sys_exit, 0, 0 }, /* 1 = exit */ - { 0, 0, 0, - (sy_call_t *)sys_fork, 0, 0 }, /* 2 = fork */ - { ns(struct sys_read_args), SYCALL_ARG_PTR, - (sy_call_t *)sys_read, 0, 0 }, /* 3 = read */ - { ns(struct sys_write_args), SYCALL_ARG_PTR, - (sy_call_t *)sys_write, 0, 0 }, /* 4 = write */ - { 0, 0, 0, - sys_nosys, 0, 0 }, /* 5 = unimplemented old open */ - { ns(struct sys_close_args), 0, - (sy_call_t *)sys_close, 0, 0 }, /* 6 = close */ - { ns(struct osf1_sys_wait4_args), SYCALL_ARG_PTR, - (sy_call_t *)osf1_sys_wait4, 0, 0 }, /* 7 = wait4 */ - { 0, 0, 0, - sys_nosys, 0, 0 }, /* 8 = unimplemented old creat */ - { ns(struct sys_link_args), SYCALL_ARG_PTR, - (sy_call_t *)sys_link, 0, 0 }, /* 9 = link */ - { ns(struct sys_unlink_args), SYCALL_ARG_PTR, - (sy_call_t *)sys_unlink, 0, 0 }, /* 10 = unlink */ - { 0, 0, 0, - sys_nosys, 0, 0 }, /* 11 = unimplemented execv */ - { ns(struct sys_chdir_args), SYCALL_ARG_PTR, - (sy_call_t *)sys_chdir, 0, 0 }, /* 12 = chdir */ - { ns(struct sys_fchdir_args), 0, - (sy_call_t *)sys_fchdir, 0, 0 }, /* 13 = fchdir */ - { ns(struct osf1_sys_mknod_args), SYCALL_ARG_PTR, - (sy_call_t *)osf1_sys_mknod, 0, 0 }, /* 14 = mknod */ - { ns(struct sys_chmod_args), SYCALL_ARG_PTR, - (sy_call_t *)sys_chmod, 0, 0 }, /* 15 = chmod */ - { ns(struct sys___posix_chown_args), SYCALL_ARG_PTR, - (sy_call_t *)sys___posix_chown, 0, 0 }, /* 16 = __posix_chown */ - { ns(struct sys_obreak_args), SYCALL_ARG_PTR, - (sy_call_t *)sys_obreak, 0, 0 }, /* 17 = obreak */ - { ns(struct osf1_sys_getfsstat_args), SYCALL_ARG_PTR, - (sy_call_t *)osf1_sys_getfsstat, 0, 0 }, /* 18 = getfsstat */ - { ns(struct osf1_sys_lseek_args), SYCALL_NARGS64_VAL(1) | SYCALL_ARG1_64 | SYCALL_RET_64, - (sy_call_t *)osf1_sys_lseek, 0, 0 }, /* 19 = lseek */ - { 0, 0, 0, - (sy_call_t *)sys_getpid_with_ppid, 0, 0 },/* 20 = getpid_with_ppid */ - { ns(struct osf1_sys_mount_args), SYCALL_ARG_PTR, - (sy_call_t *)osf1_sys_mount, 0, 0 }, /* 21 = mount */ - { ns(struct osf1_sys_unmount_args), SYCALL_ARG_PTR, - (sy_call_t *)osf1_sys_unmount, 0, 0 }, /* 22 = unmount */ - { ns(struct osf1_sys_setuid_args), 0, - (sy_call_t *)osf1_sys_setuid, 0, 0 }, /* 23 = setuid */ - { 0, 0, 0, - (sy_call_t
CVS commit: src/sys/compat/osf1
Module Name:src Committed By: maxv Date: Sat Aug 8 12:02:35 UTC 2015 Modified Files: src/sys/compat/osf1: osf1_socket.c Log Message: easy kmem_alloc(0) ok shm@ To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/compat/osf1/osf1_socket.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/osf1/osf1_socket.c diff -u src/sys/compat/osf1/osf1_socket.c:1.20 src/sys/compat/osf1/osf1_socket.c:1.21 --- src/sys/compat/osf1/osf1_socket.c:1.20 Fri Apr 23 15:19:21 2010 +++ src/sys/compat/osf1/osf1_socket.c Sat Aug 8 12:02:35 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: osf1_socket.c,v 1.20 2010/04/23 15:19:21 rmind Exp $ */ +/* $NetBSD: osf1_socket.c,v 1.21 2015/08/08 12:02:35 maxv Exp $ */ /* * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. @@ -58,7 +58,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: osf1_socket.c,v 1.20 2010/04/23 15:19:21 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: osf1_socket.c,v 1.21 2015/08/08 12:02:35 maxv Exp $); #include sys/param.h #include sys/systm.h @@ -116,7 +116,7 @@ osf1_sys_sendmsg_xopen(struct lwp *l, co return (EINVAL); iov_len = bsd_msghdr.msg_iovlen; - if (iov_len IOV_MAX) + if ((iov_len IOV_MAX) || (iov_len == 0)) return EMSGSIZE; bsd_iovec = kmem_alloc(iov_len * sizeof(struct iovec), KM_SLEEP); bsd_msghdr.msg_iov = bsd_iovec;
CVS commit: src/sys/compat/osf1
Module Name:src Committed By: maxv Date: Sun Aug 24 12:48:58 UTC 2014 Modified Files: src/sys/compat/osf1: osf1_file.c Log Message: Ensure nbytes 0. Otherwise bad things may happen. Compile-tested only. ok christos@ To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/compat/osf1/osf1_file.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/osf1/osf1_file.c diff -u src/sys/compat/osf1/osf1_file.c:1.41 src/sys/compat/osf1/osf1_file.c:1.42 --- src/sys/compat/osf1/osf1_file.c:1.41 Fri Jul 22 10:02:08 2011 +++ src/sys/compat/osf1/osf1_file.c Sun Aug 24 12:48:58 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: osf1_file.c,v 1.41 2011/07/22 10:02:08 njoly Exp $ */ +/* $NetBSD: osf1_file.c,v 1.42 2014/08/24 12:48:58 maxv Exp $ */ /* * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. @@ -58,7 +58,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: osf1_file.c,v 1.41 2011/07/22 10:02:08 njoly Exp $); +__KERNEL_RCSID(0, $NetBSD: osf1_file.c,v 1.42 2014/08/24 12:48:58 maxv Exp $); #if defined(_KERNEL_OPT) #include opt_syscall_debug.h @@ -133,7 +133,7 @@ osf1_sys_getdirentries(struct lwp *l, co /* { syscallarg(int) fd; syscallarg(char *) buf; - syscallarg(u_int) nbytes; + syscallarg(int) nbytes; syscallarg(long *) basep; } */ struct dirent *bdp; @@ -151,6 +151,11 @@ osf1_sys_getdirentries(struct lwp *l, co off_t *cookiebuf = NULL, *cookie; int ncookies, fd; + if (SCARG(uap, nbytes) 0) + return EINVAL; + if (SCARG(uap, nbytes) == 0) + return 0; + fd = SCARG(uap, fd); if ((error = fd_getvnode(fd, fp)) != 0) return (error);
CVS commit: src/sys/compat/osf1
Module Name:src Committed By: christos Date: Sat Nov 23 23:30:39 UTC 2013 Modified Files: src/sys/compat/osf1: osf1_mount.c Log Message: fix previous the end of the list is NULL, and don't open-code. To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/sys/compat/osf1/osf1_mount.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/osf1/osf1_mount.c diff -u src/sys/compat/osf1/osf1_mount.c:1.48 src/sys/compat/osf1/osf1_mount.c:1.49 --- src/sys/compat/osf1/osf1_mount.c:1.48 Sat Nov 23 11:15:25 2013 +++ src/sys/compat/osf1/osf1_mount.c Sat Nov 23 18:30:39 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: osf1_mount.c,v 1.48 2013/11/23 16:15:25 riz Exp $ */ +/* $NetBSD: osf1_mount.c,v 1.49 2013/11/23 23:30:39 christos Exp $ */ /* * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. @@ -58,7 +58,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: osf1_mount.c,v 1.48 2013/11/23 16:15:25 riz Exp $); +__KERNEL_RCSID(0, $NetBSD: osf1_mount.c,v 1.49 2013/11/23 23:30:39 christos Exp $); #include sys/param.h #include sys/systm.h @@ -144,7 +144,8 @@ osf1_sys_getfsstat(struct lwp *l, const maxcount = SCARG(uap, bufsize) / sizeof(struct osf1_statfs); osf_sfsp = (void *)SCARG(uap, buf); mutex_enter(mountlist_lock); - for (count = 0, mp = mountlist.tqh_first; mp != (void *)mountlist; + for (count = 0, mp = TAILQ_FIRST(mountlist); + mp != TAILQ_END(mountlist); mp = nmp) { if (vfs_busy(mp, nmp)) { continue;
CVS commit: src/sys/compat/osf1
Module Name:src Committed By: christos Date: Mon Nov 4 16:52:08 UTC 2013 Modified Files: src/sys/compat/osf1: osf1_cvt.c Log Message: fix incorrect sizes to memset To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/compat/osf1/osf1_cvt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/osf1/osf1_cvt.c diff -u src/sys/compat/osf1/osf1_cvt.c:1.27 src/sys/compat/osf1/osf1_cvt.c:1.28 --- src/sys/compat/osf1/osf1_cvt.c:1.27 Fri Apr 23 11:19:20 2010 +++ src/sys/compat/osf1/osf1_cvt.c Mon Nov 4 11:52:08 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: osf1_cvt.c,v 1.27 2010/04/23 15:19:20 rmind Exp $ */ +/* $NetBSD: osf1_cvt.c,v 1.28 2013/11/04 16:52:08 christos Exp $ */ /* * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. @@ -58,7 +58,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: osf1_cvt.c,v 1.27 2010/04/23 15:19:20 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: osf1_cvt.c,v 1.28 2013/11/04 16:52:08 christos Exp $); #include sys/param.h #include sys/systm.h @@ -293,7 +293,7 @@ void osf1_cvt_flock_from_native(const struct flock *nf, struct osf1_flock *of) { - memset(of, 0, sizeof of); + memset(of, 0, sizeof(*of)); of-l_start = nf-l_start; of-l_len = nf-l_len; @@ -332,7 +332,7 @@ int osf1_cvt_flock_to_native(const struct osf1_flock *of, struct flock *nf) { - memset(nf, 0, sizeof nf); + memset(nf, 0, sizeof(*nf)); nf-l_start = of-l_start; nf-l_len = of-l_len; @@ -380,7 +380,7 @@ osf1_cvt_msghdr_xopen_to_native(const st { unsigned long leftovers; - memset(bmh, 0, sizeof bmh); + memset(bmh, 0, sizeof(*bmh)); bmh-msg_name = omh-msg_name; /* XXX sockaddr translation */ bmh-msg_namelen = omh-msg_namelen; bmh-msg_iov = NULL; /* iovec xlation separate */
CVS commit: src/sys/compat/osf1
Module Name:src Committed By: dsl Date: Wed Jan 2 18:48:22 UTC 2013 Modified Files: src/sys/compat/osf1: osf1_errno.c osf1_signo.c Log Message: These files don't need compat/osf1/osf1_cvt.h To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/compat/osf1/osf1_errno.c cvs rdiff -u -r1.1 -r1.2 src/sys/compat/osf1/osf1_signo.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/osf1/osf1_errno.c diff -u src/sys/compat/osf1/osf1_errno.c:1.5 src/sys/compat/osf1/osf1_errno.c:1.6 --- src/sys/compat/osf1/osf1_errno.c:1.5 Sun Mar 31 22:22:48 2002 +++ src/sys/compat/osf1/osf1_errno.c Wed Jan 2 18:48:22 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: osf1_errno.c,v 1.5 2002/03/31 22:22:48 christos Exp $ */ +/* $NetBSD: osf1_errno.c,v 1.6 2013/01/02 18:48:22 dsl Exp $ */ /* * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. @@ -31,10 +31,9 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: osf1_errno.c,v 1.5 2002/03/31 22:22:48 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: osf1_errno.c,v 1.6 2013/01/02 18:48:22 dsl Exp $); #include compat/osf1/osf1.h -#include compat/osf1/osf1_cvt.h /* * This table is used to translate NetBSD errnos to OSF/1 errnos Index: src/sys/compat/osf1/osf1_signo.c diff -u src/sys/compat/osf1/osf1_signo.c:1.1 src/sys/compat/osf1/osf1_signo.c:1.2 --- src/sys/compat/osf1/osf1_signo.c:1.1 Sun Mar 31 22:22:48 2002 +++ src/sys/compat/osf1/osf1_signo.c Wed Jan 2 18:48:22 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: osf1_signo.c,v 1.1 2002/03/31 22:22:48 christos Exp $ */ +/* $NetBSD: osf1_signo.c,v 1.2 2013/01/02 18:48:22 dsl Exp $ */ /* * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. @@ -31,13 +31,12 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: osf1_signo.c,v 1.1 2002/03/31 22:22:48 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: osf1_signo.c,v 1.2 2013/01/02 18:48:22 dsl Exp $); #include sys/types.h #include sys/signal.h #include compat/osf1/osf1.h -#include compat/osf1/osf1_cvt.h /* * These tables are used to translate between NetBSD and OSF/1 signal
CVS commit: src/sys/compat/osf1
Module Name:src Committed By: njoly Date: Fri Jul 22 10:02:08 UTC 2011 Modified Files: src/sys/compat/osf1: osf1_file.c osf1_ioctl.c osf1_misc.c Log Message: Fix SYSCALL_DEBUG build. To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/sys/compat/osf1/osf1_file.c cvs rdiff -u -r1.22 -r1.23 src/sys/compat/osf1/osf1_ioctl.c cvs rdiff -u -r1.85 -r1.86 src/sys/compat/osf1/osf1_misc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/osf1/osf1_file.c diff -u src/sys/compat/osf1/osf1_file.c:1.40 src/sys/compat/osf1/osf1_file.c:1.41 --- src/sys/compat/osf1/osf1_file.c:1.40 Thu Jun 24 13:03:07 2010 +++ src/sys/compat/osf1/osf1_file.c Fri Jul 22 10:02:08 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: osf1_file.c,v 1.40 2010/06/24 13:03:07 hannken Exp $ */ +/* $NetBSD: osf1_file.c,v 1.41 2011/07/22 10:02:08 njoly Exp $ */ /* * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. @@ -58,7 +58,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: osf1_file.c,v 1.40 2010/06/24 13:03:07 hannken Exp $); +__KERNEL_RCSID(0, $NetBSD: osf1_file.c,v 1.41 2011/07/22 10:02:08 njoly Exp $); #if defined(_KERNEL_OPT) #include opt_syscall_debug.h @@ -94,6 +94,10 @@ #include compat/osf1/osf1_cvt.h #include compat/osf1/osf1_dirent.h +#ifdef SYSCALL_DEBUG +extern int scdebug; +#endif + int osf1_sys_access(struct lwp *l, const struct osf1_sys_access_args *uap, register_t *retval) { Index: src/sys/compat/osf1/osf1_ioctl.c diff -u src/sys/compat/osf1/osf1_ioctl.c:1.22 src/sys/compat/osf1/osf1_ioctl.c:1.23 --- src/sys/compat/osf1/osf1_ioctl.c:1.22 Thu Dec 20 23:03:03 2007 +++ src/sys/compat/osf1/osf1_ioctl.c Fri Jul 22 10:02:08 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: osf1_ioctl.c,v 1.22 2007/12/20 23:03:03 dsl Exp $ */ +/* $NetBSD: osf1_ioctl.c,v 1.23 2011/07/22 10:02:08 njoly Exp $ */ /* * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. @@ -58,7 +58,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: osf1_ioctl.c,v 1.22 2007/12/20 23:03:03 dsl Exp $); +__KERNEL_RCSID(0, $NetBSD: osf1_ioctl.c,v 1.23 2011/07/22 10:02:08 njoly Exp $); #if defined(_KERNEL_OPT) #include opt_compat_43.h @@ -92,7 +92,7 @@ struct sys_ioctl_args a; int op, dir, group, cmd, len; #ifdef SYSCALL_DEBUG - char *dirstr; + const char *dirstr; #endif op = SCARG(uap, com); Index: src/sys/compat/osf1/osf1_misc.c diff -u src/sys/compat/osf1/osf1_misc.c:1.85 src/sys/compat/osf1/osf1_misc.c:1.86 --- src/sys/compat/osf1/osf1_misc.c:1.85 Fri Apr 23 15:19:20 2010 +++ src/sys/compat/osf1/osf1_misc.c Fri Jul 22 10:02:08 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: osf1_misc.c,v 1.85 2010/04/23 15:19:20 rmind Exp $ */ +/* $NetBSD: osf1_misc.c,v 1.86 2011/07/22 10:02:08 njoly Exp $ */ /* * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. @@ -58,7 +58,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: osf1_misc.c,v 1.85 2010/04/23 15:19:20 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: osf1_misc.c,v 1.86 2011/07/22 10:02:08 njoly Exp $); #if defined(_KERNEL_OPT) #include opt_syscall_debug.h @@ -95,10 +95,6 @@ #include compat/common/compat_util.h #include compat/osf1/osf1_cvt.h -#ifdef SYSCALL_DEBUG -extern int scdebug; -#endif - int osf1_sys_classcntl(struct lwp *l, const struct osf1_sys_classcntl_args *uap, register_t *retval) {
CVS commit: src/sys/compat/osf1
Module Name:src Committed By: joerg Date: Sat Mar 5 19:08:41 UTC 2011 Modified Files: src/sys/compat/osf1: osf1_exec.h Log Message: Forward define of ps_strings. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/compat/osf1/osf1_exec.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/osf1/osf1_exec.h diff -u src/sys/compat/osf1/osf1_exec.h:1.12 src/sys/compat/osf1/osf1_exec.h:1.13 --- src/sys/compat/osf1/osf1_exec.h:1.12 Wed Nov 19 18:36:05 2008 +++ src/sys/compat/osf1/osf1_exec.h Sat Mar 5 19:08:40 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: osf1_exec.h,v 1.12 2008/11/19 18:36:05 ad Exp $ */ +/* $NetBSD: osf1_exec.h,v 1.13 2011/03/05 19:08:40 joerg Exp $ */ /* * Copyright (c) 2000 The NetBSD foundation, Inc. @@ -38,6 +38,7 @@ extern struct emul emul_osf1; int osf1_exec_ecoff_probe(struct lwp *, struct exec_package *); +struct ps_strings; int osf1_copyargs(struct lwp *, struct exec_package *, struct ps_strings *, char **, void *);
CVS commit: src/sys/compat/osf1
Module Name:src Committed By: njoly Date: Fri May 29 09:32:41 UTC 2009 Modified Files: src/sys/compat/osf1: osf1_file.c Log Message: Make getdirentries set a correct block read position for basep argument. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/compat/osf1/osf1_file.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/osf1/osf1_file.c diff -u src/sys/compat/osf1/osf1_file.c:1.35 src/sys/compat/osf1/osf1_file.c:1.36 --- src/sys/compat/osf1/osf1_file.c:1.35 Thu May 28 15:21:26 2009 +++ src/sys/compat/osf1/osf1_file.c Fri May 29 09:32:41 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: osf1_file.c,v 1.35 2009/05/28 15:21:26 njoly Exp $ */ +/* $NetBSD: osf1_file.c,v 1.36 2009/05/29 09:32:41 njoly Exp $ */ /* * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. @@ -58,7 +58,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: osf1_file.c,v 1.35 2009/05/28 15:21:26 njoly Exp $); +__KERNEL_RCSID(0, $NetBSD: osf1_file.c,v 1.36 2009/05/29 09:32:41 njoly Exp $); #if defined(_KERNEL_OPT) #include opt_syscall_debug.h @@ -142,7 +142,7 @@ struct uio auio; struct iovec aiov; struct osf1_dirent idb; - off_t off; /* true file offset */ + off_t off, off1;/* true file offset */ int buflen, error, eofflag; off_t *cookiebuf = NULL, *cookie; int ncookies, fd; @@ -164,7 +164,7 @@ buflen = min(MAXBSIZE, SCARG(uap, nbytes)); buf = malloc(buflen, M_TEMP, M_WAITOK); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); - off = fp-f_offset; + off = off1 = fp-f_offset; again: aiov.iov_base = buf; aiov.iov_len = buflen; @@ -244,7 +244,7 @@ free(cookiebuf, M_TEMP); free(buf, M_TEMP); if (SCARG(uap, basep) != NULL) - error = copyout(eofflag, SCARG(uap, basep), sizeof(long)); + error = copyout(off1, SCARG(uap, basep), sizeof(long)); out1: fd_putfile(fd); return error;
CVS commit: src/sys/compat/osf1
Module Name:src Committed By: njoly Date: Thu May 28 14:48:20 UTC 2009 Modified Files: src/sys/compat/osf1: osf1_file.c Log Message: Make getdirentries(2) correctly fail with EINVAL for an invalid file descriptor (not for a directory), by not updating basep syscall argument on error. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/compat/osf1/osf1_file.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/osf1/osf1_file.c diff -u src/sys/compat/osf1/osf1_file.c:1.33 src/sys/compat/osf1/osf1_file.c:1.34 --- src/sys/compat/osf1/osf1_file.c:1.33 Mon May 18 12:39:02 2009 +++ src/sys/compat/osf1/osf1_file.c Thu May 28 14:48:20 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: osf1_file.c,v 1.33 2009/05/18 12:39:02 njoly Exp $ */ +/* $NetBSD: osf1_file.c,v 1.34 2009/05/28 14:48:20 njoly Exp $ */ /* * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. @@ -58,7 +58,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: osf1_file.c,v 1.33 2009/05/18 12:39:02 njoly Exp $); +__KERNEL_RCSID(0, $NetBSD: osf1_file.c,v 1.34 2009/05/28 14:48:20 njoly Exp $); #if defined(_KERNEL_OPT) #include opt_syscall_debug.h @@ -245,7 +245,7 @@ free(buf, M_TEMP); out1: fd_putfile(fd); - if (SCARG(uap, basep) != NULL) + if (error == 0 SCARG(uap, basep) != NULL) error = copyout(eofflag, SCARG(uap, basep), sizeof(long)); return error; }
CVS commit: src/sys/compat/osf1
Module Name:src Committed By: njoly Date: Mon May 18 12:39:02 UTC 2009 Modified Files: src/sys/compat/osf1: osf1_descrip.c osf1_file.c osf1_mmap.c Log Message: Adjust compat osf1 to recent pad - PAD change. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/compat/osf1/osf1_descrip.c cvs rdiff -u -r1.32 -r1.33 src/sys/compat/osf1/osf1_file.c cvs rdiff -u -r1.13 -r1.14 src/sys/compat/osf1/osf1_mmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/osf1/osf1_descrip.c diff -u src/sys/compat/osf1/osf1_descrip.c:1.27 src/sys/compat/osf1/osf1_descrip.c:1.28 --- src/sys/compat/osf1/osf1_descrip.c:1.27 Mon Jan 26 13:00:05 2009 +++ src/sys/compat/osf1/osf1_descrip.c Mon May 18 12:39:02 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: osf1_descrip.c,v 1.27 2009/01/26 13:00:05 njoly Exp $ */ +/* $NetBSD: osf1_descrip.c,v 1.28 2009/05/18 12:39:02 njoly Exp $ */ /* * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. @@ -58,7 +58,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: osf1_descrip.c,v 1.27 2009/01/26 13:00:05 njoly Exp $); +__KERNEL_RCSID(0, $NetBSD: osf1_descrip.c,v 1.28 2009/05/18 12:39:02 njoly Exp $); #include sys/param.h #include sys/systm.h @@ -252,7 +252,7 @@ struct sys_ftruncate_args a; SCARG(a, fd) = SCARG(uap, fd); - SCARG(a, pad) = 0; + SCARG(a, PAD) = 0; SCARG(a, length) = SCARG(uap, length); return sys_ftruncate(l, a, retval); @@ -264,7 +264,7 @@ struct sys_lseek_args a; SCARG(a, fd) = SCARG(uap, fd); - SCARG(a, pad) = 0; + SCARG(a, PAD) = 0; SCARG(a, offset) = SCARG(uap, offset); SCARG(a, whence) = SCARG(uap, whence); Index: src/sys/compat/osf1/osf1_file.c diff -u src/sys/compat/osf1/osf1_file.c:1.32 src/sys/compat/osf1/osf1_file.c:1.33 --- src/sys/compat/osf1/osf1_file.c:1.32 Tue Jan 13 11:35:24 2009 +++ src/sys/compat/osf1/osf1_file.c Mon May 18 12:39:02 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: osf1_file.c,v 1.32 2009/01/13 11:35:24 rtr Exp $ */ +/* $NetBSD: osf1_file.c,v 1.33 2009/05/18 12:39:02 njoly Exp $ */ /* * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. @@ -58,7 +58,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: osf1_file.c,v 1.32 2009/01/13 11:35:24 rtr Exp $); +__KERNEL_RCSID(0, $NetBSD: osf1_file.c,v 1.33 2009/05/18 12:39:02 njoly Exp $); #if defined(_KERNEL_OPT) #include opt_syscall_debug.h @@ -387,7 +387,7 @@ struct sys_truncate_args a; SCARG(a, path) = SCARG(uap, path); - SCARG(a, pad) = 0; + SCARG(a, PAD) = 0; SCARG(a, length) = SCARG(uap, length); return sys_truncate(l, a, retval); Index: src/sys/compat/osf1/osf1_mmap.c diff -u src/sys/compat/osf1/osf1_mmap.c:1.13 src/sys/compat/osf1/osf1_mmap.c:1.14 --- src/sys/compat/osf1/osf1_mmap.c:1.13 Thu Dec 20 23:03:03 2007 +++ src/sys/compat/osf1/osf1_mmap.c Mon May 18 12:39:02 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: osf1_mmap.c,v 1.13 2007/12/20 23:03:03 dsl Exp $ */ +/* $NetBSD: osf1_mmap.c,v 1.14 2009/05/18 12:39:02 njoly Exp $ */ /* * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: osf1_mmap.c,v 1.13 2007/12/20 23:03:03 dsl Exp $); +__KERNEL_RCSID(0, $NetBSD: osf1_mmap.c,v 1.14 2009/05/18 12:39:02 njoly Exp $); #include sys/param.h #include sys/systm.h @@ -117,7 +117,7 @@ SCARG(a, addr) = SCARG(uap, addr); SCARG(a, len) = SCARG(uap, len); SCARG(a, fd) = SCARG(uap, fd); - SCARG(a, pad) = 0; + SCARG(a, PAD) = 0; SCARG(a, pos) = SCARG(uap, pos); /* translate prot */