CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: skrll Date: Sat Jun 20 07:13:25 UTC 2015 Modified Files: src/sys/arch/arm/include/arm32: vmparam.h Log Message: __USE_TOPDOWN_VM Fixes PR/49974: mmap(2) of large anonymous regions is broken "go for it" from matt@ To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/arch/arm/include/arm32/vmparam.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/arch/arm/include/arm32/vmparam.h diff -u src/sys/arch/arm/include/arm32/vmparam.h:1.38 src/sys/arch/arm/include/arm32/vmparam.h:1.39 --- src/sys/arch/arm/include/arm32/vmparam.h:1.38 Tue Jun 2 05:54:23 2015 +++ src/sys/arch/arm/include/arm32/vmparam.h Sat Jun 20 07:13:25 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.38 2015/06/02 05:54:23 matt Exp $ */ +/* $NetBSD: vmparam.h,v 1.39 2015/06/20 07:13:25 skrll Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -47,6 +47,7 @@ #include #include /* pt_entry_t */ +#define __USE_TOPDOWN_VM #define USRSTACK VM_MAXUSER_ADDRESS /*
CVS commit: src/sys
Module Name:src Committed By: martin Date: Sat Jun 20 14:41:54 UTC 2015 Modified Files: src/sys/kern: sys_mqueue.c src/sys/sys: mqueue.h Log Message: Make mqueue_get public, rearrange mq_open into a helper function that can be called from compat code, adapt mqueue_create accordingly. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/kern/sys_mqueue.c cvs rdiff -u -r1.16 -r1.17 src/sys/sys/mqueue.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/kern/sys_mqueue.c diff -u src/sys/kern/sys_mqueue.c:1.37 src/sys/kern/sys_mqueue.c:1.38 --- src/sys/kern/sys_mqueue.c:1.37 Fri Sep 5 09:20:59 2014 +++ src/sys/kern/sys_mqueue.c Sat Jun 20 14:41:54 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_mqueue.c,v 1.37 2014/09/05 09:20:59 matt Exp $ */ +/* $NetBSD: sys_mqueue.c,v 1.38 2015/06/20 14:41:54 martin Exp $ */ /* * Copyright (c) 2007-2011 Mindaugas Rasiukevicius @@ -43,7 +43,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sys_mqueue.c,v 1.37 2014/09/05 09:20:59 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sys_mqueue.c,v 1.38 2015/06/20 14:41:54 martin Exp $"); #include #include @@ -284,7 +284,7 @@ mqueue_lookup(const char *name) * => locks the message queue, if found. * => holds a reference on the file descriptor. */ -static int +int mqueue_get(mqd_t mqd, int fflag, mqueue_t **mqret) { const int fd = (int)mqd; @@ -422,13 +422,12 @@ mqueue_access(mqueue_t *mq, int access, } static int -mqueue_create(lwp_t *l, char *name, struct mq_attr *uattr, mode_t mode, +mqueue_create(lwp_t *l, char *name, struct mq_attr *attr, mode_t mode, int oflag, mqueue_t **mqret) { proc_t *p = l->l_proc; struct cwdinfo *cwdi = p->p_cwdi; mqueue_t *mq; - struct mq_attr attr; u_int i; /* Pre-check the limit. */ @@ -442,22 +441,13 @@ mqueue_create(lwp_t *l, char *name, stru } /* Check for mqueue attributes. */ - if (uattr) { - int error; - - error = copyin(uattr, &attr, sizeof(struct mq_attr)); - if (error) { - return error; - } - if (attr.mq_maxmsg <= 0 || attr.mq_maxmsg > mq_max_maxmsg || - attr.mq_msgsize <= 0 || attr.mq_msgsize > mq_max_msgsize) { + if (attr) { + if (attr->mq_maxmsg <= 0 || attr->mq_maxmsg > mq_max_maxmsg || + attr->mq_msgsize <= 0 || + attr->mq_msgsize > mq_max_msgsize) { return EINVAL; } - attr.mq_curmsgs = 0; - } else { - memset(&attr, 0, sizeof(struct mq_attr)); - attr.mq_maxmsg = mq_def_maxmsg; - attr.mq_msgsize = MQ_DEF_MSGSIZE - sizeof(struct mq_msg); + attr->mq_curmsgs = 0; } /* @@ -477,7 +467,13 @@ mqueue_create(lwp_t *l, char *name, stru mq->mq_name = name; mq->mq_refcnt = 1; - memcpy(&mq->mq_attrib, &attr, sizeof(struct mq_attr)); + if (attr != NULL) { + memcpy(&mq->mq_attrib, attr, sizeof(struct mq_attr)); + } else { + memset(&mq->mq_attrib, 0, sizeof(struct mq_attr)); + mq->mq_attrib.mq_maxmsg = mq_def_maxmsg; + mq->mq_attrib.mq_msgsize = MQ_DEF_MSGSIZE - sizeof(struct mq_msg); + } CTASSERT((O_MASK & (MQ_UNLINKED | MQ_RECEIVE)) == 0); mq->mq_attrib.mq_flags = (O_MASK & oflag); @@ -492,28 +488,22 @@ mqueue_create(lwp_t *l, char *name, stru } /* - * General mqueue system calls. + * Helper function for mq_open() - note that "u_name" is a userland pointer, + * while "attr" is a kernel pointer! */ - int -sys_mq_open(struct lwp *l, const struct sys_mq_open_args *uap, -register_t *retval) +mq_handle_open(struct lwp *l, const char *u_name, int oflag, mode_t mode, +struct mq_attr *attr, register_t *retval) { - /* { - syscallarg(const char *) name; - syscallarg(int) oflag; - syscallarg(mode_t) mode; - syscallarg(struct mq_attr) attr; - } */ struct proc *p = l->l_proc; struct mqueue *mq, *mq_new = NULL; - int mqd, error, oflag = SCARG(uap, oflag); + int mqd, error; file_t *fp; char *name; /* Get the name from the user-space. */ name = kmem_alloc(MQ_NAMELEN, KM_SLEEP); - error = copyinstr(SCARG(uap, name), name, MQ_NAMELEN - 1, NULL); + error = copyinstr(u_name, name, MQ_NAMELEN - 1, NULL); if (error) { kmem_free(name, MQ_NAMELEN); return error; @@ -531,8 +521,7 @@ sys_mq_open(struct lwp *l, const struct if (oflag & O_CREAT) { /* Create a new message queue. */ - error = mqueue_create(l, name, SCARG(uap, attr), - SCARG(uap, mode), oflag, &mq_new); + error = mqueue_create(l, name, attr, mode, oflag, &mq_new); if (error) { goto err; } @@ -612,6 +601,34 @@ err: return error; } +/* + * General mqueue system calls. + */ + +int +sys_mq_open(struct lwp *l, const struct sys_mq_open_args *uap, +register_t *retval) +{ + /* { + syscallarg(const char *) name; + syscallarg(int) oflag; + syscallarg(mode_t) mode; + syscallarg(struct mq_attr) attr; + } */ + struct mq_attr *attr = NULL, a; + int error; + + if ((SCARG(uap, oflag) & O_CREAT) && (SCARG(uap,attr) != NULL)) { + error = copyin(&a, SCARG(uap,attr), si
CVS commit: src/sys/sys
Module Name:src Committed By: martin Date: Sat Jun 20 14:44:56 UTC 2015 Modified Files: src/sys/sys: param.h Log Message: Welcome to 7.99.19! Cumulative bump for recent mqueue, sigqueue and modctl changes to support netbsd32 emulation. To generate a diff of this commit: cvs rdiff -u -r1.480 -r1.481 src/sys/sys/param.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/sys/param.h diff -u src/sys/sys/param.h:1.480 src/sys/sys/param.h:1.481 --- src/sys/sys/param.h:1.480 Thu May 21 22:24:24 2015 +++ src/sys/sys/param.h Sat Jun 20 14:44:56 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.480 2015/05/21 22:24:24 rtr Exp $ */ +/* $NetBSD: param.h,v 1.481 2015/06/20 14:44:56 martin Exp $ */ /*- * Copyright (c) 1982, 1986, 1989, 1993 @@ -63,7 +63,7 @@ * 2.99.9 (299000900) */ -#define __NetBSD_Version__ 799001800 /* NetBSD 7.99.18 */ +#define __NetBSD_Version__ 799001900 /* NetBSD 7.99.19 */ #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \ (m) * 100) + (p) * 100) <= __NetBSD_Version__)
CVS commit: src/usr.bin/utoppya
Module Name:src Committed By: hubertf Date: Sat Jun 20 16:42:32 UTC 2015 Modified Files: src/usr.bin/utoppya: utoppya.1 Log Message: There was a pilot flying a small single engine charter plane, with a couple of very important executives on board. He was coming into the Berkeley airport through thick fog with less than 10 miles visibility when his instruments went out. He began circling around looking for a landmark. Finally, a small opening in the fog appears and he sees a tall building with a guy working alone on the fifth floor. He banks the plane around, rolls down the window and shouts to the guy, "Hey where am I?" The man replies, "You're in an airplane." The pilot rolls up the window, executes a 275 degree turn and proceeds to perform a perfect blind landing on the airport runway 5 miles away. Just as the plane stops, so does the engine as the fuel has run out. The passengers are amazed and one asks how he did it. "Quite easy," replies the pilot, "I asked the guy in that building a simple question. The answer he gave me was 100 percent correct but absolutely useless, therefore, that must be NetBSD's support office and from there the airport is just five miles due East." (Credits: http://www.techsupportforum.com/forums/f289/microsoft-joke-404432.html) Seriously: give the reader of the manpage an idea on what this program is for without forcing them to Google or read another manpage. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.bin/utoppya/utoppya.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/utoppya/utoppya.1 diff -u src/usr.bin/utoppya/utoppya.1:1.5 src/usr.bin/utoppya/utoppya.1:1.6 --- src/usr.bin/utoppya/utoppya.1:1.5 Tue Mar 18 18:20:45 2014 +++ src/usr.bin/utoppya/utoppya.1 Sat Jun 20 16:42:32 2015 @@ -1,6 +1,6 @@ -.\" $NetBSD: utoppya.1,v 1.5 2014/03/18 18:20:45 riastradh Exp $ +.\" $NetBSD: utoppya.1,v 1.6 2015/06/20 16:42:32 hubertf Exp $ .\" -.\" Copyright (c) 2006 The NetBSD Foundation, Inc. +.\" Copyright (c) 2006,2015 The NetBSD Foundation, Inc. .\" All rights reserved. .\" .\" This code is derived from software contributed to The NetBSD Foundation @@ -32,7 +32,7 @@ .Os .Sh NAME .Nm utoppya -.Nd Topfield TF5000PVR file manipulation program +.Nd Topfield TF5000PVR DVB recorder file manipulation program .Sh SYNOPSIS .Nm .Op Fl f Ar device @@ -40,6 +40,8 @@ .Sh DESCRIPTION .Nm is the userland interface to the +Topfield TF5000PVR range of DVB recorders (nicknamed `Toppy') +which uses the .Xr utoppy 4 device driver. .Pp
CVS commit: src/sys/compat/netbsd32
Module Name:src Committed By: martin Date: Sat Jun 20 19:55:07 UTC 2015 Modified Files: src/sys/compat/netbsd32: syscalls.master Log Message: Add sigqueuinfo, modctl and mq_*. To generate a diff of this commit: cvs rdiff -u -r1.103 -r1.104 src/sys/compat/netbsd32/syscalls.master 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/netbsd32/syscalls.master diff -u src/sys/compat/netbsd32/syscalls.master:1.103 src/sys/compat/netbsd32/syscalls.master:1.104 --- src/sys/compat/netbsd32/syscalls.master:1.103 Tue Jun 16 10:41:34 2015 +++ src/sys/compat/netbsd32/syscalls.master Sat Jun 20 19:55:07 2015 @@ -1,4 +1,4 @@ - $NetBSD: syscalls.master,v 1.103 2015/06/16 10:41:34 martin Exp $ + $NetBSD: syscalls.master,v 1.104 2015/06/20 19:55:07 martin Exp $ ; from: NetBSD: syscalls.master,v 1.81 1998/07/05 08:49:50 jonathan Exp ; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 @@ -514,8 +514,9 @@ 244 COMPAT_50 { int|netbsd32||__sigtimedwait(netbsd32_sigsetp_t set, \ netbsd32_siginfop_t info, \ netbsd32_timespec50p_t timeout); } -245 UNIMPL -246 UNIMPL +245 STD { int|netbsd32||sigqueueinfo(pid_t pid, \ + const netbsd32_siginfop_t info); } +246 STD { int|netbsd32||modctl(int cmd, netbsd32_voidp arg); } 247 STD { int|netbsd32||_ksem_init(unsigned int value, \ netbsd32_semidp_t idp); } 248 STD { int|netbsd32||_ksem_open(netbsd32_charp name, \ @@ -531,16 +532,34 @@ 255 STD { int|netbsd32||_ksem_destroy(netbsd32_intptr_t id); } 256 STD { int|netbsd32||_ksem_timedwait(intptr_t id, \ const netbsd32_timespecp_t abstime); } -257 UNIMPL -258 UNIMPL -259 UNIMPL -260 UNIMPL -261 UNIMPL -262 UNIMPL -263 UNIMPL -264 UNIMPL -265 UNIMPL -266 UNIMPL +257 STD { mqd_t|netbsd32||mq_open(const netbsd32_charp name, \ + int oflag, mode_t mode, \ + netbsd32_mq_attrp_t attr); } +258 STD { int|netbsd32||mq_close(mqd_t mqdes); } +259 STD { int|netbsd32||mq_unlink(const netbsd32_charp name); } +260 STD { int|netbsd32||mq_getattr(mqd_t mqdes, \ + netbsd32_mq_attrp_t mqstat); } +261 STD { int|netbsd32||mq_setattr(mqd_t mqdes, \ + const netbsd32_mq_attrp_t mqstat, \ + netbsd32_mq_attrp_t omqstat); } +262 STD { int|netbsd32||mq_notify(mqd_t mqdes, \ + const netbsd32_sigeventp_t notification); } +263 STD { int|netbsd32||mq_send(mqd_t mqdes, \ + const netbsd32_charp msg_ptr, \ + netbsd32_size_t msg_len, unsigned msg_prio); } +264 STD { netbsd32_ssize_t|netbsd32||mq_receive(mqd_t mqdes, \ + netbsd32_charp msg_ptr, \ + netbsd32_size_t msg_len, netbsd32_uintp msg_prio); } +265 COMPAT_50 { int|netbsd32||mq_timedsend(mqd_t mqdes, \ + const netbsd32_charp msg_ptr, \ + netbsd32_size_t msg_len, \ + unsigned msg_prio, \ + const netbsd32_timespec50p_t abs_timeout); } +266 COMPAT_50 { netbsd32_ssize_t|netbsd32||mq_timedreceive( \ + mqd_t mqdes, \ + netbsd32_charp msg_ptr, netbsd32_size_t msg_len, \ + netbsd32_uintp msg_prio, \ + const netbsd32_timespec50p_t abs_timeout); } 267 UNIMPL 268 UNIMPL 269 UNIMPL
CVS commit: src/sys/compat/netbsd32
Module Name:src Committed By: martin Date: Sat Jun 20 19:56:24 UTC 2015 Modified Files: src/sys/compat/netbsd32: netbsd32_syscall.h netbsd32_syscallargs.h netbsd32_syscalls.c netbsd32_sysent.c netbsd32_systrace_args.c Log Message: Regen (sigqueinfo, modctl, mq_*) To generate a diff of this commit: cvs rdiff -u -r1.112 -r1.113 src/sys/compat/netbsd32/netbsd32_syscall.h \ src/sys/compat/netbsd32/netbsd32_syscallargs.h cvs rdiff -u -r1.111 -r1.112 src/sys/compat/netbsd32/netbsd32_syscalls.c \ src/sys/compat/netbsd32/netbsd32_sysent.c cvs rdiff -u -r1.2 -r1.3 src/sys/compat/netbsd32/netbsd32_systrace_args.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/netbsd32/netbsd32_syscall.h diff -u src/sys/compat/netbsd32/netbsd32_syscall.h:1.112 src/sys/compat/netbsd32/netbsd32_syscall.h:1.113 --- src/sys/compat/netbsd32/netbsd32_syscall.h:1.112 Tue Jun 16 10:42:13 2015 +++ src/sys/compat/netbsd32/netbsd32_syscall.h Sat Jun 20 19:56:24 2015 @@ -1,10 +1,10 @@ -/* $NetBSD: netbsd32_syscall.h,v 1.112 2015/06/16 10:42:13 martin Exp $ */ +/* $NetBSD: netbsd32_syscall.h,v 1.113 2015/06/20 19:56:24 martin Exp $ */ /* * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.103 2015/06/16 10:41:34 martin Exp + * created from NetBSD: syscalls.master,v 1.104 2015/06/20 19:55:07 martin Exp */ #ifndef _NETBSD32_SYS_SYSCALL_H_ @@ -675,6 +675,12 @@ /* syscall: "compat_50_netbsd32___sigtimedwait" ret: "int" args: "netbsd32_sigsetp_t" "netbsd32_siginfop_t" "netbsd32_timespec50p_t" */ #define NETBSD32_SYS_compat_50_netbsd32___sigtimedwait 244 +/* syscall: "netbsd32_sigqueueinfo" ret: "int" args: "pid_t" "const netbsd32_siginfop_t" */ +#define NETBSD32_SYS_netbsd32_sigqueueinfo 245 + +/* syscall: "netbsd32_modctl" ret: "int" args: "int" "netbsd32_voidp" */ +#define NETBSD32_SYS_netbsd32_modctl 246 + /* syscall: "netbsd32__ksem_init" ret: "int" args: "unsigned int" "netbsd32_semidp_t" */ #define NETBSD32_SYS_netbsd32__ksem_init 247 @@ -705,6 +711,36 @@ /* syscall: "netbsd32__ksem_timedwait" ret: "int" args: "intptr_t" "const netbsd32_timespecp_t" */ #define NETBSD32_SYS_netbsd32__ksem_timedwait 256 +/* syscall: "netbsd32_mq_open" ret: "mqd_t" args: "const netbsd32_charp" "int" "mode_t" "netbsd32_mq_attrp_t" */ +#define NETBSD32_SYS_netbsd32_mq_open 257 + +/* syscall: "netbsd32_mq_close" ret: "int" args: "mqd_t" */ +#define NETBSD32_SYS_netbsd32_mq_close 258 + +/* syscall: "netbsd32_mq_unlink" ret: "int" args: "const netbsd32_charp" */ +#define NETBSD32_SYS_netbsd32_mq_unlink 259 + +/* syscall: "netbsd32_mq_getattr" ret: "int" args: "mqd_t" "netbsd32_mq_attrp_t" */ +#define NETBSD32_SYS_netbsd32_mq_getattr 260 + +/* syscall: "netbsd32_mq_setattr" ret: "int" args: "mqd_t" "const netbsd32_mq_attrp_t" "netbsd32_mq_attrp_t" */ +#define NETBSD32_SYS_netbsd32_mq_setattr 261 + +/* syscall: "netbsd32_mq_notify" ret: "int" args: "mqd_t" "const netbsd32_sigeventp_t" */ +#define NETBSD32_SYS_netbsd32_mq_notify 262 + +/* syscall: "netbsd32_mq_send" ret: "int" args: "mqd_t" "const netbsd32_charp" "netbsd32_size_t" "unsigned" */ +#define NETBSD32_SYS_netbsd32_mq_send 263 + +/* syscall: "netbsd32_mq_receive" ret: "netbsd32_ssize_t" args: "mqd_t" "netbsd32_charp" "netbsd32_size_t" "netbsd32_uintp" */ +#define NETBSD32_SYS_netbsd32_mq_receive 264 + +/* syscall: "compat_50_netbsd32_mq_timedsend" ret: "int" args: "mqd_t" "const netbsd32_charp" "netbsd32_size_t" "unsigned" "const netbsd32_timespec50p_t" */ +#define NETBSD32_SYS_compat_50_netbsd32_mq_timedsend 265 + +/* syscall: "compat_50_netbsd32_mq_timedreceive" ret: "netbsd32_ssize_t" args: "mqd_t" "netbsd32_charp" "netbsd32_size_t" "netbsd32_uintp" "const netbsd32_timespec50p_t" */ +#define NETBSD32_SYS_compat_50_netbsd32_mq_timedreceive 266 + /* syscall: "netbsd32___posix_rename" ret: "int" args: "netbsd32_charp" "netbsd32_charp" */ #define NETBSD32_SYS_netbsd32___posix_rename 270 Index: src/sys/compat/netbsd32/netbsd32_syscallargs.h diff -u src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.112 src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.113 --- src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.112 Tue Jun 16 10:42:13 2015 +++ src/sys/compat/netbsd32/netbsd32_syscallargs.h Sat Jun 20 19:56:24 2015 @@ -1,10 +1,10 @@ -/* $NetBSD: netbsd32_syscallargs.h,v 1.112 2015/06/16 10:42:13 martin Exp $ */ +/* $NetBSD: netbsd32_syscallargs.h,v 1.113 2015/06/20 19:56:24 martin Exp $ */ /* * System call argument lists. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.103 2015/06/16 10:41:34 martin Exp + * created from NetBSD: syscalls.master,v 1.104 2015/06/20 19:55:07 martin Exp */ #ifndef _NETBSD32_SYS_SYSCALLARGS_H_ @@ -1250,6 +1250,18 @@ struct compat_50_netbsd32___sigtimedwait }; check_syscall_args
CVS commit: src/sys/compat/netbsd32
Module Name:src Committed By: martin Date: Sat Jun 20 19:58:41 UTC 2015 Modified Files: src/sys/compat/netbsd32: files.netbsd32 netbsd32.h netbsd32_conv.h netbsd32_signal.c Added Files: src/sys/compat/netbsd32: netbsd32_module.c netbsd32_mqueue.c Log Message: Implement modctl, sigqueinfo and mq_* To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/compat/netbsd32/files.netbsd32 cvs rdiff -u -r1.103 -r1.104 src/sys/compat/netbsd32/netbsd32.h cvs rdiff -u -r1.28 -r1.29 src/sys/compat/netbsd32/netbsd32_conv.h cvs rdiff -u -r0 -r1.1 src/sys/compat/netbsd32/netbsd32_module.c \ src/sys/compat/netbsd32/netbsd32_mqueue.c cvs rdiff -u -r1.38 -r1.39 src/sys/compat/netbsd32/netbsd32_signal.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/netbsd32/files.netbsd32 diff -u src/sys/compat/netbsd32/files.netbsd32:1.34 src/sys/compat/netbsd32/files.netbsd32:1.35 --- src/sys/compat/netbsd32/files.netbsd32:1.34 Mon Nov 17 01:01:57 2014 +++ src/sys/compat/netbsd32/files.netbsd32 Sat Jun 20 19:58:40 2015 @@ -1,4 +1,4 @@ -# $NetBSD: files.netbsd32,v 1.34 2014/11/17 01:01:57 uebayasi Exp $ +# $NetBSD: files.netbsd32,v 1.35 2015/06/20 19:58:40 martin Exp $ # # config file description for machine-independent netbsd32 compat code. # included by ports that need it. @@ -17,7 +17,9 @@ file compat/netbsd32/netbsd32_fs.c comp file compat/netbsd32/netbsd32_ioctl.c compat_netbsd32 file compat/netbsd32/netbsd32_ipc.c compat_netbsd32 file compat/netbsd32/netbsd32_lwp.c compat_netbsd32 +file compat/netbsd32/netbsd32_module.c compat_netbsd32 file compat/netbsd32/netbsd32_mod.c compat_netbsd32 +file compat/netbsd32/netbsd32_mqueue.c compat_netbsd32 file compat/netbsd32/netbsd32_select.c compat_netbsd32 file compat/netbsd32/netbsd32_sem.c compat_netbsd32 file compat/netbsd32/netbsd32_signal.c compat_netbsd32 Index: src/sys/compat/netbsd32/netbsd32.h diff -u src/sys/compat/netbsd32/netbsd32.h:1.103 src/sys/compat/netbsd32/netbsd32.h:1.104 --- src/sys/compat/netbsd32/netbsd32.h:1.103 Sun Oct 5 20:17:28 2014 +++ src/sys/compat/netbsd32/netbsd32.h Sat Jun 20 19:58:40 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32.h,v 1.103 2014/10/05 20:17:28 christos Exp $ */ +/* $NetBSD: netbsd32.h,v 1.104 2015/06/20 19:58:40 martin Exp $ */ /* * Copyright (c) 1998, 2001, 2008 Matthew R. Green @@ -143,6 +143,7 @@ typedef netbsd32_pointer_t netbsd32_u_ch typedef netbsd32_pointer_t netbsd32_charpp; typedef netbsd32_pointer_t netbsd32_size_tp; typedef netbsd32_pointer_t netbsd32_intp; +typedef netbsd32_pointer_t netbsd32_uintp; typedef netbsd32_pointer_t netbsd32_longp; typedef netbsd32_pointer_t netbsd32_caddrp; typedef netbsd32_pointer_t netbsd32_caddr; @@ -1000,6 +1001,21 @@ struct netbsd32_posix_spawn_file_actions netbsd32_posix_spawn_file_actions_entryp fae; }; +struct netbsd32_modctl_load { + netbsd32_charp ml_filename; + int ml_flags; + netbsd32_charp ml_props; + netbsd32_size_t ml_propslen; +}; + +struct netbsd32_mq_attr { + netbsd32_long mq_flags; + netbsd32_long mq_maxmsg; + netbsd32_long mq_msgsize; + netbsd32_long mq_curmsgs; +}; +typedef netbsd32_pointer_t netbsd32_mq_attrp_t; + #if 0 int netbsd32_kevent(struct lwp *, void *, register_t *); #endif @@ -1039,7 +1055,8 @@ vaddr_t netbsd32_vm_default_addr(struct void netbsd32_adjust_limits(struct proc *); void netbsd32_si_to_si32(siginfo32_t *, const siginfo_t *); -void netbsd32_si32_to_si(siginfo_t *, const siginfo32_t *); +void netbsd32_ksi32_to_ksi(struct _ksiginfo *si, const struct __ksiginfo32 *si32); + void startlwp32(void *); struct compat_50_netbsd32___semctl14_args; Index: src/sys/compat/netbsd32/netbsd32_conv.h diff -u src/sys/compat/netbsd32/netbsd32_conv.h:1.28 src/sys/compat/netbsd32/netbsd32_conv.h:1.29 --- src/sys/compat/netbsd32/netbsd32_conv.h:1.28 Tue Mar 18 18:20:41 2014 +++ src/sys/compat/netbsd32/netbsd32_conv.h Sat Jun 20 19:58:40 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_conv.h,v 1.28 2014/03/18 18:20:41 riastradh Exp $ */ +/* $NetBSD: netbsd32_conv.h,v 1.29 2015/06/20 19:58:40 martin Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -786,4 +786,24 @@ netbsd32_copyout_plistref(netbsd32_point sizeof(struct netbsd32_plistref)); } +static __inline void +netbsd32_to_mq_attr(const struct netbsd32_mq_attr *a32, +struct mq_attr *attr) +{ + attr->mq_flags = a32->mq_flags; + attr->mq_maxmsg = a32->mq_maxmsg; + attr->mq_msgsize = a32->mq_msgsize; + attr->mq_curmsgs = a32->mq_curmsgs; +} + +static __inline void +netbsd32_from_mq_attr(const struct mq_attr *attr, + struct netbsd32_mq_attr *a32) +{ + a32->mq_flags = attr->mq_flags; + a32->mq_maxmsg = attr->mq_maxmsg; + a32->mq_msgsize = attr->mq_msgsize; + a32->mq_curmsgs = attr->mq_curmsgs; +} + #endif /* _COMPAT_NETBSD32_NETBSD32_CONV_H_ */ Index: src/sys/compat/netbsd32/netbsd32_signal.c diff -u src/sys/
CVS commit: src/external/bsd/blacklist/bin
Module Name:src Committed By: christos Date: Sun Jun 21 01:13:21 UTC 2015 Modified Files: src/external/bsd/blacklist/bin: blacklistd.c Log Message: Restart the loop each time we delete an entry because the hash code does not handle it well. Is that a db bug? To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/external/bsd/blacklist/bin/blacklistd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/blacklist/bin/blacklistd.c diff -u src/external/bsd/blacklist/bin/blacklistd.c:1.32 src/external/bsd/blacklist/bin/blacklistd.c:1.33 --- src/external/bsd/blacklist/bin/blacklistd.c:1.32 Wed Jan 28 17:30:42 2015 +++ src/external/bsd/blacklist/bin/blacklistd.c Sat Jun 20 21:13:21 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: blacklistd.c,v 1.32 2015/01/28 22:30:42 christos Exp $ */ +/* $NetBSD: blacklistd.c,v 1.33 2015/06/21 01:13:21 christos Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include "config.h" #endif #include -__RCSID("$NetBSD: blacklistd.c,v 1.32 2015/01/28 22:30:42 christos Exp $"); +__RCSID("$NetBSD: blacklistd.c,v 1.33 2015/06/21 01:13:21 christos Exp $"); #include #include @@ -284,6 +284,7 @@ update(void) return; } +again: for (n = 0, f = 1; state_iterate(state, &c, &dbi, f) == 1; f = 0, n++) { @@ -305,6 +306,7 @@ update(void) buf, c.c_lmask, c.c_port, c.c_duration); } state_del(state, &c); + goto again; } }
CVS commit: src/sbin/fsck
Module Name:src Committed By: dholland Date: Sun Jun 21 03:33:22 UTC 2015 Modified Files: src/sbin/fsck: exitvalues.h Log Message: add missing rcsid To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sbin/fsck/exitvalues.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/fsck/exitvalues.h diff -u src/sbin/fsck/exitvalues.h:1.2 src/sbin/fsck/exitvalues.h:1.3 --- src/sbin/fsck/exitvalues.h:1.2 Mon Apr 28 20:23:08 2008 +++ src/sbin/fsck/exitvalues.h Sun Jun 21 03:33:22 2015 @@ -1,3 +1,4 @@ +/* $NetBSD: exitvalues.h,v 1.3 2015/06/21 03:33:22 dholland Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. @@ -26,6 +27,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ + #define FSCK_EXIT_OK 0 #define FSCK_EXIT_USAGE 1 #define FSCK_EXIT_UNRESOLVED 2
CVS commit: src/sbin/fsck
Module Name:src Committed By: dholland Date: Sun Jun 21 03:58:36 UTC 2015 Modified Files: src/sbin/fsck: fsutil.c fsutil.h Log Message: global variables should be declared extern. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sbin/fsck/fsutil.c cvs rdiff -u -r1.19 -r1.20 src/sbin/fsck/fsutil.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/fsck/fsutil.c diff -u src/sbin/fsck/fsutil.c:1.24 src/sbin/fsck/fsutil.c:1.25 --- src/sbin/fsck/fsutil.c:1.24 Sun Jan 13 19:53:16 2013 +++ src/sbin/fsck/fsutil.c Sun Jun 21 03:58:36 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: fsutil.c,v 1.24 2013/01/13 19:53:16 mlelstv Exp $ */ +/* $NetBSD: fsutil.c,v 1.25 2015/06/21 03:58:36 dholland Exp $ */ /* * Copyright (c) 1990, 1993 @@ -31,7 +31,7 @@ #include #ifndef lint -__RCSID("$NetBSD: fsutil.c,v 1.24 2013/01/13 19:53:16 mlelstv Exp $"); +__RCSID("$NetBSD: fsutil.c,v 1.25 2015/06/21 03:58:36 dholland Exp $"); #endif /* not lint */ #include @@ -53,6 +53,8 @@ __RCSID("$NetBSD: fsutil.c,v 1.24 2013/0 #include "fsutil.h" #include "exitvalues.h" +volatile sig_atomic_t returntosingle; + static const char *dev = NULL; static int hot = 0; static int preen = 0; Index: src/sbin/fsck/fsutil.h diff -u src/sbin/fsck/fsutil.h:1.19 src/sbin/fsck/fsutil.h:1.20 --- src/sbin/fsck/fsutil.h:1.19 Sat Apr 7 16:44:10 2012 +++ src/sbin/fsck/fsutil.h Sun Jun 21 03:58:36 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: fsutil.h,v 1.19 2012/04/07 16:44:10 christos Exp $ */ +/* $NetBSD: fsutil.h,v 1.20 2015/06/21 03:58:36 dholland Exp $ */ /* * Copyright (c) 1996 Christos Zoulas. All rights reserved. @@ -51,7 +51,7 @@ int checkfstab(int, int, void *(*)(struc int (*) (const char *, const char *, const char *, void *, pid_t *)); void (*ckfinish)(int); -volatile sig_atomic_t returntosingle; +extern volatile sig_atomic_t returntosingle; void catch(int) __dead; void catchquit(int); void voidquit(int);
CVS commit: src/sbin/fsck
Module Name:src Committed By: dholland Date: Sun Jun 21 04:01:40 UTC 2015 Modified Files: src/sbin/fsck: fsutil.c preen.c Log Message: Add used-by comments on source files that are .PATH'd in from elsewhere. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sbin/fsck/fsutil.c cvs rdiff -u -r1.31 -r1.32 src/sbin/fsck/preen.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/fsck/fsutil.c diff -u src/sbin/fsck/fsutil.c:1.25 src/sbin/fsck/fsutil.c:1.26 --- src/sbin/fsck/fsutil.c:1.25 Sun Jun 21 03:58:36 2015 +++ src/sbin/fsck/fsutil.c Sun Jun 21 04:01:40 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: fsutil.c,v 1.25 2015/06/21 03:58:36 dholland Exp $ */ +/* $NetBSD: fsutil.c,v 1.26 2015/06/21 04:01:40 dholland Exp $ */ /* * Copyright (c) 1990, 1993 @@ -31,9 +31,20 @@ #include #ifndef lint -__RCSID("$NetBSD: fsutil.c,v 1.25 2015/06/21 03:58:36 dholland Exp $"); +__RCSID("$NetBSD: fsutil.c,v 1.26 2015/06/21 04:01:40 dholland Exp $"); #endif /* not lint */ +/* + * used by sbin/fsck + * used by sbin/fsck_ext2fs + * used by sbin/fsck_ffs + * used by sbin/fsck_lfs + * used by sbin/fsck_msdos + * used by sbin/fsck_v7fs + * used by sbin/fsdb + * used by usr.sbin/quotacheck + */ + #include #include Index: src/sbin/fsck/preen.c diff -u src/sbin/fsck/preen.c:1.31 src/sbin/fsck/preen.c:1.32 --- src/sbin/fsck/preen.c:1.31 Sat Apr 7 04:52:20 2012 +++ src/sbin/fsck/preen.c Sun Jun 21 04:01:40 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: preen.c,v 1.31 2012/04/07 04:52:20 christos Exp $ */ +/* $NetBSD: preen.c,v 1.32 2015/06/21 04:01:40 dholland Exp $ */ /* * Copyright (c) 1990, 1993 @@ -34,10 +34,15 @@ #if 0 static char sccsid[] = "@(#)preen.c 8.5 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: preen.c,v 1.31 2012/04/07 04:52:20 christos Exp $"); +__RCSID("$NetBSD: preen.c,v 1.32 2015/06/21 04:01:40 dholland Exp $"); #endif #endif /* not lint */ +/* + * used by sbin/fsck + * used by usr.sbin/quotacheck + */ + #include #include #include
CVS commit: src/usr.bin/midirecord
Module Name:src Committed By: mrg Date: Sun Jun 21 06:04:45 UTC 2015 Modified Files: src/usr.bin/midirecord: midirecord.c Log Message: fix the log message typo. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/usr.bin/midirecord/midirecord.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/midirecord/midirecord.c diff -u src/usr.bin/midirecord/midirecord.c:1.8 src/usr.bin/midirecord/midirecord.c:1.9 --- src/usr.bin/midirecord/midirecord.c:1.8 Wed Mar 4 13:34:49 2015 +++ src/usr.bin/midirecord/midirecord.c Sun Jun 21 06:04:45 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: midirecord.c,v 1.8 2015/03/04 13:34:49 christos Exp $ */ +/* $NetBSD: midirecord.c,v 1.9 2015/06/21 06:04:45 mrg Exp $ */ /* * Copyright (c) 2014 Matthew R. Green @@ -33,7 +33,7 @@ #include #ifndef lint -__RCSID("$NetBSD: midirecord.c,v 1.8 2015/03/04 13:34:49 christos Exp $"); +__RCSID("$NetBSD: midirecord.c,v 1.9 2015/06/21 06:04:45 mrg Exp $"); #endif #include @@ -301,7 +301,7 @@ midi_event_local_to_output(seq_event_t e { size_t size = 0; - LOG("UNHANDLED SEQ_COCAL"); + LOG("UNHANDLED SEQ_LOCAL"); return size; }
CVS commit: src/usr.bin
Module Name:src Committed By: mrg Date: Sun Jun 21 06:06:01 UTC 2015 Modified Files: src/usr.bin/audio/common: Makefile audio.c src/usr.bin/midirecord: Makefile Added Files: src/usr.bin/audio/common: decode.c Log Message: separate the 3 functions midirecord uses from libaudio.a into its own file and link it directly, instead of having an (implicit) dependancy on usr.bin/audio/common being built before usr.bin/midirecord is linked. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/usr.bin/audio/common/Makefile cvs rdiff -u -r1.23 -r1.24 src/usr.bin/audio/common/audio.c cvs rdiff -u -r0 -r1.1 src/usr.bin/audio/common/decode.c cvs rdiff -u -r1.1 -r1.2 src/usr.bin/midirecord/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/audio/common/Makefile diff -u src/usr.bin/audio/common/Makefile:1.8 src/usr.bin/audio/common/Makefile:1.9 --- src/usr.bin/audio/common/Makefile:1.8 Sat May 3 14:48:31 2008 +++ src/usr.bin/audio/common/Makefile Sun Jun 21 06:06:01 2015 @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.8 2008/05/03 14:48:31 lukem Exp $ +# $NetBSD: Makefile,v 1.9 2015/06/21 06:06:01 mrg Exp $ LIBISPRIVATE= yes LIB= audio -SRCS= audio.c wav.c sun.c +SRCS= audio.c decode.c wav.c sun.c .include Index: src/usr.bin/audio/common/audio.c diff -u src/usr.bin/audio/common/audio.c:1.23 src/usr.bin/audio/common/audio.c:1.24 --- src/usr.bin/audio/common/audio.c:1.23 Tue Dec 30 01:22:09 2014 +++ src/usr.bin/audio/common/audio.c Sun Jun 21 06:06:01 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: audio.c,v 1.23 2014/12/30 01:22:09 mrg Exp $ */ +/* $NetBSD: audio.c,v 1.24 2015/06/21 06:06:01 mrg Exp $ */ /* * Copyright (c) 1999 Matthew R. Green @@ -32,7 +32,7 @@ #include #ifndef lint -__RCSID("$NetBSD: audio.c,v 1.23 2014/12/30 01:22:09 mrg Exp $"); +__RCSID("$NetBSD: audio.c,v 1.24 2015/06/21 06:06:01 mrg Exp $"); #endif @@ -139,83 +139,6 @@ audio_enc_to_val(const char *enc) return (AUDIO_ENOENT); } -void -decode_int(const char *arg, int *intp) -{ - char *ep; - int ret; - - ret = (int)strtoul(arg, &ep, 10); - - if (ep[0] == '\0') { - *intp = ret; - return; - } - errx(1, "argument `%s' not a valid integer", arg); -} - -void -decode_uint(const char *arg, unsigned *intp) -{ - char *ep; - unsigned ret; - - ret = (unsigned)strtoul(arg, &ep, 10); - - if (ep[0] == '\0') { - *intp = ret; - return; - } - errx(1, "argument `%s' not a valid integer", arg); -} - -void -decode_time(const char *arg, struct timeval *tvp) -{ - char *s, *colon, *dot; - char *copy = strdup(arg); - int first; - - if (copy == NULL) - err(1, "could not allocate a copy of %s", arg); - - tvp->tv_sec = tvp->tv_usec = 0; - s = copy; - - /* handle [hh:]mm:ss.dd */ - if ((colon = strchr(s, ':')) != NULL) { - *colon++ = '\0'; - decode_int(s, &first); - tvp->tv_sec = first * 60; /* minutes */ - s = colon; - - if ((colon = strchr(s, ':')) != NULL) { - *colon++ = '\0'; - decode_int(s, &first); - tvp->tv_sec += first; /* minutes and hours */ - tvp->tv_sec *= 60; - s = colon; - } - } - if ((dot = strchr(s, '.')) != NULL) { - int i, base = 10; - - *dot++ = '\0'; - - for (i = 0; i < 6; i++, base /= 10) { - if (!dot[i]) -break; - if (!isdigit((unsigned char)dot[i])) -errx(1, "argument `%s' is not a value time specification", arg); - tvp->tv_usec += base * (dot[i] - '0'); - } - } - decode_int(s, &first); - tvp->tv_sec += first; - - free(copy); -} - /* * decode a string into an encoding value. */ Index: src/usr.bin/midirecord/Makefile diff -u src/usr.bin/midirecord/Makefile:1.1 src/usr.bin/midirecord/Makefile:1.2 --- src/usr.bin/midirecord/Makefile:1.1 Tue Dec 30 04:14:25 2014 +++ src/usr.bin/midirecord/Makefile Sun Jun 21 06:06:01 2015 @@ -1,15 +1,18 @@ -# $NetBSD: Makefile,v 1.1 2014/12/30 04:14:25 mrg Exp $ +# $NetBSD: Makefile,v 1.2 2015/06/21 06:06:01 mrg Exp $ +SRCS= midirecord decode.c PROG= midirecord .include -LIBAUDIO != cd ${.CURDIR}/../audio/common && ${PRINTOBJDIR} +#LIBAUDIO != cd ${.CURDIR}/../audio/common && ${PRINTOBJDIR} CPPFLAGS+=-I${.CURDIR}/../audio/common -DPADD+= ${LIBAUDIO}/libaudio.a -LDADD+= -L${LIBAUDIO} -laudio +#DPADD+= ${LIBAUDIO}/libaudio.a +#LDADD+= -L${LIBAUDIO} -laudio DPADD+= ${LIBUTIL} LDADD+= -lutil +.PATH: ${.CURDIR}/../audio/common + .include Added files: Index: src/usr.bin/audio/common/decode.c diff -u /dev/null src/usr.bin/audio/common/decode.c:1.1 --- /dev/null Sun Jun 21 06:06:02 2015 +++ src/usr.bin/audio/common/decode.c Sun Jun 21 06:06:01 2015 @@ -0,0 +1,121 @@ +/* $NetBSD: decode.c,v 1.1 2015/06/21 06:06:01 mrg Exp $ */ + +/* + * Copyright (c) 1999 Matthew R. Green + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must re
CVS commit: src/sys/compat/netbsd32
Module Name:src Committed By: msaitoh Date: Sun Jun 21 06:51:05 UTC 2015 Modified Files: src/sys/compat/netbsd32: netbsd32_module.c Log Message: Add missing sys/kauth.h To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/compat/netbsd32/netbsd32_module.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/netbsd32/netbsd32_module.c diff -u src/sys/compat/netbsd32/netbsd32_module.c:1.1 src/sys/compat/netbsd32/netbsd32_module.c:1.2 --- src/sys/compat/netbsd32/netbsd32_module.c:1.1 Sat Jun 20 19:58:40 2015 +++ src/sys/compat/netbsd32/netbsd32_module.c Sun Jun 21 06:51:05 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_module.c,v 1.1 2015/06/20 19:58:40 martin Exp $ */ +/* $NetBSD: netbsd32_module.c,v 1.2 2015/06/21 06:51:05 msaitoh Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -29,10 +29,11 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_module.c,v 1.1 2015/06/20 19:58:40 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_module.c,v 1.2 2015/06/21 06:51:05 msaitoh Exp $"); #include #include +#include #include #include