Re: CVS commit: src/external/cddl/osnet

2019-06-19 Thread Kamil Rytarowski
On 19.06.2019 22:47, Kamil Rytarowski wrote:
> On 19.06.2019 10:18, Juergen Hannken-Illjes wrote:
>> Module Name: src
>> Committed By:hannken
>> Date:Wed Jun 19 08:18:01 UTC 2019
>>
>> Modified Files:
>>  src/external/cddl/osnet/include: libintl.h stdio_ext.h thread.h
>>  src/external/cddl/osnet/sys/sys: isa_defs.h procset.h sysmacros.h
>>
>> Log Message:
>> Sync with upstream r315983.
>>
>>
> 
> Shuffling these files keep breaking bootstrap on Linux and we need it
> for syzbot..
> 
> Changes like #ifndef #include  #endif look highly
> suspicious and probably break on every Linux.
> 
> I will try to fix it again the fallout with tools/compat.
> 
> https://syzkaller.appspot.com/text?tag=CrashLog=14dcf0b2a0
> 

For the record. syzbot is up again!



signature.asc
Description: OpenPGP digital signature


CVS commit: src/sys/sys

2019-06-19 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jun 20 03:34:38 UTC 2019

Modified Files:
src/sys/sys: param.h

Log Message:
Welcome to 8.99.47!

New function do_posix_mknodat() that is called from the netbsd32 compat
module.


To generate a diff of this commit:
cvs rdiff -u -r1.594 -r1.595 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.594 src/sys/sys/param.h:1.595
--- src/sys/sys/param.h:1.594	Tue Jun 18 22:41:32 2019
+++ src/sys/sys/param.h	Thu Jun 20 03:34:38 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.594 2019/06/18 22:41:32 kamil Exp $	*/
+/*	$NetBSD: param.h,v 1.595 2019/06/20 03:34:38 kamil Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -67,7 +67,7 @@
  *	2.99.9		(299000900)
  */
 
-#define	__NetBSD_Version__	899004600	/* NetBSD 8.99.46 */
+#define	__NetBSD_Version__	899004700	/* NetBSD 8.99.47 */
 
 #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \
 (m) * 100) + (p) * 100) <= __NetBSD_Version__)



CVS commit: src/sys/sys

2019-06-19 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jun 20 03:34:38 UTC 2019

Modified Files:
src/sys/sys: param.h

Log Message:
Welcome to 8.99.47!

New function do_posix_mknodat() that is called from the netbsd32 compat
module.


To generate a diff of this commit:
cvs rdiff -u -r1.594 -r1.595 src/sys/sys/param.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2019-06-19 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jun 20 03:31:54 UTC 2019

Modified Files:
src/lib/libc/sys: mknod.2
src/sys/compat/netbsd32: netbsd32_netbsd.c
src/sys/kern: vfs_syscalls.c
src/sys/sys: vfs_syscalls.h
src/tests/lib/libc/c063: t_mkfifoat.c
src/tests/lib/libc/sys: t_mkfifo.c

Log Message:
Add mkfifo{,at}(2) mode in mknod{,at}(2) as requested by POSIX

mknod with mode & S_IFIFO and dev=0 shall behave like mkfifo.

Update the documentation to reflect this state.

Add ATF tests.

This is an in-kernel implementation as typically user-space programs use
mkfifo(2) directly, however whenever there is need to bypass libc (like in
valgrind) then portable POSIX software calls the mknod syscall.

Noted on tech-kern@ by Greg Troxel.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/lib/libc/sys/mknod.2
cvs rdiff -u -r1.227 -r1.228 src/sys/compat/netbsd32/netbsd32_netbsd.c
cvs rdiff -u -r1.530 -r1.531 src/sys/kern/vfs_syscalls.c
cvs rdiff -u -r1.24 -r1.25 src/sys/sys/vfs_syscalls.h
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libc/c063/t_mkfifoat.c
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/sys/t_mkfifo.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys

2019-06-19 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jun 20 03:31:30 UTC 2019

Modified Files:
src/sys/modules: Makefile
src/sys/modules/ffs: Makefile
src/sys/ufs/chfs: chfs_vfsops.c
src/sys/ufs/ext2fs: ext2fs_vfsops.c
src/sys/ufs/ffs: ffs_vfsops.c
src/sys/ufs/ufs: ufs_vfsops.c
Added Files:
src/sys/modules/ufs: Makefile

Log Message:
Split the ufs code out of the ffs module and into its own module.

Adapt chfs and ext2fs modules accordingly.


To generate a diff of this commit:
cvs rdiff -u -r1.221 -r1.222 src/sys/modules/Makefile
cvs rdiff -u -r1.11 -r1.12 src/sys/modules/ffs/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/ufs/Makefile
cvs rdiff -u -r1.18 -r1.19 src/sys/ufs/chfs/chfs_vfsops.c
cvs rdiff -u -r1.213 -r1.214 src/sys/ufs/ext2fs/ext2fs_vfsops.c
cvs rdiff -u -r1.361 -r1.362 src/sys/ufs/ffs/ffs_vfsops.c
cvs rdiff -u -r1.56 -r1.57 src/sys/ufs/ufs/ufs_vfsops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/distrib/sets/lists/modules

2019-06-19 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jun 20 03:31:55 UTC 2019

Modified Files:
src/distrib/sets/lists/modules: mi

Log Message:
Update sets lists for new ufs module


To generate a diff of this commit:
cvs rdiff -u -r1.121 -r1.122 src/distrib/sets/lists/modules/mi

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/modules/mi
diff -u src/distrib/sets/lists/modules/mi:1.121 src/distrib/sets/lists/modules/mi:1.122
--- src/distrib/sets/lists/modules/mi:1.121	Tue Mar 26 00:36:14 2019
+++ src/distrib/sets/lists/modules/mi	Thu Jun 20 03:31:55 2019
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.121 2019/03/26 00:36:14 pgoyette Exp $
+# $NetBSD: mi,v 1.122 2019/06/20 03:31:55 pgoyette Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -434,6 +434,8 @@
 ./@MODULEDIR@/uatp/uatp.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/udfbase-kernel-modules	kmod
 ./@MODULEDIR@/udf/udf.kmod			base-kernel-modules	kmod
+./@MODULEDIR@/ufsbase-kernel-modules	kmod
+./@MODULEDIR@/ufs/ufs.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/umapbase-kernel-modules	kmod
 ./@MODULEDIR@/umap/umap.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/unionbase-kernel-modules	kmod



CVS commit: src/distrib/sets/lists/modules

2019-06-19 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jun 20 03:31:55 UTC 2019

Modified Files:
src/distrib/sets/lists/modules: mi

Log Message:
Update sets lists for new ufs module


To generate a diff of this commit:
cvs rdiff -u -r1.121 -r1.122 src/distrib/sets/lists/modules/mi

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys

2019-06-19 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jun 20 03:31:30 UTC 2019

Modified Files:
src/sys/modules: Makefile
src/sys/modules/ffs: Makefile
src/sys/ufs/chfs: chfs_vfsops.c
src/sys/ufs/ext2fs: ext2fs_vfsops.c
src/sys/ufs/ffs: ffs_vfsops.c
src/sys/ufs/ufs: ufs_vfsops.c
Added Files:
src/sys/modules/ufs: Makefile

Log Message:
Split the ufs code out of the ffs module and into its own module.

Adapt chfs and ext2fs modules accordingly.


To generate a diff of this commit:
cvs rdiff -u -r1.221 -r1.222 src/sys/modules/Makefile
cvs rdiff -u -r1.11 -r1.12 src/sys/modules/ffs/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/ufs/Makefile
cvs rdiff -u -r1.18 -r1.19 src/sys/ufs/chfs/chfs_vfsops.c
cvs rdiff -u -r1.213 -r1.214 src/sys/ufs/ext2fs/ext2fs_vfsops.c
cvs rdiff -u -r1.361 -r1.362 src/sys/ufs/ffs/ffs_vfsops.c
cvs rdiff -u -r1.56 -r1.57 src/sys/ufs/ufs/ufs_vfsops.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/modules/Makefile
diff -u src/sys/modules/Makefile:1.221 src/sys/modules/Makefile:1.222
--- src/sys/modules/Makefile:1.221	Tue Mar 26 00:36:14 2019
+++ src/sys/modules/Makefile	Thu Jun 20 03:31:29 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.221 2019/03/26 00:36:14 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.222 2019/06/20 03:31:29 pgoyette Exp $
 
 .include 
 
@@ -160,6 +160,7 @@ SUBDIR+=	tmpfs
 SUBDIR+=	ualea
 SUBDIR+=	uatp
 SUBDIR+=	udf
+SUBDIR+=	ufs
 SUBDIR+=	umap
 SUBDIR+=	union
 SUBDIR+=	usbverbose

Index: src/sys/modules/ffs/Makefile
diff -u src/sys/modules/ffs/Makefile:1.11 src/sys/modules/ffs/Makefile:1.12
--- src/sys/modules/ffs/Makefile:1.11	Mon Jun 17 03:32:14 2019
+++ src/sys/modules/ffs/Makefile	Thu Jun 20 03:31:29 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.11 2019/06/17 03:32:14 christos Exp $
+#	$NetBSD: Makefile,v 1.12 2019/06/20 03:31:29 pgoyette Exp $
 
 .include "../Makefile.inc"
 
@@ -9,12 +9,6 @@ CPPFLAGS+=  -DUFS_DIRHASH -DFFS_EI -
 
 CWARNFLAGS.clang=	-Wno-conversion
 
-.PATH:	${S}/ufs/ufs
-SRCS=	ufs_bmap.c ufs_dirhash.c ufs_extattr.c ufs_inode.c \
-	ufs_lookup.c ufs_quota.c ufs_quota1.c ufs_quota2.c ufs_rename.c \
-	ufs_vfsops.c ufs_vnops.c ufs_wapbl.c quota1_subr.c quota2_subr.c
-
-.PATH:	${S}/ufs/ffs
 SRCS+=	ffs_alloc.c ffs_balloc.c ffs_inode.c ffs_subr.c ffs_tables.c \
 	ffs_vfsops.c ffs_vnops.c ffs_snapshot.c \
 	ffs_bswap.c ffs_wapbl.c ffs_appleufs.c ffs_quota2.c

Index: src/sys/ufs/chfs/chfs_vfsops.c
diff -u src/sys/ufs/chfs/chfs_vfsops.c:1.18 src/sys/ufs/chfs/chfs_vfsops.c:1.19
--- src/sys/ufs/chfs/chfs_vfsops.c:1.18	Mon May 28 21:04:38 2018
+++ src/sys/ufs/chfs/chfs_vfsops.c	Thu Jun 20 03:31:30 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: chfs_vfsops.c,v 1.18 2018/05/28 21:04:38 chs Exp $	*/
+/*	$NetBSD: chfs_vfsops.c,v 1.19 2019/06/20 03:31:30 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2010 Department of Software Engineering,
@@ -62,8 +62,6 @@
 #include "chfs.h"
 #include "chfs_args.h"
 
-MODULE(MODULE_CLASS_VFS, chfs, "flash");
-
 /* - */
 /* functions */
 
@@ -827,6 +825,9 @@ struct vfsops chfs_vfsops = {
 };
 
 /* For using CHFS as a module. */
+
+MODULE(MODULE_CLASS_VFS, chfs, "ufs,flash");
+
 static int
 chfs_modcmd(modcmd_t cmd, void *arg)
 {

Index: src/sys/ufs/ext2fs/ext2fs_vfsops.c
diff -u src/sys/ufs/ext2fs/ext2fs_vfsops.c:1.213 src/sys/ufs/ext2fs/ext2fs_vfsops.c:1.214
--- src/sys/ufs/ext2fs/ext2fs_vfsops.c:1.213	Tue Jan  1 10:06:55 2019
+++ src/sys/ufs/ext2fs/ext2fs_vfsops.c	Thu Jun 20 03:31:30 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ext2fs_vfsops.c,v 1.213 2019/01/01 10:06:55 hannken Exp $	*/
+/*	$NetBSD: ext2fs_vfsops.c,v 1.214 2019/06/20 03:31:30 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1989, 1991, 1993, 1994
@@ -60,7 +60,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ext2fs_vfsops.c,v 1.213 2019/01/01 10:06:55 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ext2fs_vfsops.c,v 1.214 2019/06/20 03:31:30 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -100,7 +100,7 @@ __KERNEL_RCSID(0, "$NetBSD: ext2fs_vfsop
 #include 
 #include 
 
-MODULE(MODULE_CLASS_VFS, ext2fs, "ffs");
+MODULE(MODULE_CLASS_VFS, ext2fs, "ufs");
 
 int ext2fs_sbupdate(struct ufsmount *, int);
 static int ext2fs_sbfill(struct m_ext2fs *, int);

Index: src/sys/ufs/ffs/ffs_vfsops.c
diff -u src/sys/ufs/ffs/ffs_vfsops.c:1.361 src/sys/ufs/ffs/ffs_vfsops.c:1.362
--- src/sys/ufs/ffs/ffs_vfsops.c:1.361	Tue Jan  1 10:06:55 2019
+++ src/sys/ufs/ffs/ffs_vfsops.c	Thu Jun 20 03:31:30 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs_vfsops.c,v 1.361 2019/01/01 10:06:55 hannken Exp $	*/
+/*	$NetBSD: ffs_vfsops.c,v 1.362 2019/06/20 03:31:30 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.361 2019/01/01 10:06:55 hannken Exp $");

CVS commit: src

2019-06-19 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jun 20 03:31:54 UTC 2019

Modified Files:
src/lib/libc/sys: mknod.2
src/sys/compat/netbsd32: netbsd32_netbsd.c
src/sys/kern: vfs_syscalls.c
src/sys/sys: vfs_syscalls.h
src/tests/lib/libc/c063: t_mkfifoat.c
src/tests/lib/libc/sys: t_mkfifo.c

Log Message:
Add mkfifo{,at}(2) mode in mknod{,at}(2) as requested by POSIX

mknod with mode & S_IFIFO and dev=0 shall behave like mkfifo.

Update the documentation to reflect this state.

Add ATF tests.

This is an in-kernel implementation as typically user-space programs use
mkfifo(2) directly, however whenever there is need to bypass libc (like in
valgrind) then portable POSIX software calls the mknod syscall.

Noted on tech-kern@ by Greg Troxel.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/lib/libc/sys/mknod.2
cvs rdiff -u -r1.227 -r1.228 src/sys/compat/netbsd32/netbsd32_netbsd.c
cvs rdiff -u -r1.530 -r1.531 src/sys/kern/vfs_syscalls.c
cvs rdiff -u -r1.24 -r1.25 src/sys/sys/vfs_syscalls.h
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libc/c063/t_mkfifoat.c
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/sys/t_mkfifo.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/sys/mknod.2
diff -u src/lib/libc/sys/mknod.2:1.29 src/lib/libc/sys/mknod.2:1.30
--- src/lib/libc/sys/mknod.2:1.29	Mon Nov 20 17:03:31 2017
+++ src/lib/libc/sys/mknod.2	Thu Jun 20 03:31:54 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: mknod.2,v 1.29 2017/11/20 17:03:31 uwe Exp $
+.\"	$NetBSD: mknod.2,v 1.30 2019/06/20 03:31:54 kamil Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\" @(#)mknod.2	8.1 (Berkeley) 6/4/93
 .\"
-.Dd July 29, 2013
+.Dd June 20, 2019
 .Dt MKNOD 2
 .Os
 .Sh NAME
@@ -47,7 +47,28 @@
 .Ft int
 .Fn mknodat "int fd" "const char *path" "mode_t mode" "dev_t dev"
 .Sh DESCRIPTION
-The device special file
+.Nm
+with
+.Dv S_IFIFO
+specified in
+.Fa mode
+and 0 in
+.Fa dev
+makes a fifo file.
+This call is respectively a portable alias for
+.Xr mkfifo 2
+and
+.Xr mkfifoat 2 .
+.Pp
+.Nm
+with
+.Dv S_IFCHR
+or
+.Dv S_IFBLK
+in
+.Fa mode
+makes a device special file.
+The file
 .Fa path
 is created with the major and minor
 device numbers specified by
@@ -87,7 +108,7 @@ can be set to
 in order to specify the current directory.
 .Pp
 .Fn mknod
-requires super-user privileges.
+requires super-user privileges for creating device special files.
 .Sh RETURN VALUES
 .Rv -std mknod mknodat
 .Sh ERRORS
@@ -138,6 +159,8 @@ node is being created.
 A component of the path prefix is not a directory.
 .It Bq Er EPERM
 The process's effective user ID is not super-user.
+.It Bq Er EOPNOTSUPP
+The kernel has not been configured to support fifo's.
 .It Bq Er EROFS
 The named file resides on a read-only file system.
 .El
@@ -178,3 +201,10 @@ A
 .Fn mknod
 function call appeared in
 .At v6 .
+.Pp
+The alias mode for
+.Xr mkfifo 2
+and
+.Xr mkfifoat 2
+first appeared in
+.Nx 9 .

Index: src/sys/compat/netbsd32/netbsd32_netbsd.c
diff -u src/sys/compat/netbsd32/netbsd32_netbsd.c:1.227 src/sys/compat/netbsd32/netbsd32_netbsd.c:1.228
--- src/sys/compat/netbsd32/netbsd32_netbsd.c:1.227	Tue Jun 18 22:34:25 2019
+++ src/sys/compat/netbsd32/netbsd32_netbsd.c	Thu Jun 20 03:31:54 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_netbsd.c,v 1.227 2019/06/18 22:34:25 kamil Exp $	*/
+/*	$NetBSD: netbsd32_netbsd.c,v 1.228 2019/06/20 03:31:54 kamil Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001, 2008, 2018 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.227 2019/06/18 22:34:25 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.228 2019/06/20 03:31:54 kamil Exp $");
 
 /*
  * below are all the standard NetBSD system calls, in the 32bit
@@ -297,8 +297,8 @@ netbsd32___mknod50(struct lwp *l, const 
 		syscallarg(netbsd32_dev_t) dev;
 	} */
 
-	return do_sys_mknod(l, SCARG_P32(uap, path), SCARG(uap, mode),
-	SCARG(uap, dev), UIO_USERSPACE);
+	return do_posix_mknodat(l, AT_FDCWD, SCARG_P32(uap, path),
+	SCARG(uap, mode), SCARG(uap, dev));
 }
 
 int

Index: src/sys/kern/vfs_syscalls.c
diff -u src/sys/kern/vfs_syscalls.c:1.530 src/sys/kern/vfs_syscalls.c:1.531
--- src/sys/kern/vfs_syscalls.c:1.530	Wed Jun 19 14:16:06 2019
+++ src/sys/kern/vfs_syscalls.c	Thu Jun 20 03:31:54 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_syscalls.c,v 1.530 2019/06/19 14:16:06 kamil Exp $	*/
+/*	$NetBSD: vfs_syscalls.c,v 1.531 2019/06/20 03:31:54 kamil Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.530 2019/06/19 14:16:06 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.531 2019/06/20 03:31:54 kamil Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_fileassoc.h"
@@ -2151,6 

CVS commit: src/sys/ufs/ufs

2019-06-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 20 00:52:05 UTC 2019

Modified Files:
src/sys/ufs/ufs: ufs_readwrite.c

Log Message:
unifdef -ULFS_READWRITE ufs_readwrite.c


To generate a diff of this commit:
cvs rdiff -u -r1.123 -r1.124 src/sys/ufs/ufs/ufs_readwrite.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/ufs/ufs

2019-06-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 20 00:52:05 UTC 2019

Modified Files:
src/sys/ufs/ufs: ufs_readwrite.c

Log Message:
unifdef -ULFS_READWRITE ufs_readwrite.c


To generate a diff of this commit:
cvs rdiff -u -r1.123 -r1.124 src/sys/ufs/ufs/ufs_readwrite.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/ufs/ufs/ufs_readwrite.c
diff -u src/sys/ufs/ufs/ufs_readwrite.c:1.123 src/sys/ufs/ufs/ufs_readwrite.c:1.124
--- src/sys/ufs/ufs/ufs_readwrite.c:1.123	Mon Dec 10 15:48:34 2018
+++ src/sys/ufs/ufs/ufs_readwrite.c	Wed Jun 19 20:52:05 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ufs_readwrite.c,v 1.123 2018/12/10 20:48:34 jdolecek Exp $	*/
+/*	$NetBSD: ufs_readwrite.c,v 1.124 2019/06/20 00:52:05 christos Exp $	*/
 
 /*-
  * Copyright (c) 1993
@@ -32,28 +32,8 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: ufs_readwrite.c,v 1.123 2018/12/10 20:48:34 jdolecek Exp $");
+__KERNEL_RCSID(1, "$NetBSD: ufs_readwrite.c,v 1.124 2019/06/20 00:52:05 christos Exp $");
 
-#ifdef LFS_READWRITE
-#define	FS			struct lfs
-#define	I_FS			i_lfs
-#define	READ			lfs_read
-#define	READ_S			"lfs_read"
-#define	WRITE			lfs_write
-#define	WRITE_S			"lfs_write"
-#define	BUFRD			lfs_bufrd
-#define	BUFWR			lfs_bufwr
-#define	fs_bsize		lfs_bsize
-#define	fs_bmask		lfs_bmask
-#define	UFS_WAPBL_BEGIN(mp)	0
-#define	UFS_WAPBL_END(mp)	do { } while (0)
-#define	UFS_WAPBL_UPDATE(vp, access, modify, flags)	do { } while (0)
-#define ufs_blkoff		lfs_blkoff
-#define ufs_blksize		lfs_blksize
-#define ufs_lblkno		lfs_lblkno
-#define ufs_lblktosize		lfs_lblktosize
-#define ufs_blkroundup		lfs_blkroundup
-#else
 #define	FS			struct fs
 #define	I_FS			i_fs
 #define	READ			ffs_read
@@ -67,7 +47,6 @@ __KERNEL_RCSID(1, "$NetBSD: ufs_readwrit
 #define ufs_lblkno		ffs_lblkno
 #define ufs_lblktosize		ffs_lblktosize
 #define ufs_blkroundup		ffs_blkroundup
-#endif
 
 static int	ufs_post_read_update(struct vnode *, int, int);
 static int	ufs_post_write_update(struct vnode *, struct uio *, int,
@@ -106,20 +85,13 @@ READ(void *v)
 	/* XXX Eliminate me by refusing directory reads from userland.  */
 	if (vp->v_type == VDIR)
 		return BUFRD(vp, uio, ioflag, ap->a_cred);
-#ifdef LFS_READWRITE
-	/* XXX Eliminate me by using ufs_bufio in lfs.  */
-	if (vp->v_type == VREG && ip->i_number == LFS_IFILE_INUM)
-		return BUFRD(vp, uio, ioflag, ap->a_cred);
-#endif
 	if ((u_int64_t)uio->uio_offset > ump->um_maxfilesize)
 		return (EFBIG);
 	if (uio->uio_resid == 0)
 		return (0);
 
-#ifndef LFS_READWRITE
 	if ((ip->i_flags & (SF_SNAPSHOT | SF_SNAPINVAL)) == SF_SNAPSHOT)
 		return ffs_snapshot_read(vp, uio, ioflag);
-#endif /* !LFS_READWRITE */
 
 	if (uio->uio_offset >= ip->i_size)
 		goto out;
@@ -177,9 +149,7 @@ BUFRD(struct vnode *vp, struct uio *uio,
 	if (uio->uio_resid == 0)
 		return 0;
 
-#ifndef LFS_READWRITE
 	KASSERT(!ISSET(ip->i_flags, (SF_SNAPSHOT | SF_SNAPINVAL)));
-#endif
 
 	if (uio->uio_offset >= ip->i_size)
 		goto out;
@@ -302,12 +272,6 @@ WRITE(void *v)
 	if (uio->uio_offset < 0 ||
 	(u_int64_t)uio->uio_offset + uio->uio_resid > ump->um_maxfilesize)
 		return (EFBIG);
-#ifdef LFS_READWRITE
-	/* Disallow writes to the Ifile, even if noschg flag is removed */
-	/* XXX can this go away when the Ifile is no longer in the namespace? */
-	if (vp == fs->lfs_ivnode)
-		return (EPERM);
-#endif
 	if (uio->uio_resid == 0)
 		return (0);
 
@@ -352,11 +316,6 @@ WRITE(void *v)
 		return error;
 	}
 
-#ifdef LFS_READWRITE
-	async = true;
-	lfs_availwait(fs, btofsb(fs, uio->uio_resid));
-	lfs_check(vp, LFS_UNUSED_LBN, 0);
-#endif /* !LFS_READWRITE */
 
 	preallocoff = round_page(ufs_blkroundup(fs, MAX(osize, uio->uio_offset)));
 	aflag = ioflag & IO_SYNC ? B_SYNC : 0;
@@ -471,7 +430,6 @@ WRITE(void *v)
 		 * XXXUBC simplistic async flushing.
 		 */
 
-#ifndef LFS_READWRITE
 		if (!async && oldoff >> 16 != uio->uio_offset >> 16) {
 			mutex_enter(vp->v_interlock);
 			error = VOP_PUTPAGES(vp, (oldoff >> 16) << 16,
@@ -480,7 +438,6 @@ WRITE(void *v)
 			if (error)
 break;
 		}
-#endif
 	}
 	if (error == 0 && ioflag & IO_SYNC) {
 		mutex_enter(vp->v_interlock);
@@ -513,9 +470,6 @@ BUFWR(struct vnode *vp, struct uio *uio,
 	daddr_t lbn;
 	int extended=0;
 	int error;
-#ifdef LFS_READWRITE
-	bool need_unreserve = false;
-#endif
 
 	KASSERT(ISSET(ioflag, IO_NODELOCKED));
 	KASSERT(VOP_ISLOCKED(vp) == LK_EXCLUSIVE);
@@ -535,9 +489,6 @@ BUFWR(struct vnode *vp, struct uio *uio,
 	uio->uio_resid > ump->um_maxfilesize ||
 	uio->uio_offset > (ump->um_maxfilesize - uio->uio_resid))
 		return EFBIG;
-#ifdef LFS_READWRITE
-	KASSERT(vp != fs->lfs_ivnode);
-#endif
 	if (uio->uio_resid == 0)
 		return 0;
 
@@ -548,10 +499,6 @@ BUFWR(struct vnode *vp, struct uio *uio,
 
 	KASSERT(vp->v_type != VREG);
 
-#ifdef LFS_READWRITE
-	lfs_availwait(fs, btofsb(fs, uio->uio_resid));
-	lfs_check(vp, LFS_UNUSED_LBN, 0);
-#endif /* !LFS_READWRITE */
 
 	/* XXX 

CVS commit: src/sys/ufs/lfs

2019-06-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 20 00:49:12 UTC 2019

Modified Files:
src/sys/ufs/lfs: lfs_vnops.c ulfs_readwrite.c

Log Message:
unifdef -DLFS_READWRITE ulfs_readwrite.c


To generate a diff of this commit:
cvs rdiff -u -r1.323 -r1.324 src/sys/ufs/lfs/lfs_vnops.c
cvs rdiff -u -r1.24 -r1.25 src/sys/ufs/lfs/ulfs_readwrite.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/ufs/lfs/lfs_vnops.c
diff -u src/sys/ufs/lfs/lfs_vnops.c:1.323 src/sys/ufs/lfs/lfs_vnops.c:1.324
--- src/sys/ufs/lfs/lfs_vnops.c:1.323	Tue Jan  1 05:06:55 2019
+++ src/sys/ufs/lfs/lfs_vnops.c	Wed Jun 19 20:49:11 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_vnops.c,v 1.323 2019/01/01 10:06:55 hannken Exp $	*/
+/*	$NetBSD: lfs_vnops.c,v 1.324 2019/06/20 00:49:11 christos Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -125,7 +125,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.323 2019/01/01 10:06:55 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.324 2019/06/20 00:49:11 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -350,9 +350,7 @@ const struct vnodeopv_entry_desc lfs_fif
 const struct vnodeopv_desc lfs_fifoop_opv_desc =
 	{ _fifoop_p, lfs_fifoop_entries };
 
-#define	LFS_READWRITE
 #include 
-#undef	LFS_READWRITE
 
 /*
  * Allocate a new inode.

Index: src/sys/ufs/lfs/ulfs_readwrite.c
diff -u src/sys/ufs/lfs/ulfs_readwrite.c:1.24 src/sys/ufs/lfs/ulfs_readwrite.c:1.25
--- src/sys/ufs/lfs/ulfs_readwrite.c:1.24	Sat Jun 10 01:29:36 2017
+++ src/sys/ufs/lfs/ulfs_readwrite.c	Wed Jun 19 20:49:11 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ulfs_readwrite.c,v 1.24 2017/06/10 05:29:36 maya Exp $	*/
+/*	$NetBSD: ulfs_readwrite.c,v 1.25 2019/06/20 00:49:11 christos Exp $	*/
 /*  from NetBSD: ufs_readwrite.c,v 1.120 2015/04/12 22:48:38 riastradh Exp  */
 
 /*-
@@ -33,9 +33,8 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: ulfs_readwrite.c,v 1.24 2017/06/10 05:29:36 maya Exp $");
+__KERNEL_RCSID(1, "$NetBSD: ulfs_readwrite.c,v 1.25 2019/06/20 00:49:11 christos Exp $");
 
-#ifdef LFS_READWRITE
 #define	FS			struct lfs
 #define	I_FS			i_lfs
 #define	READ			lfs_read
@@ -46,17 +45,6 @@ __KERNEL_RCSID(1, "$NetBSD: ulfs_readwri
 #define	BUFWR			lfs_bufwr
 #define	fs_sb_getbsize(fs)	lfs_sb_getbsize(fs)
 #define	fs_bmask		lfs_bmask
-#else
-#define	FS			struct fs
-#define	I_FS			i_fs
-#define	READ			ffs_read
-#define	READ_S			"ffs_read"
-#define	WRITE			ffs_write
-#define	WRITE_S			"ffs_write"
-#define	BUFRD			ffs_bufrd
-#define	BUFWR			ffs_bufwr
-#define fs_sb_getbsize(fs)	(fs)->fs_bsize
-#endif
 
 static int	ulfs_post_read_update(struct vnode *, int, int);
 static int	ulfs_post_write_update(struct vnode *, struct uio *, int,
@@ -95,20 +83,14 @@ READ(void *v)
 	/* XXX Eliminate me by refusing directory reads from userland.  */
 	if (vp->v_type == VDIR)
 		return BUFRD(vp, uio, ioflag, ap->a_cred);
-#ifdef LFS_READWRITE
 	/* XXX Eliminate me by using ufs_bufio in lfs.  */
 	if (vp->v_type == VREG && ip->i_number == LFS_IFILE_INUM)
 		return BUFRD(vp, uio, ioflag, ap->a_cred);
-#endif
 	if ((u_int64_t)uio->uio_offset > fs->um_maxfilesize)
 		return (EFBIG);
 	if (uio->uio_resid == 0)
 		return (0);
 
-#ifndef LFS_READWRITE
-	if ((ip->i_flags & (SF_SNAPSHOT | SF_SNAPINVAL)) == SF_SNAPSHOT)
-		return ffs_snapshot_read(vp, uio, ioflag);
-#endif /* !LFS_READWRITE */
 
 	if (uio->uio_offset >= ip->i_size)
 		goto out;
@@ -167,9 +149,6 @@ BUFRD(struct vnode *vp, struct uio *uio,
 	if (uio->uio_resid == 0)
 		return 0;
 
-#ifndef LFS_READWRITE
-	KASSERT(!ISSET(ip->i_flags, (SF_SNAPSHOT | SF_SNAPINVAL)));
-#endif
 
 	if (uio->uio_offset >= ip->i_size)
 		goto out;
@@ -283,12 +262,10 @@ WRITE(void *v)
 	if (uio->uio_offset < 0 ||
 	(u_int64_t)uio->uio_offset + uio->uio_resid > fs->um_maxfilesize)
 		return (EFBIG);
-#ifdef LFS_READWRITE
 	/* Disallow writes to the Ifile, even if noschg flag is removed */
 	/* XXX can this go away when the Ifile is no longer in the namespace? */
 	if (vp == fs->lfs_ivnode)
 		return (EPERM);
-#endif
 	if (uio->uio_resid == 0)
 		return (0);
 
@@ -301,11 +278,9 @@ WRITE(void *v)
 
 	KASSERT(vp->v_type == VREG);
 
-#ifdef LFS_READWRITE
 	async = true;
 	lfs_availwait(fs, lfs_btofsb(fs, uio->uio_resid));
 	lfs_check(vp, LFS_UNUSED_LBN, 0);
-#endif /* !LFS_READWRITE */
 
 	preallocoff = round_page(lfs_blkroundup(fs, MAX(osize, uio->uio_offset)));
 	aflag = ioflag & IO_SYNC ? B_SYNC : 0;
@@ -420,18 +395,7 @@ WRITE(void *v)
 		 * XXXUBC simplistic async flushing.
 		 */
 
-#ifndef LFS_READWRITE
-		if (!async && oldoff >> 16 != uio->uio_offset >> 16) {
-			mutex_enter(vp->v_interlock);
-			error = VOP_PUTPAGES(vp, (oldoff >> 16) << 16,
-			(uio->uio_offset >> 16) << 16,
-			PGO_CLEANIT | PGO_LAZY);
-			if (error)
-break;
-		}
-#else
 		__USE(async);
-#endif
 	}
 	if (error == 0 && ioflag & IO_SYNC) {

CVS commit: src/sys/ufs/lfs

2019-06-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 20 00:49:12 UTC 2019

Modified Files:
src/sys/ufs/lfs: lfs_vnops.c ulfs_readwrite.c

Log Message:
unifdef -DLFS_READWRITE ulfs_readwrite.c


To generate a diff of this commit:
cvs rdiff -u -r1.323 -r1.324 src/sys/ufs/lfs/lfs_vnops.c
cvs rdiff -u -r1.24 -r1.25 src/sys/ufs/lfs/ulfs_readwrite.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/msgc

2019-06-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 20 00:45:18 UTC 2019

Modified Files:
src/usr.bin/msgc: msg_sys.def msgdb.c

Log Message:
Introduce _fmt_ flavors of the menu functions that take a formatting string
so we can use fmtcheck(3) to check the formats of the messages strings.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/usr.bin/msgc/msg_sys.def
cvs rdiff -u -r1.23 -r1.24 src/usr.bin/msgc/msgdb.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/msgc

2019-06-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 20 00:45:18 UTC 2019

Modified Files:
src/usr.bin/msgc: msg_sys.def msgdb.c

Log Message:
Introduce _fmt_ flavors of the menu functions that take a formatting string
so we can use fmtcheck(3) to check the formats of the messages strings.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/usr.bin/msgc/msg_sys.def
cvs rdiff -u -r1.23 -r1.24 src/usr.bin/msgc/msgdb.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/msgc/msg_sys.def
diff -u src/usr.bin/msgc/msg_sys.def:1.44 src/usr.bin/msgc/msg_sys.def:1.45
--- src/usr.bin/msgc/msg_sys.def:1.44	Fri Mar  1 12:02:21 2019
+++ src/usr.bin/msgc/msg_sys.def	Wed Jun 19 20:45:18 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg_sys.def,v 1.44 2019/03/01 17:02:21 martin Exp $	*/
+/*	$NetBSD: msg_sys.def,v 1.45 2019/06/20 00:45:18 christos Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -158,7 +158,7 @@ msg_standend(void)
 	wstandend(msg_win);
 }
 
-static int
+static int __printflike(2, 0)
 _msg_vprintf(int auto_fill, const char *fmt, va_list ap)
 {
 	const char *wstart, *afterw;
@@ -285,28 +285,42 @@ out:
 }
 
 void
-msg_display(msg msg_no, ...)
+msg_display(msg msg_no)
+{
+
+	msg_printf("%s", msg_string(msg_no));
+}
+
+void __printflike(2, 3)
+msg_fmt_display(msg msg_no, const char *fmt, ...)
 {
 	va_list ap;
 
 	msg_clear();
 
-	va_start(ap, msg_no);
-	(void)_msg_vprintf(1, msg_string(msg_no), ap);
+	va_start(ap, fmt);
+	(void)_msg_vprintf(1, fmtcheck(msg_string(msg_no), fmt), ap);
 	va_end(ap);
 }
 
 void
-msg_display_add(msg msg_no, ...)
+msg_display_add(msg msg_no)
+{
+
+	msg_printf("%s", msg_string(msg_no));
+}
+
+void __printflike(2, 3)
+msg_fmt_display_add(msg msg_no, const char *fmt, ...)
 {
 	va_list ap;
 
-	va_start(ap, msg_no);
-	(void)_msg_vprintf(1, msg_string(msg_no), ap);
+	va_start(ap, fmt);
+	(void)_msg_vprintf(1, fmtcheck(msg_string(msg_no), fmt), ap);
 	va_end(ap);
 }
 
-void
+void __printflike(1, 2)
 msg_printf(const char *fmt, ...)
 {
 	va_list ap;
@@ -316,7 +330,7 @@ msg_printf(const char *fmt, ...)
 	va_end(ap);
 }
 
-static void
+static void __printflike(1, 0)
 _msg_vprompt(const char *fmt, int flags, const char *def, char *val,
 size_t val_buf_len, va_list ap)
 {
@@ -469,21 +483,36 @@ _msg_vprompt(const char *fmt, int flags,
 }
 
 void
-msg_prompt(msg msg_no, const char *def, char *val, size_t val_buf_len, ...)
+msg_prompt(msg msg_no, const char *def, char *val, size_t val_buf_len)
+{
+
+	msg_fmt_prompt(msg_no, def, val, val_buf_len, "");
+}
+
+void __printflike(5, 6)
+msg_fmt_prompt(msg msg_no, const char *def, char *val, size_t val_buf_len,
+const char *fmt, ...)
 {
 	va_list ap;
 
 	msg_clear();
 
-	va_start(ap, val_buf_len);
-	_msg_vprompt(msg_string(msg_no), MSG_PROMPT_ECHO,
+	va_start(ap, fmt);
+	_msg_vprompt(fmtcheck(msg_string(msg_no), fmt), MSG_PROMPT_ECHO,
 		def, val, val_buf_len, ap);
 	va_end(ap);
 }
 
 void
 msg_prompt_win(msg msg_no, int x, int y, int w, int h,
-	const char *def, char *val, size_t val_buf_len, ...)
+const char *def, char *val, size_t val_buf_len)
+{
+msg_fmt_prompt_win(msg_no, x, y, w, h, def, val, val_buf_len, "");
+}
+
+void __printflike(9, 10)
+msg_fmt_prompt_win(msg msg_no, int x, int y, int w, int h,
+const char *def, char *val, size_t val_buf_len, const char *fmt, ...)
 {
 	va_list ap;
 	WINDOW *win;
@@ -495,10 +524,10 @@ msg_prompt_win(msg msg_no, int x, int y,
 	maxx = getmaxx(msg_win);
 	maxy = getmaxy(msg_win);
 	if (w == 0) {
-		va_start(ap, val_buf_len);
-		w = vsnprintf(NULL, 0, msg_string(msg_no), ap);
+		va_start(ap, fmt);
+		w = vsnprintf(NULL, 0, fmtcheck(msg_string(msg_no), fmt), ap);
 		va_end(ap);
-		if (def != NULL && *def != 0 && w + (int)val_buf_len * 2 < maxx) {
+		if (def != NULL && *def != 0 && w + (int)val_buf_len * 2 < maxx) 		{
 			w += 2 + strlen(def) + 1;
 			msg_flags &= ~MSG_PROMPT_HIDE_DFLT;
 		}
@@ -561,7 +590,7 @@ msg_prompt_win(msg msg_no, int x, int y,
 		msg_clear();
 	}
 
-	va_start(ap, val_buf_len);
+	va_start(ap, fmt);
 	_msg_vprompt(msg_string(msg_no), msg_flags, def, val, val_buf_len, ap);
 	va_end(ap);
 
@@ -579,35 +608,59 @@ msg_prompt_win(msg msg_no, int x, int y,
 	}
 }
 
-void
-msg_prompt_add(msg msg_no, const char *def, char *val, size_t val_buf_len, ...)
+void 
+msg_prompt_add(msg msg_no, const char *def, char *val, size_t val_buf_len)
+{
+
+	msg_fmt_prompt_add(msg_no, def, val, val_buf_len, "");
+}
+
+void __printflike(5, 6)
+msg_fmt_prompt_add(msg msg_no, const char *def, char *val, size_t val_buf_len,
+const char *fmt, ...)
 {
 	va_list ap;
 
-	va_start(ap, val_buf_len);
-	_msg_vprompt(msg_string(msg_no), MSG_PROMPT_ECHO, def, val, val_buf_len, ap);
+	va_start(ap, fmt);
+	_msg_vprompt(fmtcheck(msg_string(msg_no), fmt), MSG_PROMPT_ECHO, def,
+	val, val_buf_len, ap);
 	va_end(ap);
 }
 
 void
-msg_prompt_noecho(msg msg_no, const 

CVS commit: src/usr.sbin/sysinst

2019-06-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 20 00:43:58 UTC 2019

Modified Files:
src/usr.sbin/sysinst: bsddisklabel.c configmenu.c disks.c install.c
mbr.c menus.mi net.c part_edit.c partman.c run.c upgrade.c util.c
src/usr.sbin/sysinst/arch/alpha: md.c
src/usr.sbin/sysinst/arch/amiga: md.c
src/usr.sbin/sysinst/arch/arc: md.c
src/usr.sbin/sysinst/arch/atari: md.c
src/usr.sbin/sysinst/arch/cobalt: md.c
src/usr.sbin/sysinst/arch/emips: md.c
src/usr.sbin/sysinst/arch/hp300: md.c
src/usr.sbin/sysinst/arch/hppa: md.c
src/usr.sbin/sysinst/arch/i386: md.c menus.md
src/usr.sbin/sysinst/arch/landisk: md.c
src/usr.sbin/sysinst/arch/luna68k: md.c
src/usr.sbin/sysinst/arch/mac68k: md.c menus.md.de menus.md.en
menus.md.es menus.md.pl
src/usr.sbin/sysinst/arch/macppc: md.c
src/usr.sbin/sysinst/arch/mipsco: md.c
src/usr.sbin/sysinst/arch/mvme68k: md.c
src/usr.sbin/sysinst/arch/news68k: md.c
src/usr.sbin/sysinst/arch/newsmips: md.c
src/usr.sbin/sysinst/arch/ofppc: md.c
src/usr.sbin/sysinst/arch/playstation2: md.c
src/usr.sbin/sysinst/arch/pmax: md.c
src/usr.sbin/sysinst/arch/prep: md.c
src/usr.sbin/sysinst/arch/shark: md.c
src/usr.sbin/sysinst/arch/sparc: md.c
src/usr.sbin/sysinst/arch/sparc64: md.c
src/usr.sbin/sysinst/arch/vax: md.c
src/usr.sbin/sysinst/arch/x68k: md.c

Log Message:
Use _fmt_ msg_ methods when formats are needed.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/sysinst/bsddisklabel.c
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/sysinst/configmenu.c
cvs rdiff -u -r1.32 -r1.33 src/usr.sbin/sysinst/disks.c
cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/sysinst/install.c \
src/usr.sbin/sysinst/upgrade.c
cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/sysinst/mbr.c
cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/sysinst/menus.mi
cvs rdiff -u -r1.28 -r1.29 src/usr.sbin/sysinst/net.c
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/sysinst/part_edit.c
cvs rdiff -u -r1.33 -r1.34 src/usr.sbin/sysinst/partman.c
cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/sysinst/run.c
cvs rdiff -u -r1.23 -r1.24 src/usr.sbin/sysinst/util.c
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/sysinst/arch/alpha/md.c
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/sysinst/arch/amiga/md.c
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/sysinst/arch/arc/md.c
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/sysinst/arch/atari/md.c
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/sysinst/arch/cobalt/md.c
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/sysinst/arch/emips/md.c
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/sysinst/arch/hp300/md.c
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/sysinst/arch/hppa/md.c
cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/sysinst/arch/i386/md.c
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/arch/i386/menus.md
cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/sysinst/arch/landisk/md.c
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/sysinst/arch/luna68k/md.c
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/sysinst/arch/mac68k/md.c
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/sysinst/arch/mac68k/menus.md.de \
src/usr.sbin/sysinst/arch/mac68k/menus.md.en \
src/usr.sbin/sysinst/arch/mac68k/menus.md.es \
src/usr.sbin/sysinst/arch/mac68k/menus.md.pl
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/sysinst/arch/macppc/md.c
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/sysinst/arch/mipsco/md.c
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/sysinst/arch/mvme68k/md.c
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/sysinst/arch/news68k/md.c
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/sysinst/arch/newsmips/md.c
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/sysinst/arch/ofppc/md.c
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/sysinst/arch/playstation2/md.c
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/sysinst/arch/pmax/md.c
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/sysinst/arch/prep/md.c
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/sysinst/arch/shark/md.c
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/sysinst/arch/sparc/md.c
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/sysinst/arch/sparc64/md.c
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/sysinst/arch/vax/md.c
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/sysinst/arch/x68k/md.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.sbin/sysinst

2019-06-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 20 00:43:58 UTC 2019

Modified Files:
src/usr.sbin/sysinst: bsddisklabel.c configmenu.c disks.c install.c
mbr.c menus.mi net.c part_edit.c partman.c run.c upgrade.c util.c
src/usr.sbin/sysinst/arch/alpha: md.c
src/usr.sbin/sysinst/arch/amiga: md.c
src/usr.sbin/sysinst/arch/arc: md.c
src/usr.sbin/sysinst/arch/atari: md.c
src/usr.sbin/sysinst/arch/cobalt: md.c
src/usr.sbin/sysinst/arch/emips: md.c
src/usr.sbin/sysinst/arch/hp300: md.c
src/usr.sbin/sysinst/arch/hppa: md.c
src/usr.sbin/sysinst/arch/i386: md.c menus.md
src/usr.sbin/sysinst/arch/landisk: md.c
src/usr.sbin/sysinst/arch/luna68k: md.c
src/usr.sbin/sysinst/arch/mac68k: md.c menus.md.de menus.md.en
menus.md.es menus.md.pl
src/usr.sbin/sysinst/arch/macppc: md.c
src/usr.sbin/sysinst/arch/mipsco: md.c
src/usr.sbin/sysinst/arch/mvme68k: md.c
src/usr.sbin/sysinst/arch/news68k: md.c
src/usr.sbin/sysinst/arch/newsmips: md.c
src/usr.sbin/sysinst/arch/ofppc: md.c
src/usr.sbin/sysinst/arch/playstation2: md.c
src/usr.sbin/sysinst/arch/pmax: md.c
src/usr.sbin/sysinst/arch/prep: md.c
src/usr.sbin/sysinst/arch/shark: md.c
src/usr.sbin/sysinst/arch/sparc: md.c
src/usr.sbin/sysinst/arch/sparc64: md.c
src/usr.sbin/sysinst/arch/vax: md.c
src/usr.sbin/sysinst/arch/x68k: md.c

Log Message:
Use _fmt_ msg_ methods when formats are needed.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/sysinst/bsddisklabel.c
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/sysinst/configmenu.c
cvs rdiff -u -r1.32 -r1.33 src/usr.sbin/sysinst/disks.c
cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/sysinst/install.c \
src/usr.sbin/sysinst/upgrade.c
cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/sysinst/mbr.c
cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/sysinst/menus.mi
cvs rdiff -u -r1.28 -r1.29 src/usr.sbin/sysinst/net.c
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/sysinst/part_edit.c
cvs rdiff -u -r1.33 -r1.34 src/usr.sbin/sysinst/partman.c
cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/sysinst/run.c
cvs rdiff -u -r1.23 -r1.24 src/usr.sbin/sysinst/util.c
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/sysinst/arch/alpha/md.c
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/sysinst/arch/amiga/md.c
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/sysinst/arch/arc/md.c
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/sysinst/arch/atari/md.c
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/sysinst/arch/cobalt/md.c
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/sysinst/arch/emips/md.c
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/sysinst/arch/hp300/md.c
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/sysinst/arch/hppa/md.c
cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/sysinst/arch/i386/md.c
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/arch/i386/menus.md
cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/sysinst/arch/landisk/md.c
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/sysinst/arch/luna68k/md.c
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/sysinst/arch/mac68k/md.c
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/sysinst/arch/mac68k/menus.md.de \
src/usr.sbin/sysinst/arch/mac68k/menus.md.en \
src/usr.sbin/sysinst/arch/mac68k/menus.md.es \
src/usr.sbin/sysinst/arch/mac68k/menus.md.pl
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/sysinst/arch/macppc/md.c
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/sysinst/arch/mipsco/md.c
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/sysinst/arch/mvme68k/md.c
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/sysinst/arch/news68k/md.c
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/sysinst/arch/newsmips/md.c
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/sysinst/arch/ofppc/md.c
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/sysinst/arch/playstation2/md.c
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/sysinst/arch/pmax/md.c
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/sysinst/arch/prep/md.c
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/sysinst/arch/shark/md.c
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/sysinst/arch/sparc/md.c
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/sysinst/arch/sparc64/md.c
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/sysinst/arch/vax/md.c
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/sysinst/arch/x68k/md.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.sbin/sysinst/bsddisklabel.c
diff -u src/usr.sbin/sysinst/bsddisklabel.c:1.12 src/usr.sbin/sysinst/bsddisklabel.c:1.13
--- src/usr.sbin/sysinst/bsddisklabel.c:1.12	Sat Jun 15 04:20:33 2019
+++ src/usr.sbin/sysinst/bsddisklabel.c	Wed Jun 19 20:43:55 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: bsddisklabel.c,v 1.12 2019/06/15 08:20:33 martin Exp $	*/
+/*	$NetBSD: bsddisklabel.c,v 1.13 2019/06/20 00:43:55 christos Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -524,9 +524,8 @@ set_ptn_size(menudesc *m, void *arg)
 	size, p->flags & PUIFLAG_EXTEND ? "+" : "");
 
 	for (;;) {
-		msg_prompt_win(MSG_askfssize, -1, 18, 

CVS commit: src/tools/compat

2019-06-19 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Jun 19 23:35:55 UTC 2019

Modified Files:
src/tools/compat: configure nbtool_config.h.in

Log Message:
regen tools/compat


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/tools/compat/configure
cvs rdiff -u -r1.50 -r1.51 src/tools/compat/nbtool_config.h.in

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tools/compat/configure
diff -u src/tools/compat/configure:1.94 src/tools/compat/configure:1.95
--- src/tools/compat/configure:1.94	Wed Jun 19 03:40:15 2019
+++ src/tools/compat/configure	Wed Jun 19 23:35:55 2019
@@ -4228,6 +4228,43 @@ _ACEOF
 
 fi
 
+ac_fn_c_check_type "$LINENO" "uchar_t" "ac_cv_type_uchar_t" "$ac_includes_default"
+if test "x$ac_cv_type_uchar_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_UCHAR_T 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_type "$LINENO" "ushort_t" "ac_cv_type_ushort_t" "$ac_includes_default"
+if test "x$ac_cv_type_ushort_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_USHORT_T 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_type "$LINENO" "uint_t" "ac_cv_type_uint_t" "$ac_includes_default"
+if test "x$ac_cv_type_uint_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_UINT_T 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_type "$LINENO" "ulong_t" "ac_cv_type_ulong_t" "$ac_includes_default"
+if test "x$ac_cv_type_ulong_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_ULONG_T 1
+_ACEOF
+
+
+fi
+
 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include 
 #ifdef HAVE_RPC_TYPES_H
 #include 

Index: src/tools/compat/nbtool_config.h.in
diff -u src/tools/compat/nbtool_config.h.in:1.50 src/tools/compat/nbtool_config.h.in:1.51
--- src/tools/compat/nbtool_config.h.in:1.50	Wed Jun 19 03:40:15 2019
+++ src/tools/compat/nbtool_config.h.in	Wed Jun 19 23:35:55 2019
@@ -1,6 +1,6 @@
 /* nbtool_config.h.in.  Generated from configure.ac by autoheader.  */
 
-/*  $NetBSD: nbtool_config.h.in,v 1.50 2019/06/19 03:40:15 kamil Exp $*/
+/*  $NetBSD: nbtool_config.h.in,v 1.51 2019/06/19 23:35:55 kamil Exp $*/
  
 #ifndef __NETBSD_NBTOOL_CONFIG_H__
 #define __NETBSD_NBTOOL_CONFIG_H__
@@ -786,15 +786,27 @@
 /* Define to 1 if you have the  header file. */
 #undef HAVE_TERMIOS_H
 
+/* Define to 1 if the system has the type `uchar_t'. */
+#undef HAVE_UCHAR_T
+
 /* Define to 1 if you have the `uid_from_user' function. */
 #undef HAVE_UID_FROM_USER
 
+/* Define to 1 if the system has the type `uint_t'. */
+#undef HAVE_UINT_T
+
+/* Define to 1 if the system has the type `ulong_t'. */
+#undef HAVE_ULONG_T
+
 /* Define to 1 if you have the  header file. */
 #undef HAVE_UNISTD_H
 
 /* Define to 1 if you have the `user_from_uid' function. */
 #undef HAVE_USER_FROM_UID
 
+/* Define to 1 if the system has the type `ushort_t'. */
+#undef HAVE_USHORT_T
+
 /* Define to 1 if you have the  header file. */
 #undef HAVE_UTIL_H
 



CVS commit: src/tools/compat

2019-06-19 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Jun 19 23:35:55 UTC 2019

Modified Files:
src/tools/compat: configure nbtool_config.h.in

Log Message:
regen tools/compat


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/tools/compat/configure
cvs rdiff -u -r1.50 -r1.51 src/tools/compat/nbtool_config.h.in

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tools/compat

2019-06-19 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Jun 19 23:33:07 UTC 2019

Modified Files:
src/tools/compat: compat_defs.h configure.ac

Log Message:
Add more SunOS types to tools/compat

Add fallback defintions of: uchar_t, ushort_t, uint_t, ulong_t.

Needed by the libctf code on Ubuntu 16.x.


To generate a diff of this commit:
cvs rdiff -u -r1.115 -r1.116 src/tools/compat/compat_defs.h
cvs rdiff -u -r1.95 -r1.96 src/tools/compat/configure.ac

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tools/compat

2019-06-19 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Jun 19 23:33:07 UTC 2019

Modified Files:
src/tools/compat: compat_defs.h configure.ac

Log Message:
Add more SunOS types to tools/compat

Add fallback defintions of: uchar_t, ushort_t, uint_t, ulong_t.

Needed by the libctf code on Ubuntu 16.x.


To generate a diff of this commit:
cvs rdiff -u -r1.115 -r1.116 src/tools/compat/compat_defs.h
cvs rdiff -u -r1.95 -r1.96 src/tools/compat/configure.ac

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tools/compat/compat_defs.h
diff -u src/tools/compat/compat_defs.h:1.115 src/tools/compat/compat_defs.h:1.116
--- src/tools/compat/compat_defs.h:1.115	Wed Jun 19 03:40:15 2019
+++ src/tools/compat/compat_defs.h	Wed Jun 19 23:33:07 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_defs.h,v 1.115 2019/06/19 03:40:15 kamil Exp $	*/
+/*	$NetBSD: compat_defs.h,v 1.116 2019/06/19 23:33:07 kamil Exp $	*/
 
 #ifndef	__NETBSD_COMPAT_DEFS_H__
 #define	__NETBSD_COMPAT_DEFS_H__
@@ -79,6 +79,22 @@ typedef unsigned int u_int;
 typedef unsigned short u_short;
 #endif
 
+#if !HAVE_UCHAR_T
+typedef unsigned char uchar_t;
+#endif
+
+#if !HAVE_USHORT_T
+typedef unsigned short ushort_t;
+#endif
+
+#if !HAVE_UINT_T
+typedef unsigned int uint_t;
+#endif
+
+#if !HAVE_ULONG_T
+typedef unsigned long ulong_t;
+#endif
+
 /* System headers needed for (re)definitions below. */
 
 #include 

Index: src/tools/compat/configure.ac
diff -u src/tools/compat/configure.ac:1.95 src/tools/compat/configure.ac:1.96
--- src/tools/compat/configure.ac:1.95	Wed Jun 19 03:40:15 2019
+++ src/tools/compat/configure.ac	Wed Jun 19 23:33:07 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: configure.ac,v 1.95 2019/06/19 03:40:15 kamil Exp $
+#	$NetBSD: configure.ac,v 1.96 2019/06/19 23:33:07 kamil Exp $
 #
 # Autoconf definition file for libnbcompat.
 #
@@ -98,6 +98,7 @@ AC_CHECK_HEADERS(rpc/types.h netconfig.h
 # Typedefs.
 AC_TYPE_SIZE_T
 AC_CHECK_TYPES([id_t, long long, u_long, u_char, u_short, u_int, u_quad_t])
+AC_CHECK_TYPES([uchar_t, ushort_t, uint_t, ulong_t])
 AC_CHECK_TYPE(socklen_t, [AC_DEFINE([HAVE_SOCKLEN_T], 1,
 			  [Define if you have the socklen_t type.])],,
 [#include 



CVS commit: src/sys/sys

2019-06-19 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Jun 19 21:39:53 UTC 2019

Modified Files:
src/sys/sys: lwp.h

Log Message:
Add an explicit node that lwp status numbers are set in stone

Requested by 


To generate a diff of this commit:
cvs rdiff -u -r1.185 -r1.186 src/sys/sys/lwp.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/lwp.h
diff -u src/sys/sys/lwp.h:1.185 src/sys/sys/lwp.h:1.186
--- src/sys/sys/lwp.h:1.185	Tue Jun 18 22:40:09 2019
+++ src/sys/sys/lwp.h	Wed Jun 19 21:39:53 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: lwp.h,v 1.185 2019/06/18 22:40:09 kamil Exp $	*/
+/*	$NetBSD: lwp.h,v 1.186 2019/06/19 21:39:53 kamil Exp $	*/
 
 /*
  * Copyright (c) 2001, 2006, 2007, 2008, 2009, 2010
@@ -281,6 +281,8 @@ extern int		maxlwp __read_mostly;	/* max
  * runnable but *not* yet running, i.e. is on a run queue.  LSONPROC
  * indicates that the process is actually executing on a CPU, i.e.
  * it is no longer on a run queue.
+ *
+ * These values are set in stone and must not be reused with future changes.
  */
 #define	LSIDL		1	/* Process being created by fork. */
 #define	LSRUN		2	/* Currently runnable. */



CVS commit: src/sys/sys

2019-06-19 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Jun 19 21:39:53 UTC 2019

Modified Files:
src/sys/sys: lwp.h

Log Message:
Add an explicit node that lwp status numbers are set in stone

Requested by 


To generate a diff of this commit:
cvs rdiff -u -r1.185 -r1.186 src/sys/sys/lwp.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/bin/ps

2019-06-19 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Jun 19 21:25:51 UTC 2019

Modified Files:
src/bin/ps: print.c

Log Message:
Add a fallback definition of LSDEAD in ps(1)

The symbol is no longer available in headers.

Requested by 


To generate a diff of this commit:
cvs rdiff -u -r1.131 -r1.132 src/bin/ps/print.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/bin/ps

2019-06-19 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Jun 19 21:25:51 UTC 2019

Modified Files:
src/bin/ps: print.c

Log Message:
Add a fallback definition of LSDEAD in ps(1)

The symbol is no longer available in headers.

Requested by 


To generate a diff of this commit:
cvs rdiff -u -r1.131 -r1.132 src/bin/ps/print.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/bin/ps/print.c
diff -u src/bin/ps/print.c:1.131 src/bin/ps/print.c:1.132
--- src/bin/ps/print.c:1.131	Tue Jun 18 02:23:29 2019
+++ src/bin/ps/print.c	Wed Jun 19 21:25:50 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: print.c,v 1.131 2019/06/18 02:23:29 kamil Exp $	*/
+/*	$NetBSD: print.c,v 1.132 2019/06/19 21:25:50 kamil Exp $	*/
 
 /*
  * Copyright (c) 2000, 2007 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
 #if 0
 static char sccsid[] = "@(#)print.c	8.6 (Berkeley) 4/16/94";
 #else
-__RCSID("$NetBSD: print.c,v 1.131 2019/06/18 02:23:29 kamil Exp $");
+__RCSID("$NetBSD: print.c,v 1.132 2019/06/19 21:25:50 kamil Exp $");
 #endif
 #endif /* not lint */
 
@@ -104,6 +104,11 @@ static time_t now;
 
 #define	min(a,b)	((a) <= (b) ? (a) : (b))
 
+/* pre-NetBSD 5.x support. */
+#ifndef LSDEAD
+#define LSDEAD 6
+#endif
+
 static int
 iwidth(u_int64_t v)
 {
@@ -586,9 +591,7 @@ lstate(struct pinfo *pi, VARENT *ve, enu
 		break;
 
 	case LSZOMB:
-#ifdef LSDEAD
 	case LSDEAD:
-#endif
 		*cp = 'Z';
 		break;
 



re: CVS commit: src/bin/ps

2019-06-19 Thread matthew green
> It still works on NetBSD-4 kernels (if it doesn't, it's not caused by
> this change).
> 
> The only difference is that it will print '?' for (LS)DEAD process
> (short-lived state).

right - that is what i am wanting not to break.

> sysstat ps.c has this change for a long time now.
> 
> How about this change:
> 
> Index: bin/ps/print.c

>  #ifdef LSDEAD
>   case LSDEAD:
> +#else
> + case 6:
>  #endif

gross magic numbers! :)  please use something like

#include 

..

/* pre-NetBSD 5.x support. */
#ifndef LSDEAD
#define LSDEAD 6
#endif

so at least it's not magic any more.

might be nice to also add a note to lwp.h that this
value shouldn't be re-used (it is still there so
there's an implication already, but explicitly
stating it seems better.)

thanks.


Re: CVS commit: src/external/cddl/osnet

2019-06-19 Thread Kamil Rytarowski
On 19.06.2019 10:18, Juergen Hannken-Illjes wrote:
> Module Name:  src
> Committed By: hannken
> Date: Wed Jun 19 08:18:01 UTC 2019
> 
> Modified Files:
>   src/external/cddl/osnet/include: libintl.h stdio_ext.h thread.h
>   src/external/cddl/osnet/sys/sys: isa_defs.h procset.h sysmacros.h
> 
> Log Message:
> Sync with upstream r315983.
> 
> 

Shuffling these files keep breaking bootstrap on Linux and we need it
for syzbot..

Changes like #ifndef #include  #endif look highly
suspicious and probably break on every Linux.

I will try to fix it again the fallout with tools/compat.

https://syzkaller.appspot.com/text?tag=CrashLog=14dcf0b2a0



signature.asc
Description: OpenPGP digital signature


CVS commit: src/lib/libc/sys

2019-06-19 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Wed Jun 19 20:28:36 UTC 2019

Modified Files:
src/lib/libc/sys: mprotect.2

Log Message:
Small markup fixes.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/lib/libc/sys/mprotect.2

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/sys/mprotect.2
diff -u src/lib/libc/sys/mprotect.2:1.26 src/lib/libc/sys/mprotect.2:1.27
--- src/lib/libc/sys/mprotect.2:1.26	Sun May 14 12:30:37 2017
+++ src/lib/libc/sys/mprotect.2	Wed Jun 19 20:28:36 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: mprotect.2,v 1.26 2017/05/14 12:30:37 wiz Exp $
+.\"	$NetBSD: mprotect.2,v 1.27 2019/06/19 20:28:36 uwe Exp $
 .\"
 .\" Copyright (c) 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -43,7 +43,7 @@
 .Fn mprotect "void *addr" "size_t len" "int prot"
 .Sh DESCRIPTION
 The
-.Fn mprotect
+.Nm
 system call
 changes the specified pages to have protection
 .Fa prot .
@@ -56,7 +56,7 @@ argument by
 .Tn OR Ns 'ing
 the following values:
 .Pp
-.Bl -tag -width MAP_FIXEDX -offset indent
+.Bl -tag -width "Dv MAP_WRITE" -offset indent
 .It Dv PROT_EXEC
 Pages may be executed.
 .It Dv PROT_READ
@@ -87,7 +87,7 @@ The new protection is less restrictive t
 set with
 .Xr mmap 2 .
 .Pp
-PAX mprotect restrictions prohibit the requested protection.
+PaX mprotect restrictions prohibit the requested protection.
 .It Bq Er EINVAL
 An invalid memory range, or invalid parameters were provided.
 .It Bq Er ENOMEM
@@ -101,6 +101,6 @@ A resource shortage occurred while inter
 .Xr munmap 2
 .Sh HISTORY
 The
-.Fn mprotect
+.Nm
 function first appeared in
 .Bx 4.4 .



CVS commit: src/lib/libc/sys

2019-06-19 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Wed Jun 19 20:28:36 UTC 2019

Modified Files:
src/lib/libc/sys: mprotect.2

Log Message:
Small markup fixes.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/lib/libc/sys/mprotect.2

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libc/sys

2019-06-19 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Wed Jun 19 20:20:52 UTC 2019

Modified Files:
src/lib/libc/sys: mmap.2

Log Message:
Small markup fixes.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/lib/libc/sys/mmap.2

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/sys/mmap.2
diff -u src/lib/libc/sys/mmap.2:1.52 src/lib/libc/sys/mmap.2:1.53
--- src/lib/libc/sys/mmap.2:1.52	Wed May  2 16:00:20 2018
+++ src/lib/libc/sys/mmap.2	Wed Jun 19 20:20:52 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: mmap.2,v 1.52 2018/05/02 16:00:20 christos Exp $
+.\"	$NetBSD: mmap.2,v 1.53 2019/06/19 20:20:52 uwe Exp $
 .\"
 .\" Copyright (c) 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -68,7 +68,7 @@ If
 is zero, an address will be selected by the system.
 The actual starting address of the region is returned.
 A successful
-.Fa mmap
+.Nm
 deletes any previous mapping in the allocated address range.
 .Pp
 The protections (region accessibility) are specified in the
@@ -184,7 +184,9 @@ specified.
 If the specified address cannot be used,
 .Nm mmap
 will fail.
-If MAP_FIXED is specified,
+If
+.Dv MAP_FIXED
+is specified,
 .Fa addr
 must be a multiple of the pagesize.
 Use of this option is discouraged.
@@ -225,7 +227,7 @@ had not been specified.
 If
 .Fa addr
 is
-.Fa NULL ,
+.Dv NULL ,
 this flag is ignored and the system will select a mapping address.
 .It Dv MAP_WIRED
 Lock the mapped region into memory as with
@@ -270,7 +272,7 @@ is set to indicate the error.
 The symbol
 .Dv MAP_FAILED
 is defined in the header
-.Ao Pa sys/mman.h Ac .
+.In sys/mman.h .
 No successful return from
 .Fn mmap
 will return the value
@@ -300,7 +302,7 @@ parameters and
 .Fa fd
 was not open for writing.
 .Pp
-PAX mprotect restrictions prohibit the requested protection.
+PaX mprotect restrictions prohibit the requested protection.
 .It Bq Er EBADF
 .Fa fd
 is not a valid open file descriptor.
@@ -318,7 +320,8 @@ was specified and the
 parameter was not page aligned or was outside of the
 valid address range for a process.
 .Pp
-.Dv MAP_ANON was specified and
+.Dv MAP_ANON
+was specified and
 .Fa fd
 was not \-1.
 .It Bq Er ENODEV



CVS commit: src/lib/libc/sys

2019-06-19 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Wed Jun 19 20:20:52 UTC 2019

Modified Files:
src/lib/libc/sys: mmap.2

Log Message:
Small markup fixes.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/lib/libc/sys/mmap.2

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.sbin/sysinst

2019-06-19 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 19 17:32:31 UTC 2019

Modified Files:
src/usr.sbin/sysinst: mbr.c mbr.h
src/usr.sbin/sysinst/arch/i386: md.c

Log Message:
Deal with manualy set disk geometries more carefully to avoid a division
by zero.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/sysinst/mbr.c
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/sysinst/mbr.h
cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/sysinst/arch/i386/md.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.sbin/sysinst

2019-06-19 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 19 17:32:31 UTC 2019

Modified Files:
src/usr.sbin/sysinst: mbr.c mbr.h
src/usr.sbin/sysinst/arch/i386: md.c

Log Message:
Deal with manualy set disk geometries more carefully to avoid a division
by zero.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/sysinst/mbr.c
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/sysinst/mbr.h
cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/sysinst/arch/i386/md.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.sbin/sysinst/mbr.c
diff -u src/usr.sbin/sysinst/mbr.c:1.13 src/usr.sbin/sysinst/mbr.c:1.14
--- src/usr.sbin/sysinst/mbr.c:1.13	Sat Jun 15 08:20:33 2019
+++ src/usr.sbin/sysinst/mbr.c	Wed Jun 19 17:32:31 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: mbr.c,v 1.13 2019/06/15 08:20:33 martin Exp $ */
+/*	$NetBSD: mbr.c,v 1.14 2019/06/19 17:32:31 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -243,7 +243,7 @@ set_bios_geom_with_mbr_guess(struct disk
 	msg_display(MSG_nobiosgeom, pm->dlcyl, pm->dlhead, pm->dlsec);
 	if (guess_biosgeom_from_parts(parts, , , ) >= 0)
 		msg_display_add(MSG_biosguess, cyl, head, sec);
-	set_bios_geom(parts, cyl, head, sec);
+	set_bios_geom(parts, , , );
 	if (parts->pscheme->change_disk_geom)
 		parts->pscheme->change_disk_geom(parts, cyl, head, sec);
 
@@ -267,7 +267,7 @@ mbr_init_chs(struct mbr_disk_partitions 
  * store in globals.
  */
 void
-set_bios_geom(struct disk_partitions *parts, int cyl, int head, int sec)
+set_bios_geom(struct disk_partitions *parts, int *cyl, int *head, int *sec)
 {
 	char res[80];
 	int bsec, bhead, bcyl;
@@ -279,13 +279,13 @@ set_bios_geom(struct disk_partitions *pa
 	msg_display_add(MSG_setbiosgeom);
 
 	do {
-		snprintf(res, 80, "%d", sec);
+		snprintf(res, 80, "%d", *sec);
 		msg_prompt_add(MSG_sectors, res, res, 80);
 		bsec = atoi(res);
 	} while (bsec <= 0 || bsec > MAXSECTOR);
 
 	do {
-		snprintf(res, 80, "%d", head);
+		snprintf(res, 80, "%d", *head);
 		msg_prompt_add(MSG_heads, res, res, 80);
 		bhead = atoi(res);
 	} while (bhead <= 0 || bhead > MAXHEAD);
@@ -297,7 +297,10 @@ set_bios_geom(struct disk_partitions *pa
 		bcyl = MAXCYL;
 	pm->max_chs = (unsigned long)bcyl * bhead * bsec;
 	pm->current_cylsize = bhead * bsec;
-	parts->pscheme->change_disk_geom(parts, cyl, head, sec);
+	parts->pscheme->change_disk_geom(parts, bcyl, bhead, bsec);
+	*cyl = bcyl;
+	*head = bhead;
+	*sec = bsec;
 }
 
 static int
@@ -915,12 +918,19 @@ mbr_write_to_disk(struct disk_partitions
 {
 	struct mbr_disk_partitions *parts =
 	(struct mbr_disk_partitions *)new_state;
-	unsigned long bsec = parts->geo_sec,
-	bhead = parts->ext_ptn_alignment / bsec,
-	bcyl;
+	unsigned long bsec, bhead, bcyl;
 	daddr_t t;
 
+	assert(parts->geo_sec != 0);
+	if (parts->geo_sec != 0) {
+		bsec = parts->geo_sec;
+		bhead = parts->ext_ptn_alignment / bsec;
+	} else {
+		bsec = MAXSECTOR;
+		bhead = MAXHEAD;
+	}
 	t = bsec * bhead;
+	assert(t != 0);
 	if ((daddr_t)(1UL<<10) * t <= parts->dp.disk_size)
 		bcyl = (1UL<<10) - 1;
 	else

Index: src/usr.sbin/sysinst/mbr.h
diff -u src/usr.sbin/sysinst/mbr.h:1.2 src/usr.sbin/sysinst/mbr.h:1.3
--- src/usr.sbin/sysinst/mbr.h:1.2	Wed Jun 12 06:20:17 2019
+++ src/usr.sbin/sysinst/mbr.h	Wed Jun 19 17:32:31 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: mbr.h,v 1.2 2019/06/12 06:20:17 martin Exp $	*/
+/*	$NetBSD: mbr.h,v 1.3 2019/06/19 17:32:31 martin Exp $	*/
 
 /*
  * Copyright 1997, 1988 Piermont Information Systems Inc.
@@ -99,7 +99,7 @@ int 	partsoverlap(struct mbr_partition *
 
 int	guess_biosgeom_from_parts(struct disk_partitions*, int *, int *, int *);
 bool	set_bios_geom_with_mbr_guess(struct disk_partitions*);
-void	set_bios_geom(struct disk_partitions *, int cyl, int head, int sec);
+void	set_bios_geom(struct disk_partitions *, int *cyl, int *head, int *sec);
 int	otherpart(int);
 int	ourpart(int);
 void	edit_ptn_bounds(void);

Index: src/usr.sbin/sysinst/arch/i386/md.c
diff -u src/usr.sbin/sysinst/arch/i386/md.c:1.16 src/usr.sbin/sysinst/arch/i386/md.c:1.17
--- src/usr.sbin/sysinst/arch/i386/md.c:1.16	Mon Jun 17 14:18:32 2019
+++ src/usr.sbin/sysinst/arch/i386/md.c	Wed Jun 19 17:32:31 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.16 2019/06/17 14:18:32 martin Exp $ */
+/*	$NetBSD: md.c,v 1.17 2019/06/19 17:32:31 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -533,7 +533,8 @@ get_bios_info(const char *dev, struct di
 	if (nip == NULL || nip->ni_nmatches == 0) {
 nogeom:
 		if (nip != NULL)
-			msg_display(MSG_nobiosgeom, pm->dlcyl, pm->dlhead, pm->dlsec);
+			msg_display(MSG_nobiosgeom, pm->dlcyl, pm->dlhead,
+			pm->dlsec);
 		if (guess_biosgeom_from_parts(parts, , , ) >= 0
 		&& nip != NULL)
 			msg_display_add(MSG_biosguess, cyl, head, sec);
@@ -571,13 +572,11 @@ nogeom:
 		}
 	}
 	if (biosdisk == NULL) {
-		if (nip != NULL) {
-			set_bios_geom(parts, 

CVS commit: src/sys/compat/sys

2019-06-19 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Wed Jun 19 16:14:07 UTC 2019

Modified Files:
src/sys/compat/sys: siginfo.h

Log Message:
Match the regular _ksiginfo size since sys/sys/siginfo.h:1.33

"Expand siginfo_t (struct size not changed) to new values for
SIGTRAP TRAP_SCE/TRAP_SCX events."

Fixes port-mips/54309: gdb doesn't work on mips64 (32bit userland,
64bit kernel)


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/compat/sys/siginfo.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/compat/sys

2019-06-19 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Wed Jun 19 16:14:07 UTC 2019

Modified Files:
src/sys/compat/sys: siginfo.h

Log Message:
Match the regular _ksiginfo size since sys/sys/siginfo.h:1.33

"Expand siginfo_t (struct size not changed) to new values for
SIGTRAP TRAP_SCE/TRAP_SCX events."

Fixes port-mips/54309: gdb doesn't work on mips64 (32bit userland,
64bit kernel)


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/compat/sys/siginfo.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/sys/siginfo.h
diff -u src/sys/compat/sys/siginfo.h:1.4 src/sys/compat/sys/siginfo.h:1.5
--- src/sys/compat/sys/siginfo.h:1.4	Mon Apr 28 20:23:46 2008
+++ src/sys/compat/sys/siginfo.h	Wed Jun 19 16:14:07 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: siginfo.h,v 1.4 2008/04/28 20:23:46 martin Exp $	 */
+/*	$NetBSD: siginfo.h,v 1.5 2019/06/19 16:14:07 maya Exp $	 */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -72,6 +72,13 @@ struct __ksiginfo32 {
 			int32_t _band;
 			int _fd;
 		} _poll;
+
+		struct {
+			int	_sysnum;
+			int	_retval[2];
+			int	_error;
+			uint64_t _args[8]; /* SYS_MAXSYSARGS */
+		} _syscall;
 	} _reason;
 };
 



CVS commit: src/sys/dev/usb

2019-06-19 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Jun 19 15:10:17 UTC 2019

Modified Files:
src/sys/dev/usb: xhcireg.h

Log Message:
HCSPARAMS2.SPR is bit 26, not 24


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/usb/xhcireg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/usb

2019-06-19 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Jun 19 15:10:17 UTC 2019

Modified Files:
src/sys/dev/usb: xhcireg.h

Log Message:
HCSPARAMS2.SPR is bit 26, not 24


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/usb/xhcireg.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/dev/usb/xhcireg.h
diff -u src/sys/dev/usb/xhcireg.h:1.12 src/sys/dev/usb/xhcireg.h:1.13
--- src/sys/dev/usb/xhcireg.h:1.12	Wed Jul 18 10:44:17 2018
+++ src/sys/dev/usb/xhcireg.h	Wed Jun 19 15:10:17 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: xhcireg.h,v 1.12 2018/07/18 10:44:17 msaitoh Exp $ */
+/* $NetBSD: xhcireg.h,v 1.13 2019/06/19 15:10:17 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2010 Hans Petter Selasky. All rights reserved.
@@ -61,7 +61,7 @@
 #define	XHCI_HCSPARAMS2		0x08	/* RO structual parameters 2 */
 #define	 XHCI_HCS2_IST(x)	((x) & 0xF)
 #define	 XHCI_HCS2_ERST_MAX(x)	(((x) >> 4) & 0xF)
-#define	 XHCI_HCS2_SPR(x)	(((x) >> 24) & 0x1)
+#define	 XHCI_HCS2_SPR(x)	(((x) >> 26) & 0x1)
 #define  XHCI_HCS2_SPBUFLO	__BITS(31, 27)
 #define  XHCI_HCS2_SPBUFHI	__BITS(25, 21)
 #define	 XHCI_HCS2_MAXSPBUF(x)	\



CVS commit: src/sys/kern

2019-06-19 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jun 19 15:01:01 UTC 2019

Modified Files:
src/sys/kern: kern_module.c

Log Message:
In case of error resolving symbol references, we cannot rely on the
module's name still being available - it may be destroyed when
kobj_affix() unloads the object.  So make a copy of the name first
so we can use it in a useful error message.

(Without this, I've have affix errors go into an infinite loop
trying to print the error message!)


To generate a diff of this commit:
cvs rdiff -u -r1.135 -r1.136 src/sys/kern/kern_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/kern/kern_module.c
diff -u src/sys/kern/kern_module.c:1.135 src/sys/kern/kern_module.c:1.136
--- src/sys/kern/kern_module.c:1.135	Tue Jun 11 15:20:57 2019
+++ src/sys/kern/kern_module.c	Wed Jun 19 15:01:01 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_module.c,v 1.135 2019/06/11 15:20:57 pgoyette Exp $	*/
+/*	$NetBSD: kern_module.c,v 1.136 2019/06/19 15:01:01 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.135 2019/06/11 15:20:57 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.136 2019/06/19 15:01:01 pgoyette Exp $");
 
 #define _MODULE_INTERNAL
 
@@ -1214,12 +1214,21 @@ module_do_load(const char *name, bool is
 	 * We loaded all needed modules successfully: perform global
 	 * relocations and initialize.
 	 */
-	error = kobj_affix(mod->mod_kobj, mi->mi_name);
-	if (error != 0) {
-		/* Cannot touch 'mi' as the module is now gone. */
-		module_error("unable to affix module `%s', error %d", name,
-		error);
-		goto fail2;
+	{
+		char xname[MAXMODNAME];
+
+		/*
+		 * In case of error the entire module is gone, so we
+		 * need to save its name for possible error report.
+		 */
+
+		strlcpy(xname, mi->mi_name, MAXMODNAME);
+		error = kobj_affix(mod->mod_kobj, mi->mi_name);
+		if (error != 0) {
+			module_error("unable to affix module `%s', error %d",
+			xname, error);
+			goto fail2;
+		}
 	}
 
 	if (filedict) {



CVS commit: src/sys/kern

2019-06-19 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jun 19 15:01:01 UTC 2019

Modified Files:
src/sys/kern: kern_module.c

Log Message:
In case of error resolving symbol references, we cannot rely on the
module's name still being available - it may be destroyed when
kobj_affix() unloads the object.  So make a copy of the name first
so we can use it in a useful error message.

(Without this, I've have affix errors go into an infinite loop
trying to print the error message!)


To generate a diff of this commit:
cvs rdiff -u -r1.135 -r1.136 src/sys/kern/kern_module.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/kern

2019-06-19 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Jun 19 14:16:06 UTC 2019

Modified Files:
src/sys/kern: vfs_syscalls.c

Log Message:
Correct wrong type of uio_seg passed to do_sys_mknodat()

It was introduced by an accident in previous commit to this file.

Detected by syzbot:
https://syzkaller.appspot.com/text?tag=CrashLog=16635d9ea0


To generate a diff of this commit:
cvs rdiff -u -r1.529 -r1.530 src/sys/kern/vfs_syscalls.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/kern

2019-06-19 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Jun 19 14:16:06 UTC 2019

Modified Files:
src/sys/kern: vfs_syscalls.c

Log Message:
Correct wrong type of uio_seg passed to do_sys_mknodat()

It was introduced by an accident in previous commit to this file.

Detected by syzbot:
https://syzkaller.appspot.com/text?tag=CrashLog=16635d9ea0


To generate a diff of this commit:
cvs rdiff -u -r1.529 -r1.530 src/sys/kern/vfs_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/kern/vfs_syscalls.c
diff -u src/sys/kern/vfs_syscalls.c:1.529 src/sys/kern/vfs_syscalls.c:1.530
--- src/sys/kern/vfs_syscalls.c:1.529	Tue Jun 18 22:34:25 2019
+++ src/sys/kern/vfs_syscalls.c	Wed Jun 19 14:16:06 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_syscalls.c,v 1.529 2019/06/18 22:34:25 kamil Exp $	*/
+/*	$NetBSD: vfs_syscalls.c,v 1.530 2019/06/19 14:16:06 kamil Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.529 2019/06/18 22:34:25 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.530 2019/06/19 14:16:06 kamil Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_fileassoc.h"
@@ -2165,7 +2165,7 @@ sys___mknod50(struct lwp *l, const struc
 		syscallarg(dev_t) dev;
 	} */
 	return do_sys_mknodat(l, AT_FDCWD, SCARG(uap, path),
-	SCARG(uap, mode), SCARG(uap, dev), UIO_SYSSPACE);
+	SCARG(uap, mode), SCARG(uap, dev), UIO_USERSPACE);
 }
 
 int
@@ -2181,7 +2181,7 @@ sys_mknodat(struct lwp *l, const struct 
 	} */
 
 	return do_sys_mknodat(l, SCARG(uap, fd), SCARG(uap, path),
-	SCARG(uap, mode), SCARG(uap, dev), UIO_SYSSPACE);
+	SCARG(uap, mode), SCARG(uap, dev), UIO_USERSPACE);
 }
 
 int



Re: CVS commit: src/sys/arch

2019-06-19 Thread Kamil Rytarowski
On 19.06.2019 06:41, m...@netbsd.org wrote:
> On Tue, Jun 18, 2019 at 09:18:13PM +, Kamil Rytarowski wrote:
>> Module Name: src
>> Committed By:kamil
>> Date:Tue Jun 18 21:18:13 UTC 2019
>>
>> Modified Files:
>>  src/sys/arch/aarch64/include: ptrace.h
>>  src/sys/arch/alpha/include: ptrace.h
>>  src/sys/arch/amd64/include: ptrace.h
>>  src/sys/arch/arm/include: ptrace.h
>>  src/sys/arch/hppa/include: ptrace.h
>>  src/sys/arch/i386/include: ptrace.h
>>  src/sys/arch/ia64/include: ptrace.h
>>  src/sys/arch/m68k/include: ptrace.h
>>  src/sys/arch/mips/include: ptrace.h
>>  src/sys/arch/or1k/include: ptrace.h
>>  src/sys/arch/powerpc/include: ptrace.h
>>  src/sys/arch/riscv/include: ptrace.h
>>  src/sys/arch/sh3/include: ptrace.h
>>  src/sys/arch/sparc/include: ptrace.h
>>  src/sys/arch/vax/include: ptrace.h
>>
>> Log Message:
>> Introduce PTRACE_REG_FP() a helper macro to retrieve the frame pointer
>>
>> The macro is dummy for ia64 (the FP register is unknown and can change
>> freely) and sparc/sparc64 (not stored in struct reg).
> 
> Wouldn't it be better not to declare PTRACE_REG_FP for the cases where
> obtaining it is more complicated?
> 
> e.g. someone who hasn't seen this commit and wants to use PTRACE_REG_FP
> thinks that they can just use it, and until they specifically test ia64
> and sparc64 they won't know it doesn't behave correctly.
> 

FP isn't reliable on any platform so every person has to be prepared.
For meaningful backtraces there is need to use DWARF or CTF.

Returning 0 doesn't make it much worse than on other CPUs. It's used in
simpler debuggers (my use-case is edb-debugger) and in tests mainly.



signature.asc
Description: OpenPGP digital signature


CVS commit: src/sys/dev/acpi

2019-06-19 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Jun 19 13:40:23 UTC 2019

Modified Files:
src/sys/dev/acpi: xhci_acpi.c

Log Message:
Conditionally use a 32- or 64-bit DMA tag based on HCCPARAMS


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/acpi/xhci_acpi.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/dev/acpi/xhci_acpi.c
diff -u src/sys/dev/acpi/xhci_acpi.c:1.3 src/sys/dev/acpi/xhci_acpi.c:1.4
--- src/sys/dev/acpi/xhci_acpi.c:1.3	Sat Feb 16 23:28:56 2019
+++ src/sys/dev/acpi/xhci_acpi.c	Wed Jun 19 13:40:23 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: xhci_acpi.c,v 1.3 2019/02/16 23:28:56 tron Exp $ */
+/* $NetBSD: xhci_acpi.c,v 1.4 2019/06/19 13:40:23 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: xhci_acpi.c,v 1.3 2019/02/16 23:28:56 tron Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci_acpi.c,v 1.4 2019/06/19 13:40:23 jmcneill Exp $");
 
 #include 
 #include 
@@ -89,6 +89,7 @@ xhci_acpi_attach(device_t parent, device
 	struct acpi_resources res;
 	struct acpi_mem *mem;
 	struct acpi_irq *irq;
+	uint32_t hccparams;
 	ACPI_STATUS rv;
 	int error;
 	void *ih;
@@ -97,7 +98,6 @@ xhci_acpi_attach(device_t parent, device
 
 	sc->sc_dev = self;
 	sc->sc_bus.ub_hcpriv = sc;
-	sc->sc_bus.ub_dmatag = aa->aa_dmat;
 	sc->sc_bus.ub_revision = USBREV_3_0;
 	sc->sc_quirks = 0;
 	sc->sc_vendor_init = xhci_acpi_init;
@@ -127,6 +127,15 @@ xhci_acpi_attach(device_t parent, device
 		return;
 	}
 
+	hccparams = bus_space_read_4(sc->sc_iot, sc->sc_ioh, XHCI_HCCPARAMS);
+	if (XHCI_HCC_AC64(hccparams)) {
+		aprint_verbose_dev(self, "using 64-bit DMA\n");
+		sc->sc_bus.ub_dmatag = aa->aa_dmat64;
+	} else {
+		aprint_verbose_dev(self, "using 32-bit DMA\n");
+		sc->sc_bus.ub_dmatag = aa->aa_dmat;
+	}
+
 ih = acpi_intr_establish(self, (uint64_t)aa->aa_node->ad_handle,
 	IPL_USB, true, xhci_intr, sc, device_xname(self));
 	if (ih == NULL) {



CVS commit: src/sys/dev/acpi

2019-06-19 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Jun 19 13:40:23 UTC 2019

Modified Files:
src/sys/dev/acpi: xhci_acpi.c

Log Message:
Conditionally use a 32- or 64-bit DMA tag based on HCCPARAMS


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/acpi/xhci_acpi.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm

2019-06-19 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Jun 19 13:39:18 UTC 2019

Modified Files:
src/sys/arch/arm/acpi: acpi_platform.c acpipchb.c
src/sys/arch/arm/fdt: acpi_fdt.c

Log Message:
Provide a 64-bit dma tag and use a coherent tag unless CCA=0


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/acpi/acpi_platform.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/acpi/acpipchb.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/fdt/acpi_fdt.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm

2019-06-19 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Jun 19 13:39:18 UTC 2019

Modified Files:
src/sys/arch/arm/acpi: acpi_platform.c acpipchb.c
src/sys/arch/arm/fdt: acpi_fdt.c

Log Message:
Provide a 64-bit dma tag and use a coherent tag unless CCA=0


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/acpi/acpi_platform.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/acpi/acpipchb.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/fdt/acpi_fdt.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/arch/arm/acpi/acpi_platform.c
diff -u src/sys/arch/arm/acpi/acpi_platform.c:1.12 src/sys/arch/arm/acpi/acpi_platform.c:1.13
--- src/sys/arch/arm/acpi/acpi_platform.c:1.12	Thu May 23 15:54:28 2019
+++ src/sys/arch/arm/acpi/acpi_platform.c	Wed Jun 19 13:39:18 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_platform.c,v 1.12 2019/05/23 15:54:28 ryo Exp $ */
+/* $NetBSD: acpi_platform.c,v 1.13 2019/06/19 13:39:18 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 #include "opt_multiprocessor.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi_platform.c,v 1.12 2019/05/23 15:54:28 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_platform.c,v 1.13 2019/06/19 13:39:18 jmcneill Exp $");
 
 #include 
 #include 
@@ -94,6 +94,26 @@ extern struct bus_space arm_generic_a4x_
 static struct plcom_instance plcom_console;
 #endif
 
+struct arm32_bus_dma_tag acpi_coherent32_dma_tag;
+static struct arm32_dma_range acpi_coherent32_ranges[] = {
+	[0] = {
+		.dr_sysbase = 0,
+		.dr_busbase = 0,
+		.dr_len = 0xU,
+	  	.dr_flags = _BUS_DMAMAP_COHERENT,
+	}
+};
+
+struct arm32_bus_dma_tag acpi_coherent64_dma_tag;
+static struct arm32_dma_range acpi_coherent64_ranges[] = {
+	[0] = {
+		.dr_sysbase = 0,
+		.dr_busbase = 0,
+		.dr_len = UINTPTR_MAX,
+	 	.dr_flags = _BUS_DMAMAP_COHERENT,
+	}
+};
+
 static const struct pmap_devmap *
 acpi_platform_devmap(void)
 {
@@ -107,6 +127,15 @@ acpi_platform_devmap(void)
 static void
 acpi_platform_bootstrap(void)
 {
+	extern struct arm32_bus_dma_tag arm_generic_dma_tag;
+
+	acpi_coherent32_dma_tag = arm_generic_dma_tag;
+	acpi_coherent32_dma_tag._ranges = acpi_coherent32_ranges;
+	acpi_coherent32_dma_tag._nranges = __arraycount(acpi_coherent32_ranges);
+
+	acpi_coherent64_dma_tag = arm_generic_dma_tag;
+	acpi_coherent64_dma_tag._ranges = acpi_coherent64_ranges;
+	acpi_coherent64_dma_tag._nranges = __arraycount(acpi_coherent64_ranges);
 }
 
 static void
@@ -222,13 +251,12 @@ acpi_platform_startup(void)
 static void
 acpi_platform_init_attach_args(struct fdt_attach_args *faa)
 {
-	extern struct arm32_bus_dma_tag arm_generic_dma_tag;
 	extern struct bus_space arm_generic_bs_tag;
 	extern struct bus_space arm_generic_a4x_bs_tag;
 
 	faa->faa_bst = _generic_bs_tag;
 	faa->faa_a4x_bst = _generic_a4x_bs_tag;
-	faa->faa_dmat = _generic_dma_tag;
+	faa->faa_dmat = _coherent64_dma_tag;
 }
 
 static void

Index: src/sys/arch/arm/acpi/acpipchb.c
diff -u src/sys/arch/arm/acpi/acpipchb.c:1.7 src/sys/arch/arm/acpi/acpipchb.c:1.8
--- src/sys/arch/arm/acpi/acpipchb.c:1.7	Mon Nov 19 10:45:47 2018
+++ src/sys/arch/arm/acpi/acpipchb.c	Wed Jun 19 13:39:18 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: acpipchb.c,v 1.7 2018/11/19 10:45:47 jmcneill Exp $ */
+/* $NetBSD: acpipchb.c,v 1.8 2019/06/19 13:39:18 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpipchb.c,v 1.7 2018/11/19 10:45:47 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpipchb.c,v 1.8 2019/06/19 13:39:18 jmcneill Exp $");
 
 #include 
 #include 
@@ -82,15 +82,6 @@ struct acpipchb_softc {
 	struct acpipchb_bus_space sc_pciio_bst;
 };
 
-static struct arm32_dma_range ahcipchb_coherent_ranges[] = {
-	[0] = {
-		.dr_sysbase = 0,
-		.dr_busbase = 0,
-		.dr_len = UINTPTR_MAX,
-		.dr_flags = _BUS_DMAMAP_COHERENT,
-	}
-};
-
 static int	acpipchb_match(device_t, cfdata_t, void *);
 static void	acpipchb_attach(device_t, device_t, void *);
 
@@ -133,16 +124,14 @@ acpipchb_attach(device_t parent, device_
 		seg = 0;
 
 	if (ACPI_FAILURE(acpi_eval_integer(sc->sc_handle, "_CCA", )))
-		cca = 0;
+		cca = 1;
 
 	aprint_naive("\n");
 	aprint_normal(": PCI Express Host Bridge\n");
 
 	sc->sc_dmat = *aa->aa_dmat;
-	if (cca) {
-		sc->sc_dmat._ranges = ahcipchb_coherent_ranges;
-		sc->sc_dmat._nranges = __arraycount(ahcipchb_coherent_ranges);
-	}
+	if (cca == 0)
+		sc->sc_dmat._nranges = 0;
 
 	sc->sc_ap.ap_pc = *aa->aa_pc;
 	sc->sc_ap.ap_pc.pc_conf_v = >sc_ap;

Index: src/sys/arch/arm/fdt/acpi_fdt.c
diff -u src/sys/arch/arm/fdt/acpi_fdt.c:1.9 src/sys/arch/arm/fdt/acpi_fdt.c:1.10
--- src/sys/arch/arm/fdt/acpi_fdt.c:1.9	Mon Nov 12 12:56:05 2018
+++ src/sys/arch/arm/fdt/acpi_fdt.c	Wed Jun 19 13:39:18 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_fdt.c,v 1.9 2018/11/12 12:56:05 jmcneill Exp $ */
+/* $NetBSD: acpi_fdt.c,v 1.10 

CVS commit: src/sys/uvm/pmap

2019-06-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jun 19 12:55:01 UTC 2019

Modified Files:
src/sys/uvm/pmap: vmpagemd.h

Log Message:
use __nothing


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/uvm/pmap/vmpagemd.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/uvm/pmap

2019-06-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jun 19 12:55:01 UTC 2019

Modified Files:
src/sys/uvm/pmap: vmpagemd.h

Log Message:
use __nothing


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/uvm/pmap/vmpagemd.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/uvm/pmap/vmpagemd.h
diff -u src/sys/uvm/pmap/vmpagemd.h:1.10 src/sys/uvm/pmap/vmpagemd.h:1.11
--- src/sys/uvm/pmap/vmpagemd.h:1.10	Wed Jun 19 06:04:40 2019
+++ src/sys/uvm/pmap/vmpagemd.h	Wed Jun 19 08:55:01 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmpagemd.h,v 1.10 2019/06/19 10:04:40 skrll Exp $	*/
+/*	$NetBSD: vmpagemd.h,v 1.11 2019/06/19 12:55:01 christos Exp $	*/
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -96,7 +96,7 @@ struct vm_page_md {
 #if defined(MULTIPROCESSOR) || defined(MODULAR)
 #define	VM_PAGEMD_PVLIST_LOCK_INIT(mdpg) 	(mdpg)->mdpg_lock = NULL
 #else
-#define	VM_PAGEMD_PVLIST_LOCK_INIT(mdpg)	do { } while (/*CONSTCOND*/ 0)
+#define	VM_PAGEMD_PVLIST_LOCK_INIT(mdpg)	__nothing
 #endif /* MULTIPROCESSOR || MODULAR */
 
 #define	VM_PAGEMD_PVLIST_LOCK(mdpg)		pmap_pvlist_lock(mdpg, 1)



CVS commit: src/sys/dev/pad

2019-06-19 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Wed Jun 19 12:52:41 UTC 2019

Modified Files:
src/sys/dev/pad: pad.c

Log Message:
Don't call next callout when an error occurs in start_output.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/sys/dev/pad/pad.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/dev/pad/pad.c
diff -u src/sys/dev/pad/pad.c:1.60 src/sys/dev/pad/pad.c:1.61
--- src/sys/dev/pad/pad.c:1.60	Wed Jun 19 12:51:26 2019
+++ src/sys/dev/pad/pad.c	Wed Jun 19 12:52:41 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: pad.c,v 1.60 2019/06/19 12:51:26 isaki Exp $ */
+/* $NetBSD: pad.c,v 1.61 2019/06/19 12:52:41 isaki Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pad.c,v 1.60 2019/06/19 12:51:26 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pad.c,v 1.61 2019/06/19 12:52:41 isaki Exp $");
 
 #include 
 #include 
@@ -615,12 +615,14 @@ pad_start_output(void *opaque, void *blo
 	err = pad_add_block(sc, block, blksize);
 	mutex_exit(>sc_cond_lock);
 	cv_broadcast(>sc_condvar);
+	if (err)
+		return err;
 
 	ms = blksize * 1000 / PADCHAN / (PADPREC / NBBY) / PADFREQ;
 	DPRINTF("%s: callout ms=%d\n", __func__, ms);
 	callout_reset(>sc_pcallout, mstohz(ms), pad_done_output, sc);
 
-	return err;
+	return 0;
 }
 
 static int



CVS commit: src/sys/dev/pad

2019-06-19 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Wed Jun 19 12:51:26 UTC 2019

Modified Files:
src/sys/dev/pad: pad.c

Log Message:
pad(4)'s output format is LE even on big endian arch.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/dev/pad/pad.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pad

2019-06-19 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Wed Jun 19 12:51:26 UTC 2019

Modified Files:
src/sys/dev/pad: pad.c

Log Message:
pad(4)'s output format is LE even on big endian arch.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/dev/pad/pad.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/dev/pad/pad.c
diff -u src/sys/dev/pad/pad.c:1.59 src/sys/dev/pad/pad.c:1.60
--- src/sys/dev/pad/pad.c:1.59	Wed May  8 13:40:18 2019
+++ src/sys/dev/pad/pad.c	Wed Jun 19 12:51:26 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: pad.c,v 1.59 2019/05/08 13:40:18 isaki Exp $ */
+/* $NetBSD: pad.c,v 1.60 2019/06/19 12:51:26 isaki Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pad.c,v 1.59 2019/05/08 13:40:18 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pad.c,v 1.60 2019/06/19 12:51:26 isaki Exp $");
 
 #include 
 #include 
@@ -140,7 +140,7 @@ static const struct audio_hw_if pad_hw_i
 static const struct audio_format pad_formats[PAD_NFORMATS] = {
 	{
 		.mode		= AUMODE_PLAY,
-		.encoding	= AUDIO_ENCODING_SLINEAR_NE,
+		.encoding	= AUDIO_ENCODING_SLINEAR_LE,
 		.validbits	= PADPREC,
 		.precision	= PADPREC,
 		.channels	= PADCHAN,



CVS commit: src/sys/dev/audio

2019-06-19 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Wed Jun 19 12:49:50 UTC 2019

Modified Files:
src/sys/dev/audio: audio.c

Log Message:
Don't wait until a block is filled.
This improves that short sound breaks.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/audio/audio.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/dev/audio/audio.c
diff -u src/sys/dev/audio/audio.c:1.17 src/sys/dev/audio/audio.c:1.18
--- src/sys/dev/audio/audio.c:1.17	Wed Jun 12 13:53:25 2019
+++ src/sys/dev/audio/audio.c	Wed Jun 19 12:49:49 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: audio.c,v 1.17 2019/06/12 13:53:25 isaki Exp $	*/
+/*	$NetBSD: audio.c,v 1.18 2019/06/19 12:49:49 isaki Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -142,7 +142,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.17 2019/06/12 13:53:25 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.18 2019/06/19 12:49:49 isaki Exp $");
 
 #ifdef _KERNEL_OPT
 #include "audio.h"
@@ -4296,7 +4296,6 @@ audio_track_play(audio_track_t *track)
 	int count;
 	int framesize;
 	int bytes;
-	u_int dropcount;
 
 	KASSERT(track);
 	KASSERT(track->lock);
@@ -4315,7 +4314,6 @@ audio_track_play(audio_track_t *track)
 
 	usrbuf = >usrbuf;
 	input = track->input;
-	dropcount = 0;
 
 	/*
 	 * framesize is always 1 byte or more since all formats supported as
@@ -4336,21 +4334,6 @@ audio_track_play(audio_track_t *track)
 	count = uimin(usrbuf->used, track->usrbuf_blksize) / framesize;
 	bytes = count * framesize;
 
-	/*
-	 * If bytes is less than one block,
-	 *  if not draining, buffer is not filled so return.
-	 *  if draining, fall through.
-	 */
-	if (count < track->usrbuf_blksize / framesize) {
-		dropcount = track->usrbuf_blksize / framesize - count;
-
-		if (track->pstate != AUDIO_STATE_DRAINING) {
-			/* Wait until filled. */
-			TRACET(4, track, "not enough; return");
-			return;
-		}
-	}
-
 	track->usrbuf_stamp += bytes;
 
 	if (usrbuf->head + bytes < usrbuf->capacity) {
@@ -4412,7 +4395,7 @@ audio_track_play(audio_track_t *track)
 		}
 	}
 
-	if (dropcount != 0) {
+	if (bytes < track->usrbuf_blksize) {
 		/*
 		 * Clear all conversion buffer pointer if the conversion was
 		 * not exactly one block.  These conversion stage buffers are



CVS commit: src/sys/dev/audio

2019-06-19 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Wed Jun 19 12:49:50 UTC 2019

Modified Files:
src/sys/dev/audio: audio.c

Log Message:
Don't wait until a block is filled.
This improves that short sound breaks.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/audio/audio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/uvm/pmap

2019-06-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Jun 19 10:04:40 UTC 2019

Modified Files:
src/sys/uvm/pmap: vmpagemd.h

Log Message:
Once more short line to unwrap


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/uvm/pmap/vmpagemd.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/uvm/pmap/vmpagemd.h
diff -u src/sys/uvm/pmap/vmpagemd.h:1.9 src/sys/uvm/pmap/vmpagemd.h:1.10
--- src/sys/uvm/pmap/vmpagemd.h:1.9	Wed Jun 19 10:00:19 2019
+++ src/sys/uvm/pmap/vmpagemd.h	Wed Jun 19 10:04:40 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmpagemd.h,v 1.9 2019/06/19 10:00:19 skrll Exp $	*/
+/*	$NetBSD: vmpagemd.h,v 1.10 2019/06/19 10:04:40 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -94,8 +94,7 @@ struct vm_page_md {
 
 #ifndef _MODULE
 #if defined(MULTIPROCESSOR) || defined(MODULAR)
-#define	VM_PAGEMD_PVLIST_LOCK_INIT(mdpg) 	\
-	(mdpg)->mdpg_lock = NULL
+#define	VM_PAGEMD_PVLIST_LOCK_INIT(mdpg) 	(mdpg)->mdpg_lock = NULL
 #else
 #define	VM_PAGEMD_PVLIST_LOCK_INIT(mdpg)	do { } while (/*CONSTCOND*/ 0)
 #endif /* MULTIPROCESSOR || MODULAR */



CVS commit: src/sys/uvm/pmap

2019-06-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Jun 19 10:04:40 UTC 2019

Modified Files:
src/sys/uvm/pmap: vmpagemd.h

Log Message:
Once more short line to unwrap


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/uvm/pmap/vmpagemd.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/uvm/pmap

2019-06-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Jun 19 10:00:19 UTC 2019

Modified Files:
src/sys/uvm/pmap: vmpagemd.h

Log Message:
Unwrap short lines.  NFCI.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/uvm/pmap/vmpagemd.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/uvm/pmap

2019-06-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Jun 19 10:00:19 UTC 2019

Modified Files:
src/sys/uvm/pmap: vmpagemd.h

Log Message:
Unwrap short lines.  NFCI.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/uvm/pmap/vmpagemd.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/uvm/pmap/vmpagemd.h
diff -u src/sys/uvm/pmap/vmpagemd.h:1.8 src/sys/uvm/pmap/vmpagemd.h:1.9
--- src/sys/uvm/pmap/vmpagemd.h:1.8	Thu Apr 19 21:50:10 2018
+++ src/sys/uvm/pmap/vmpagemd.h	Wed Jun 19 10:00:19 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmpagemd.h,v 1.8 2018/04/19 21:50:10 christos Exp $	*/
+/*	$NetBSD: vmpagemd.h,v 1.9 2019/06/19 10:00:19 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -100,16 +100,11 @@ struct vm_page_md {
 #define	VM_PAGEMD_PVLIST_LOCK_INIT(mdpg)	do { } while (/*CONSTCOND*/ 0)
 #endif /* MULTIPROCESSOR || MODULAR */
 
-#define	VM_PAGEMD_PVLIST_LOCK(mdpg)		\
-	pmap_pvlist_lock(mdpg, 1)
-#define	VM_PAGEMD_PVLIST_READLOCK(mdpg)		\
-	pmap_pvlist_lock(mdpg, 0)
-#define	VM_PAGEMD_PVLIST_UNLOCK(mdpg)		\
-	pmap_pvlist_unlock(mdpg)
-#define	VM_PAGEMD_PVLIST_LOCKED_P(mdpg)		\
-	pmap_pvlist_locked_p(mdpg)
-#define	VM_PAGEMD_PVLIST_GEN(mdpg)		\
-	((mdpg)->mdpg_attrs >> 16)
+#define	VM_PAGEMD_PVLIST_LOCK(mdpg)		pmap_pvlist_lock(mdpg, 1)
+#define	VM_PAGEMD_PVLIST_READLOCK(mdpg)		pmap_pvlist_lock(mdpg, 0)
+#define	VM_PAGEMD_PVLIST_UNLOCK(mdpg)		pmap_pvlist_unlock(mdpg)
+#define	VM_PAGEMD_PVLIST_LOCKED_P(mdpg)		pmap_pvlist_locked_p(mdpg)
+#define	VM_PAGEMD_PVLIST_GEN(mdpg)		((mdpg)->mdpg_attrs >> 16)
 
 #ifdef _KERNEL
 #if defined(MULTIPROCESSOR) || defined(MODULAR)



CVS commit: src/sys/uvm/pmap

2019-06-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Jun 19 09:56:17 UTC 2019

Modified Files:
src/sys/uvm/pmap: pmap.c

Log Message:
Make a comment generic and not MIPS specific


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/uvm/pmap/pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/uvm/pmap

2019-06-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Jun 19 09:56:17 UTC 2019

Modified Files:
src/sys/uvm/pmap: pmap.c

Log Message:
Make a comment generic and not MIPS specific


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/uvm/pmap/pmap.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/uvm/pmap/pmap.c
diff -u src/sys/uvm/pmap/pmap.c:1.40 src/sys/uvm/pmap/pmap.c:1.41
--- src/sys/uvm/pmap/pmap.c:1.40	Mon Oct 30 03:25:14 2017
+++ src/sys/uvm/pmap/pmap.c	Wed Jun 19 09:56:17 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.40 2017/10/30 03:25:14 pgoyette Exp $	*/
+/*	$NetBSD: pmap.c,v 1.41 2019/06/19 09:56:17 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.40 2017/10/30 03:25:14 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.41 2019/06/19 09:56:17 skrll Exp $");
 
 /*
  *	Manages physical address maps.
@@ -434,7 +434,7 @@ pmap_growkernel(vaddr_t maxkvaddr)
  * memory system has been bootstrapped.  After that point, either kmem_alloc
  * or malloc should be used.  This function works by stealing pages from the
  * (to be) managed page pool, then implicitly mapping the pages (by using
- * their k0seg addresses) and zeroing them.
+ * their direct mapped addresses) and zeroing them.
  *
  * It may be used once the physical memory segments have been pre-loaded
  * into the vm_physmem[] array.  Early memory allocation MUST use this



CVS commit: src/sys/arch/mips/include

2019-06-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Jun 19 09:55:27 UTC 2019

Modified Files:
src/sys/arch/mips/include: mips_param.h

Log Message:
Whitespace and whitespace consistency


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/mips/include/mips_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/arch/mips/include/mips_param.h
diff -u src/sys/arch/mips/include/mips_param.h:1.39 src/sys/arch/mips/include/mips_param.h:1.40
--- src/sys/arch/mips/include/mips_param.h:1.39	Sat May 11 06:50:42 2019
+++ src/sys/arch/mips/include/mips_param.h	Wed Jun 19 09:55:27 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: mips_param.h,v 1.39 2019/05/11 06:50:42 skrll Exp $	*/
+/*	$NetBSD: mips_param.h,v 1.40 2019/06/19 09:55:27 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -93,24 +93,24 @@
 #define	PGSHIFT		12		/* LOG2(NBPG) */
 #endif
 #define	NBPG		(1 << PGSHIFT)	/* bytes/page */
-#define	PGOFSET		(NBPG-1)	/* byte offset into page */
+#define	PGOFSET		(NBPG - 1)	/* byte offset into page */
 #define	PTPSHIFT	2
-#define	PTPLENGTH	(PGSHIFT-PTPSHIFT)
+#define	PTPLENGTH	(PGSHIFT - PTPSHIFT)
 #define	NPTEPG		(1 << PTPLENGTH)
 
-#define SEGSHIFT	(PGSHIFT+PTPLENGTH)	/* LOG2(NBSEG) */
-#define NBSEG		(1 << SEGSHIFT)	/* bytes/segment */
+#define	SEGSHIFT	(PGSHIFT + PTPLENGTH)	/* LOG2(NBSEG) */
+#define	NBSEG		(1 << SEGSHIFT)	/* bytes/segment */
 #define	SEGOFSET	(NBSEG-1)	/* byte offset into segment */
 
 #ifdef _LP64
-#define	SEGLENGTH	(PGSHIFT-3)
-#define	XSEGSHIFT	(SEGSHIFT+SEGLENGTH)	/* LOG2(NBXSEG) */
+#define	SEGLENGTH	(PGSHIFT - 3)
+#define	XSEGSHIFT	(SEGSHIFT + SEGLENGTH)	/* LOG2(NBXSEG) */
 #define	NBXSEG		(1UL << XSEGSHIFT)	/* bytes/xsegment */
-#define	XSEGOFSET	(NBXSEG-1)	/* byte offset into xsegment */
-#define	XSEGLENGTH	(PGSHIFT-3)
+#define	XSEGOFSET	(NBXSEG - 1)	/* byte offset into xsegment */
+#define	XSEGLENGTH	(PGSHIFT - 3)
 #define	NXSEGPG		(1 << XSEGLENGTH)
 #else
-#define	SEGLENGTH	(31-SEGSHIFT)
+#define	SEGLENGTH	(31 - SEGSHIFT)
 #endif
 #define	NSEGPG		(1 << SEGLENGTH)
 



CVS commit: src/sys/arch/mips/include

2019-06-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Jun 19 09:55:27 UTC 2019

Modified Files:
src/sys/arch/mips/include: mips_param.h

Log Message:
Whitespace and whitespace consistency


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/mips/include/mips_param.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/include/arm32

2019-06-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Jun 19 09:54:15 UTC 2019

Modified Files:
src/sys/arch/arm/include/arm32: pte.h

Log Message:
Whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/include/arm32/pte.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/include/arm32

2019-06-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Jun 19 09:54:42 UTC 2019

Modified Files:
src/sys/arch/arm/include/arm32: vmparam.h

Log Message:
Update a comment


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 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.44 src/sys/arch/arm/include/arm32/vmparam.h:1.45
--- src/sys/arch/arm/include/arm32/vmparam.h:1.44	Sat Mar 30 21:06:42 2019
+++ src/sys/arch/arm/include/arm32/vmparam.h	Wed Jun 19 09:54:42 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.44 2019/03/30 21:06:42 christos Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.45 2019/06/19 09:54:42 skrll Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -78,7 +78,7 @@
 
 /*
  * While the ARM architecture defines Section mappings, large pages,
- * and small pages, the standard page size is (and will always be) 4K.
+ * and small pages, the standard MMU page size is (and will always be) 4K.
  */
 #define	PAGE_SHIFT	PGSHIFT
 #define	PAGE_SIZE	(1 << PAGE_SHIFT)



CVS commit: src/sys/arch/arm/include/arm32

2019-06-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Jun 19 09:54:42 UTC 2019

Modified Files:
src/sys/arch/arm/include/arm32: vmparam.h

Log Message:
Update a comment


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 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.



CVS commit: src/sys/arch/arm/include/arm32

2019-06-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Jun 19 09:53:39 UTC 2019

Modified Files:
src/sys/arch/arm/include/arm32: param.h

Log Message:
KNF and add a comment


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/arm/include/arm32/param.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/include/arm32

2019-06-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Jun 19 09:54:15 UTC 2019

Modified Files:
src/sys/arch/arm/include/arm32: pte.h

Log Message:
Whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/include/arm32/pte.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/pte.h
diff -u src/sys/arch/arm/include/arm32/pte.h:1.19 src/sys/arch/arm/include/arm32/pte.h:1.20
--- src/sys/arch/arm/include/arm32/pte.h:1.19	Wed Oct 29 10:59:48 2014
+++ src/sys/arch/arm/include/arm32/pte.h	Wed Jun 19 09:54:15 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: pte.h,v 1.19 2014/10/29 10:59:48 skrll Exp $	*/
+/*	$NetBSD: pte.h,v 1.20 2019/06/19 09:54:15 skrll Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -131,6 +131,7 @@ typedef uint32_t	pt_entry_t;	/* L2 table
 
 #define	L1_TABLE_SIZE	0x4000		/* 16K */
 #define	L2_TABLE_SIZE	0x1000		/* 4K */
+
 /*
  * The new pmap deals with the 1KB coarse L2 tables by
  * allocating them from a pool. Until every port has been converted,



CVS commit: src/sys/arch/arm/include/arm32

2019-06-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Jun 19 09:53:39 UTC 2019

Modified Files:
src/sys/arch/arm/include/arm32: param.h

Log Message:
KNF and add a comment


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/arm/include/arm32/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/arch/arm/include/arm32/param.h
diff -u src/sys/arch/arm/include/arm32/param.h:1.26 src/sys/arch/arm/include/arm32/param.h:1.27
--- src/sys/arch/arm/include/arm32/param.h:1.26	Mon Feb  4 13:06:39 2019
+++ src/sys/arch/arm/include/arm32/param.h	Wed Jun 19 09:53:39 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.26 2019/02/04 13:06:39 skrll Exp $	*/
+/*	$NetBSD: param.h,v 1.27 2019/06/19 09:53:39 skrll Exp $	*/
 
 /*
  * Copyright (c) 1994,1995 Mark Brinicombe.
@@ -53,9 +53,8 @@
 #endif
 #endif
 #define	NBPG		(1 << PGSHIFT)	/* bytes/page */
-#define	PGOFSET		(NBPG-1)	/* byte offset into page */
-#define	NPTEPG		(NBPG/(sizeof (pt_entry_t)))
-
+#define	PGOFSET		(NBPG - 1)	/* byte offset into page */
+#define	NPTEPG		(NBPG / sizeof(pt_entry_t))	/* PTEs per Page */
 
 #define SSIZE		1		/* initial stack size/NBPG */
 #define SINCR		1		/* increment of stack/NBPG */



CVS commit: src/external/cddl/osnet

2019-06-19 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Wed Jun 19 08:18:01 UTC 2019

Modified Files:
src/external/cddl/osnet/include: libintl.h stdio_ext.h thread.h
src/external/cddl/osnet/sys/sys: isa_defs.h procset.h sysmacros.h

Log Message:
Sync with upstream r315983.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/cddl/osnet/include/libintl.h
cvs rdiff -u -r1.1 -r1.2 src/external/cddl/osnet/include/stdio_ext.h
cvs rdiff -u -r1.4 -r1.5 src/external/cddl/osnet/include/thread.h
cvs rdiff -u -r1.3 -r1.4 src/external/cddl/osnet/sys/sys/isa_defs.h
cvs rdiff -u -r1.2 -r1.3 src/external/cddl/osnet/sys/sys/procset.h
cvs rdiff -u -r1.9 -r1.10 src/external/cddl/osnet/sys/sys/sysmacros.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/cddl/osnet/include/libintl.h
diff -u src/external/cddl/osnet/include/libintl.h:1.3 src/external/cddl/osnet/include/libintl.h:1.4
--- src/external/cddl/osnet/include/libintl.h:1.3	Sun Feb 21 01:46:34 2010
+++ src/external/cddl/osnet/include/libintl.h	Wed Jun 19 08:18:01 2019
@@ -1,42 +1,107 @@
-/*	$NetBSD: libintl.h,v 1.3 2010/02/21 01:46:34 darran Exp $	*/
-
-/*-
- * Copyright (c) 2009 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Andrew Doran.
- *
- * 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 retain the above copyright
- *notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *notice, this list of conditions and the following disclaimer in the
- *documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/*
+ * Copyright 2014 Garrett D'Amore 
+ *
+ * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
  */
 
-#ifndef	_LIBINTL_H_
-#define	_LIBINTL_H_
 
-#include 
-#include 
+#ifndef	_LIBINTL_H
+#define	_LIBINTL_H
+
+#ifdef __NetBSD__
 
 #define	textdomain(domain)	0
 #define	gettext(...)		(__VA_ARGS__)
 #define	dgettext(domain, ...)	(__VA_ARGS__)
 
-#endif	/* !_SOLARIS_H_ */
+#else /* __NetBSD__ */
+
+#include 
+
+#ifdef	__cplusplus
+extern "C" {
+#endif
+
+/*
+ * wchar_t is a built-in type in standard C++ and as such is not
+ * defined here when using standard C++. However, the GNU compiler
+ * fixincludes utility nonetheless creates its own version of this
+ * header for use by gcc and g++. In that version it adds a redundant
+ * guard for __cplusplus. To avoid the creation of a gcc/g++ specific
+ * header we need to include the following magic comment:
+ *
+ * we must use the C++ compiler's type
+ *
+ * The above comment should not be removed or changed until GNU
+ * gcc/fixinc/inclhack.def is updated to bypass this header.
+ */
+#if !defined(__cplusplus) || (__cplusplus < 199711L && !defined(__GNUG__))
+#ifndef _WCHAR_T
+#define	_WCHAR_T
+#if defined(_LP64)
+typedef int	wchar_t;
+#else
+typedef long	wchar_t;
+#endif
+#endif	/* !_WCHAR_T */
+#endif	/* !defined(__cplusplus) ... */
+
+#define	TEXTDOMAINMAX	256
+
+#define	

CVS commit: src/external/cddl/osnet

2019-06-19 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Wed Jun 19 08:18:01 UTC 2019

Modified Files:
src/external/cddl/osnet/include: libintl.h stdio_ext.h thread.h
src/external/cddl/osnet/sys/sys: isa_defs.h procset.h sysmacros.h

Log Message:
Sync with upstream r315983.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/cddl/osnet/include/libintl.h
cvs rdiff -u -r1.1 -r1.2 src/external/cddl/osnet/include/stdio_ext.h
cvs rdiff -u -r1.4 -r1.5 src/external/cddl/osnet/include/thread.h
cvs rdiff -u -r1.3 -r1.4 src/external/cddl/osnet/sys/sys/isa_defs.h
cvs rdiff -u -r1.2 -r1.3 src/external/cddl/osnet/sys/sys/procset.h
cvs rdiff -u -r1.9 -r1.10 src/external/cddl/osnet/sys/sys/sysmacros.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86

2019-06-19 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jun 19 06:32:46 UTC 2019

Modified Files:
src/sys/arch/x86/include: i82093reg.h
src/sys/arch/x86/x86: ioapic.c

Log Message:
 Fix ioapic_dump_raw() to dump whole ioapic area.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x86/include/i82093reg.h
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/x86/x86/ioapic.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/arch/x86/include/i82093reg.h
diff -u src/sys/arch/x86/include/i82093reg.h:1.5 src/sys/arch/x86/include/i82093reg.h:1.6
--- src/sys/arch/x86/include/i82093reg.h:1.5	Sat Apr 22 04:25:09 2017
+++ src/sys/arch/x86/include/i82093reg.h	Wed Jun 19 06:32:46 2019
@@ -1,4 +1,4 @@
-/* 	$NetBSD: i82093reg.h,v 1.5 2017/04/22 04:25:09 nonaka Exp $ */
+/* 	$NetBSD: i82093reg.h,v 1.6 2019/06/19 06:32:46 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -81,8 +81,9 @@
  * Redirection table registers.
  */
 
-#define IOAPIC_REDHI(pin)	(0x11 + ((pin)<<1))
-#define IOAPIC_REDLO(pin)	(0x10 + ((pin)<<1))
+#define IOAPIC_REDTBL		0x10
+#define IOAPIC_REDHI(pin)	(IOAPIC_REDTBL + ((pin) << 1) + 1)
+#define IOAPIC_REDLO(pin)	(IOAPIC_REDTBL + ((pin) << 1))
 
 #define IOAPIC_REDHI_DEST_SHIFT		24	   /* destination. */
 #define IOAPIC_REDHI_DEST_MASK		0xff00

Index: src/sys/arch/x86/x86/ioapic.c
diff -u src/sys/arch/x86/x86/ioapic.c:1.62 src/sys/arch/x86/x86/ioapic.c:1.63
--- src/sys/arch/x86/x86/ioapic.c:1.62	Mon Jun 17 06:38:30 2019
+++ src/sys/arch/x86/x86/ioapic.c	Wed Jun 19 06:32:46 2019
@@ -1,4 +1,4 @@
-/* 	$NetBSD: ioapic.c,v 1.62 2019/06/17 06:38:30 msaitoh Exp $	*/
+/* 	$NetBSD: ioapic.c,v 1.63 2019/06/19 06:32:46 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2009 The NetBSD Foundation, Inc.
@@ -64,7 +64,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ioapic.c,v 1.62 2019/06/17 06:38:30 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ioapic.c,v 1.63 2019/06/19 06:32:46 msaitoh Exp $");
 
 #include "opt_ddb.h"
 
@@ -611,7 +611,7 @@ ioapic_dump_raw(void)
 			printf(" %08x", (u_int)reg);
 			if (++i % 0x08 == 0)
 printf("\n");
-		} while (i < 0x40);
+		} while (i < IOAPIC_REDTBL + (sc->sc_apic_sz * 2));
 	}
 }
 #endif



CVS commit: src/sys/arch/x86

2019-06-19 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jun 19 06:32:46 UTC 2019

Modified Files:
src/sys/arch/x86/include: i82093reg.h
src/sys/arch/x86/x86: ioapic.c

Log Message:
 Fix ioapic_dump_raw() to dump whole ioapic area.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x86/include/i82093reg.h
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/x86/x86/ioapic.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.