CVS commit: src/sbin/gpt
Module Name:src Committed By: jnemeth Date: Thu Jun 18 01:37:23 UTC 2015 Modified Files: src/sbin/gpt: recover.c Log Message: Instruct user to use resizedisk if media size has changed, as resizedisk will adjust the media size in the headers, whereas recover simply copies the existing header over the missing one. XXX recover and resizedisk should probably be merged (even if just partially, so that recover can properly handle media size changes). Also, reading in the GPT should probably be centralised so that error handling can be centralised, and users aren't given misleading messages (i.e. they aren't told to run recover when they should be running resizedisk). However, something that can be quickly pulled up to netbsd-7 was needed, and there isn't time for a major overhaul or rewrite. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sbin/gpt/recover.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/gpt/recover.c diff -u src/sbin/gpt/recover.c:1.5 src/sbin/gpt/recover.c:1.6 --- src/sbin/gpt/recover.c:1.5 Mon Sep 29 20:28:57 2014 +++ src/sbin/gpt/recover.c Thu Jun 18 01:37:23 2015 @@ -33,7 +33,7 @@ __FBSDID("$FreeBSD: src/sbin/gpt/recover.c,v 1.8 2005/08/31 01:47:19 marcel Exp $"); #endif #ifdef __RCSID -__RCSID("$NetBSD: recover.c,v 1.5 2014/09/29 20:28:57 christos Exp $"); +__RCSID("$NetBSD: recover.c,v 1.6 2015/06/18 01:37:23 jnemeth Exp $"); #endif #include @@ -64,7 +64,7 @@ usage_recover(void) static void recover(int fd) { - off_t last; + uint64_t last; map_t *gpt, *tpg; map_t *tbl, *lbt; struct gpt_hdr *hdr; @@ -92,6 +92,13 @@ recover(int fd) last = mediasz / secsz - 1LL; + if (gpt != NULL && + ((struct gpt_hdr *)(gpt->map_data))->hdr_lba_alt != last) { + warnx("%s: media size has changed, please use 'gpt resizedisk'", + device_name); + return; + } + if (tbl != NULL && lbt == NULL) { lbt = map_add(last - tbl->map_size, tbl->map_size, MAP_TYPE_SEC_GPT_TBL, tbl->map_data);
CVS commit: src/usr.bin/make
Module Name:src Committed By: christos Date: Wed Jun 17 17:43:23 UTC 2015 Modified Files: src/usr.bin/make: Makefile compat.c var.c Log Message: Centralize the "is a meta char" test, instead of using two different arrays. To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 src/usr.bin/make/Makefile cvs rdiff -u -r1.96 -r1.97 src/usr.bin/make/compat.c cvs rdiff -u -r1.192 -r1.193 src/usr.bin/make/var.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/make/Makefile diff -u src/usr.bin/make/Makefile:1.57 src/usr.bin/make/Makefile:1.58 --- src/usr.bin/make/Makefile:1.57 Sat Jul 5 15:22:05 2014 +++ src/usr.bin/make/Makefile Wed Jun 17 13:43:23 2015 @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.57 2014/07/05 19:22:05 dholland Exp $ +# $NetBSD: Makefile,v 1.58 2015/06/17 17:43:23 christos Exp $ # @(#)Makefile 5.2 (Berkeley) 12/28/90 PROG= make SRCS= arch.c buf.c compat.c cond.c dir.c for.c hash.c job.c main.c \ - make.c parse.c str.c suff.c targ.c trace.c var.c util.c + make.c metachar.c parse.c str.c suff.c targ.c trace.c var.c util.c SRCS+= strlist.c SRCS+= make_malloc.c SRCS+= lstAppend.c lstAtEnd.c lstAtFront.c lstClose.c lstConcat.c \ Index: src/usr.bin/make/compat.c diff -u src/usr.bin/make/compat.c:1.96 src/usr.bin/make/compat.c:1.97 --- src/usr.bin/make/compat.c:1.96 Sun Sep 7 16:55:34 2014 +++ src/usr.bin/make/compat.c Wed Jun 17 13:43:23 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: compat.c,v 1.96 2014/09/07 20:55:34 joerg Exp $ */ +/* $NetBSD: compat.c,v 1.97 2015/06/17 17:43:23 christos Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: compat.c,v 1.96 2014/09/07 20:55:34 joerg Exp $"; +static char rcsid[] = "$NetBSD: compat.c,v 1.97 2015/06/17 17:43:23 christos Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)compat.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: compat.c,v 1.96 2014/09/07 20:55:34 joerg Exp $"); +__RCSID("$NetBSD: compat.c,v 1.97 2015/06/17 17:43:23 christos Exp $"); #endif #endif /* not lint */ #endif @@ -108,37 +108,14 @@ __RCSID("$NetBSD: compat.c,v 1.96 2014/0 #include"hash.h" #include"dir.h" #include"job.h" +#include"metachar.h" #include"pathnames.h" -/* - * The following array is used to make a fast determination of which - * characters are interpreted specially by the shell. If a command - * contains any of these characters, it is executed by the shell, not - * directly by us. - */ - -static char meta[256]; static GNode *curTarg = NULL; static GNode *ENDNode; static void CompatInterrupt(int); -static void -Compat_Init(void) -{ -const char *cp; - -Shell_Init(); /* setup default shell */ - -for (cp = "~#=|^(){};&<>*?[]:$`\\\n"; *cp != '\0'; cp++) { - meta[(unsigned char) *cp] = 1; -} -/* - * The null character serves as a sentinel in the string. - */ -meta[0] = 1; -} - /*- *--- * CompatInterrupt -- @@ -268,8 +245,8 @@ CompatRunCommand(void *cmdp, void *gnp) break; case '+': doIt = TRUE; - if (!meta[0]) /* we came here from jobs */ - Compat_Init(); + if (!shellName) /* we came here from jobs */ + Shell_Init(); break; } cmd++; @@ -298,10 +275,8 @@ CompatRunCommand(void *cmdp, void *gnp) * characters, there's no need to execute a shell to execute the * command. */ -for (cp = cmd; !meta[(unsigned char)*cp]; cp++) { - continue; -} -useShell = (*cp != '\0'); + +useShell = hasmeta(cmd); #endif /* @@ -509,8 +484,8 @@ Compat_Make(void *gnp, void *pgnp) GNode *gn = (GNode *)gnp; GNode *pgn = (GNode *)pgnp; -if (!meta[0]) /* we came here from jobs */ - Compat_Init(); +if (!shellName) /* we came here from jobs */ + Shell_Init(); if (gn->made == UNMADE && (gn == pgn || (pgn->type & OP_MADE) == 0)) { /* * First mark ourselves to be made, then apply whatever transformations @@ -690,7 +665,8 @@ Compat_Run(Lst targs) GNode *gn = NULL;/* Current root target */ int errors; /* Number of targets not remade due to errors */ -Compat_Init(); +if (!shellName) + Shell_Init(); if (bmake_signal(SIGINT, SIG_IGN) != SIG_IGN) { bmake_signal(SIGINT, CompatInterrupt); Index: src/usr.bin/make/var.c diff -u src/usr.bin/make/var.c:1.192 src/usr.bin/make/var.c:1.193 --- src/usr.bin/make/var.c:1.192 Tue May 5 17:51:09 2015 +++ src/usr.bin/make/var.c Wed Jun 17 13:43:23 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: var.c,v 1.192 2015/05/05 21:51:09 sjg Exp $ */ +/* $NetBSD: var.c,v 1.193 2015/06/17 17:43:23 christos Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static
CVS commit: src/usr.bin/xinstall
Module Name:src Committed By: christos Date: Wed Jun 17 15:52:37 UTC 2015 Modified Files: src/usr.bin/xinstall: xinstall.c Log Message: restore unlink file if strip fails (from Takeshi Nakayama) To generate a diff of this commit: cvs rdiff -u -r1.120 -r1.121 src/usr.bin/xinstall/xinstall.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/xinstall/xinstall.c diff -u src/usr.bin/xinstall/xinstall.c:1.120 src/usr.bin/xinstall/xinstall.c:1.121 --- src/usr.bin/xinstall/xinstall.c:1.120 Wed Jun 17 11:34:08 2015 +++ src/usr.bin/xinstall/xinstall.c Wed Jun 17 11:52:37 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: xinstall.c,v 1.120 2015/06/17 15:34:08 christos Exp $ */ +/* $NetBSD: xinstall.c,v 1.121 2015/06/17 15:52:37 christos Exp $ */ /* * Copyright (c) 1987, 1993 @@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1987, 19 #if 0 static char sccsid[] = "@(#)xinstall.c 8.1 (Berkeley) 7/21/93"; #else -__RCSID("$NetBSD: xinstall.c,v 1.120 2015/06/17 15:34:08 christos Exp $"); +__RCSID("$NetBSD: xinstall.c,v 1.121 2015/06/17 15:52:37 christos Exp $"); #endif #endif /* not lint */ @@ -1059,7 +1059,7 @@ strip(const char *to_name) stripprog = _PATH_STRIP; #endif } - run(stripprog, stripArgs, to_name, 0); + run(stripprog, stripArgs, to_name, 1); } /*
CVS commit: src/usr.bin/make
Module Name:src Committed By: christos Date: Wed Jun 17 15:34:55 UTC 2015 Added Files: src/usr.bin/make: metachar.c metachar.h Log Message: centralize shell metachar handling. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/usr.bin/make/metachar.c \ src/usr.bin/make/metachar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/usr.bin/make/metachar.c diff -u /dev/null src/usr.bin/make/metachar.c:1.1 --- /dev/null Wed Jun 17 11:34:55 2015 +++ src/usr.bin/make/metachar.c Wed Jun 17 11:34:55 2015 @@ -0,0 +1,77 @@ +/* $NetBSD: metachar.c,v 1.1 2015/06/17 15:34:55 christos Exp $ */ + +/*- + * Copyright (c) 2015 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * 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. + */ +#include +__RCSID("$NetBSD: metachar.c,v 1.1 2015/06/17 15:34:55 christos Exp $"); + +#include "metachar.h" +/* + * The following array is used to make a fast determination of which + * characters are interpreted specially by the shell. If a command + * contains any of these characters, it is executed by the shell, not + * directly by us. + * + * perhaps move it to ctype? + */ + +unsigned char _metachar[128] = { +//nul soh stx etx eot enq ack bel + 1,0,0,0,0,0,0,0, +// bshtnlvtnpcrsosi + 0,1,1,0, 0,0,0,0, +//dle dc1 dc2 dc3 dc4 nak syn etb + 0,0,0,0,0,0,0,0, +//canem sub escfsgsrsus + 0,0,0,0,0,0,0,0, +// sp ! " # $ % & ' + 1,1,1,1,1,0,1,1, +// ( ) * + , - . / + 1,1,1,0,0,0,0,0, +// 0 1 2 3 4 5 6 7 + 0,0,0,0,0,0,0,0, +// 8 9 : ; < = > ? + 0,0,0,1,1,0,1,1, +// @ A B C D E F G + 0,0,0,0,0,0,0,0, +// H I J K L M N O + 0,0,0,0,0,0,0,0, +// P Q R S T U V W + 0,0,0,0,0,0,0,0, +// X Y Z [ \ ] ^ _ + 0,0,0,1,1,1,1,0, +// ` a b c d e f g + 1,0,0,0,0,0,0,0, +// h i j k l m n o + 0,0,0,0,0,0,0,0, +// p q r s t u v w + 0,0,0,0,0,0,0,0, +// x y z { | } ~ del + 0,0,0,1,1,1,1,0, +}; Index: src/usr.bin/make/metachar.h diff -u /dev/null src/usr.bin/make/metachar.h:1.1 --- /dev/null Wed Jun 17 11:34:55 2015 +++ src/usr.bin/make/metachar.h Wed Jun 17 11:34:55 2015 @@ -0,0 +1,51 @@ +/* $NetBSD: metachar.h,v 1.1 2015/06/17 15:34:55 christos Exp $ */ + +/*- + * Copyright (c) 2015 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * 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 di
CVS commit: src/usr.bin/xinstall
Module Name:src Committed By: christos Date: Wed Jun 17 15:34:08 UTC 2015 Modified Files: src/usr.bin/xinstall: Makefile xinstall.c Log Message: Use the bourne shell if the after command has shell metachars. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/usr.bin/xinstall/Makefile cvs rdiff -u -r1.119 -r1.120 src/usr.bin/xinstall/xinstall.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/xinstall/Makefile diff -u src/usr.bin/xinstall/Makefile:1.24 src/usr.bin/xinstall/Makefile:1.25 --- src/usr.bin/xinstall/Makefile:1.24 Mon Jun 15 12:33:38 2015 +++ src/usr.bin/xinstall/Makefile Wed Jun 17 11:34:08 2015 @@ -1,12 +1,15 @@ -# $NetBSD: Makefile,v 1.24 2015/06/15 16:33:38 christos Exp $ +# $NetBSD: Makefile,v 1.25 2015/06/17 15:34:08 christos Exp $ # @(#)Makefile 8.1 (Berkeley) 6/6/93 .include PROG= xinstall -SRCS= xinstall.c getid.c +SRCS= xinstall.c getid.c metachar.c MAN= install.1 +.PATH: ${NETBSDSRCDIR}/usr.bin/make +CPPFLAGS+= -I${NETBSDSRCDIR}/usr.bin/make + .PATH: ${NETBSDSRCDIR}/usr.sbin/mtree CPPFLAGS+= -I${NETBSDSRCDIR}/usr.sbin/mtree CPPFLAGS+= -DHAVE_POSIX_SPAWN Index: src/usr.bin/xinstall/xinstall.c diff -u src/usr.bin/xinstall/xinstall.c:1.119 src/usr.bin/xinstall/xinstall.c:1.120 --- src/usr.bin/xinstall/xinstall.c:1.119 Mon Jun 15 12:33:38 2015 +++ src/usr.bin/xinstall/xinstall.c Wed Jun 17 11:34:08 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: xinstall.c,v 1.119 2015/06/15 16:33:38 christos Exp $ */ +/* $NetBSD: xinstall.c,v 1.120 2015/06/17 15:34:08 christos Exp $ */ /* * Copyright (c) 1987, 1993 @@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1987, 19 #if 0 static char sccsid[] = "@(#)xinstall.c 8.1 (Berkeley) 7/21/93"; #else -__RCSID("$NetBSD: xinstall.c,v 1.119 2015/06/15 16:33:38 christos Exp $"); +__RCSID("$NetBSD: xinstall.c,v 1.120 2015/06/17 15:34:08 christos Exp $"); #endif #endif /* not lint */ @@ -83,6 +83,7 @@ __RCSID("$NetBSD: xinstall.c,v 1.119 201 #include "pathnames.h" #include "mtree.h" +#include "metachar.h" #define BACKUP_SUFFIX ".old" @@ -969,6 +970,7 @@ static void run(const char *command, const char *flags, const char *to_name, int errunlink) { char *args[4]; + char *cmd; int status; int rv; size_t i; @@ -976,10 +978,22 @@ run(const char *command, const char *fla i = 1; status = 0; + if (hasmeta(command)) { + rv = asprintf(&cmd, "%s %s%s%s", command, flags ? flags : "", + flags ? " " : "", to_name); + if (rv < 0) { + warn("Cannot execute %s", command); + goto out; + } + command = _PATH_BSHELL; + flags = "-c"; + } else + cmd = __UNCONST(to_name); + args[0] = __UNCONST(command); if (flags) args[i++] = __UNCONST(flags); - args[i++] = __UNCONST(to_name); + args[i++] = cmd; args[i] = NULL; #ifdef HAVE_POSIX_SPAWN @@ -1018,11 +1032,14 @@ run(const char *command, const char *fla _exit(1); /*NOTREACHED*/ default: - rv = wait(&status); break; } #endif - if ((rv == -1 || status) && errunlink) + rv = wait(&status); + if (cmd != to_name) + free(cmd); +out: + if ((rv < 0 || status) && errunlink) (void)unlink(to_name); }
CVS commit: src/sys/arch
Module Name:src Committed By: martin Date: Wed Jun 17 14:32:32 UTC 2015 Modified Files: src/sys/arch/hppa/include: ansi.h src/sys/arch/i386/include: ansi.h src/sys/arch/m68k/include: ansi.h src/sys/arch/sh3/include: ansi.h src/sys/arch/sparc/include: ansi.h src/sys/arch/usermode/include: ansi.h Log Message: Make clock_t unsigned int everywhere. Ok: matt@, mrg@ To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/hppa/include/ansi.h cvs rdiff -u -r1.26 -r1.27 src/sys/arch/i386/include/ansi.h cvs rdiff -u -r1.23 -r1.24 src/sys/arch/m68k/include/ansi.h cvs rdiff -u -r1.15 -r1.16 src/sys/arch/sh3/include/ansi.h cvs rdiff -u -r1.23 -r1.24 src/sys/arch/sparc/include/ansi.h cvs rdiff -u -r1.4 -r1.5 src/sys/arch/usermode/include/ansi.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/hppa/include/ansi.h diff -u src/sys/arch/hppa/include/ansi.h:1.13 src/sys/arch/hppa/include/ansi.h:1.14 --- src/sys/arch/hppa/include/ansi.h:1.13 Sun Jul 17 20:54:41 2011 +++ src/sys/arch/hppa/include/ansi.h Wed Jun 17 14:32:31 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ansi.h,v 1.13 2011/07/17 20:54:41 joerg Exp $ */ +/* $NetBSD: ansi.h,v 1.14 2015/06/17 14:32:31 martin Exp $ */ /* $OpenBSD: ansi.h,v 1.4 2000/02/22 17:29:12 millert Exp $ */ @@ -48,7 +48,7 @@ * #undef _BSD_SIZE_T_ * #endif */ -#define _BSD_CLOCK_T_ unsigned long int /* clock() */ +#define _BSD_CLOCK_T_ unsigned int /* clock() */ #define _BSD_PTRDIFF_T_ long int /* ptr1 - ptr2 */ #define _BSD_SIZE_T_ unsigned long int /* sizeof() */ #define _BSD_SSIZE_T_ long int /* byte count or error */ Index: src/sys/arch/i386/include/ansi.h diff -u src/sys/arch/i386/include/ansi.h:1.26 src/sys/arch/i386/include/ansi.h:1.27 --- src/sys/arch/i386/include/ansi.h:1.26 Tue Dec 9 14:39:49 2014 +++ src/sys/arch/i386/include/ansi.h Wed Jun 17 14:32:31 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ansi.h,v 1.26 2014/12/09 14:39:49 pooka Exp $ */ +/* $NetBSD: ansi.h,v 1.27 2015/06/17 14:32:31 martin Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -47,7 +47,7 @@ * #undef _BSD_SIZE_T_ * #endif */ -#define _BSD_CLOCK_T_ unsigned long /* clock() */ +#define _BSD_CLOCK_T_ unsigned int /* clock() */ #define _BSD_PTRDIFF_T_ int /* ptr1 - ptr2 */ #define _BSD_SIZE_T_ unsigned int /* sizeof() */ #define _BSD_SSIZE_T_ int /* byte count or error */ Index: src/sys/arch/m68k/include/ansi.h diff -u src/sys/arch/m68k/include/ansi.h:1.23 src/sys/arch/m68k/include/ansi.h:1.24 --- src/sys/arch/m68k/include/ansi.h:1.23 Sun Jul 17 20:54:43 2011 +++ src/sys/arch/m68k/include/ansi.h Wed Jun 17 14:32:31 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ansi.h,v 1.23 2011/07/17 20:54:43 joerg Exp $ */ +/* $NetBSD: ansi.h,v 1.24 2015/06/17 14:32:31 martin Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -46,7 +46,7 @@ * #undef _BSD_SIZE_T_ * #endif */ -#define _BSD_CLOCK_T_ unsigned long /* clock() */ +#define _BSD_CLOCK_T_ unsigned int /* clock() */ #define _BSD_PTRDIFF_T_ int /* ptr1 - ptr2 */ #define _BSD_SIZE_T_ unsigned int /* sizeof() */ #define _BSD_SSIZE_T_ int /* byte count or error */ Index: src/sys/arch/sh3/include/ansi.h diff -u src/sys/arch/sh3/include/ansi.h:1.15 src/sys/arch/sh3/include/ansi.h:1.16 --- src/sys/arch/sh3/include/ansi.h:1.15 Sun Jul 17 20:54:47 2011 +++ src/sys/arch/sh3/include/ansi.h Wed Jun 17 14:32:31 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ansi.h,v 1.15 2011/07/17 20:54:47 joerg Exp $ */ +/* $NetBSD: ansi.h,v 1.16 2015/06/17 14:32:31 martin Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -45,7 +45,7 @@ * #undef _BSD_SIZE_T_ * #endif */ -#define _BSD_CLOCK_T_ unsigned long /* clock() */ +#define _BSD_CLOCK_T_ unsigned int /* clock() */ #define _BSD_PTRDIFF_T_ int /* ptr1 - ptr2 */ #define _BSD_SIZE_T_ unsigned int /* sizeof() */ #define _BSD_SSIZE_T_ int /* byte count or error */ Index: src/sys/arch/sparc/include/ansi.h diff -u src/sys/arch/sparc/include/ansi.h:1.23 src/sys/arch/sparc/include/ansi.h:1.24 --- src/sys/arch/sparc/include/ansi.h:1.23 Sun Jul 17 20:54:47 2011 +++ src/sys/arch/sparc/include/ansi.h Wed Jun 17 14:32:32 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ansi.h,v 1.23 2011/07/17 20:54:47 joerg Exp $ */ +/* $NetBSD: ansi.h,v 1.24 2015/06/17 14:32:32 martin Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -46,7 +46,7 @@ * #undef _BSD_SIZE_T_ * #endif */ -#define _BSD_CLOCK_T_ unsigned long /* clock() */ +#define _BSD_CLOCK_T_ unsigned int /* clock() */ #define _BSD_PTRDIFF_T_ long /* ptr1 - ptr2 */ #define _BSD_SIZE_T_ unsigned long /* sizeof() */ #define _BSD_SSIZE_T_ long /* byte count or error */ Index: src/sys/arch/usermode/include/ansi.h diff -u src/sys/arch/usermode/include/ansi.h:1.4 src/sys/arch/usermode/include/ansi.h:1.5 --- src/sys/arch/usermode/include/ansi.h:1.4 Sun Nov 10 19:52:01 2013 +++ src/sys/arch/usermode/include/ansi.h Wed Jun 17
CVS commit: src/sys/dev/usb
Module Name:src Committed By: nonaka Date: Wed Jun 17 14:20:14 UTC 2015 Modified Files: src/sys/dev/usb: usbdevs Log Message: Added ThinkPad Compact USB keyboard with TrackPoint entry. To generate a diff of this commit: cvs rdiff -u -r1.696 -r1.697 src/sys/dev/usb/usbdevs 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/usbdevs diff -u src/sys/dev/usb/usbdevs:1.696 src/sys/dev/usb/usbdevs:1.697 --- src/sys/dev/usb/usbdevs:1.696 Mon Apr 6 17:15:32 2015 +++ src/sys/dev/usb/usbdevs Wed Jun 17 14:20:14 2015 @@ -1,4 +1,4 @@ -$NetBSD: usbdevs,v 1.696 2015/04/06 17:15:32 bouyer Exp $ +$NetBSD: usbdevs,v 1.697 2015/06/17 14:20:14 nonaka Exp $ /* * Copyright (c) 1998-2004 The NetBSD Foundation, Inc. @@ -1979,8 +1979,9 @@ product LACIE HD 0xa601 Hard Disk product LACIE CDRW 0xa602 CD R/W /* Lenovo products */ -product LENOVO ETHERNET 0x7203 USB 2.0 Ethernet product LENOVO AX88179 0x304b AX88179 USB 3.0 gigabit ethernet controller +product LENOVO COMPACTKBDWTP 0x6047 ThinkPad Compact USB keyboard with TrackPoint +product LENOVO ETHERNET 0x7203 USB 2.0 Ethernet /* Lexar products */ product LEXAR JUMPSHOT 0x0001 jumpSHOT CompactFlash Reader
CVS commit: src/sys/arch
Module Name:src Committed By: martin Date: Wed Jun 17 14:02:47 UTC 2015 Modified Files: src/sys/arch/alpha/include: ansi.h src/sys/arch/sparc64/include: ansi.h Log Message: Make clock_t unsigned To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/arch/alpha/include/ansi.h cvs rdiff -u -r1.17 -r1.18 src/sys/arch/sparc64/include/ansi.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/alpha/include/ansi.h diff -u src/sys/arch/alpha/include/ansi.h:1.24 src/sys/arch/alpha/include/ansi.h:1.25 --- src/sys/arch/alpha/include/ansi.h:1.24 Sun Jul 17 20:54:36 2011 +++ src/sys/arch/alpha/include/ansi.h Wed Jun 17 14:02:47 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ansi.h,v 1.24 2011/07/17 20:54:36 joerg Exp $ */ +/* $NetBSD: ansi.h,v 1.25 2015/06/17 14:02:47 martin Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -47,7 +47,7 @@ * #undef _BSD_SIZE_T_ * #endif */ -#define _BSD_CLOCK_T_ int /* clock() */ +#define _BSD_CLOCK_T_ unsigned int /* clock() */ #define _BSD_PTRDIFF_T_ long /* ptr1 - ptr2 */ #define _BSD_SIZE_T_ unsigned long /* sizeof() */ #define _BSD_SSIZE_T_ long /* byte count or error */ Index: src/sys/arch/sparc64/include/ansi.h diff -u src/sys/arch/sparc64/include/ansi.h:1.17 src/sys/arch/sparc64/include/ansi.h:1.18 --- src/sys/arch/sparc64/include/ansi.h:1.17 Sun Jul 17 20:54:47 2011 +++ src/sys/arch/sparc64/include/ansi.h Wed Jun 17 14:02:47 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ansi.h,v 1.17 2011/07/17 20:54:47 joerg Exp $ */ +/* $NetBSD: ansi.h,v 1.18 2015/06/17 14:02:47 martin Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -46,7 +46,7 @@ * #undef _BSD_SIZE_T_ * #endif */ -#define _BSD_CLOCK_T_ int /* clock() */ +#define _BSD_CLOCK_T_ unsigned int /* clock() */ #define _BSD_PTRDIFF_T_ long /* ptr1 - ptr2 */ #define _BSD_SIZE_T_ unsigned long /* sizeof() */ #define _BSD_SSIZE_T_ long /* byte count or error */
CVS commit: src/sys/arch
Module Name:src Committed By: matt Date: Wed Jun 17 13:52:51 UTC 2015 Modified Files: src/sys/arch/mips/include: ansi.h src/sys/arch/powerpc/include: ansi.h Log Message: Make _BSD_CLOCK_T_ unsigned int so it's the same for IPL32 and LP64 environments. We don't really have a powerpc64 native userland and the mips64 native userland is IPL32 so this shouldn't affect anything. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/arch/mips/include/ansi.h cvs rdiff -u -r1.29 -r1.30 src/sys/arch/powerpc/include/ansi.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/ansi.h diff -u src/sys/arch/mips/include/ansi.h:1.28 src/sys/arch/mips/include/ansi.h:1.29 --- src/sys/arch/mips/include/ansi.h:1.28 Sun Jul 17 20:54:43 2011 +++ src/sys/arch/mips/include/ansi.h Wed Jun 17 13:52:51 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ansi.h,v 1.28 2011/07/17 20:54:43 joerg Exp $ */ +/* $NetBSD: ansi.h,v 1.29 2015/06/17 13:52:51 matt Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -46,7 +46,7 @@ * #undef _BSD_SIZE_T_ * #endif */ -#define _BSD_CLOCK_T_ unsigned long /* clock() */ +#define _BSD_CLOCK_T_ unsigned int /* clock() */ #ifndef __mips_o32 #define _BSD_PTRDIFF_T_ long /* ptr1 - ptr2 */ #define _BSD_SIZE_T_ unsigned long /* sizeof() */ Index: src/sys/arch/powerpc/include/ansi.h diff -u src/sys/arch/powerpc/include/ansi.h:1.29 src/sys/arch/powerpc/include/ansi.h:1.30 --- src/sys/arch/powerpc/include/ansi.h:1.29 Sun Jul 17 20:54:45 2011 +++ src/sys/arch/powerpc/include/ansi.h Wed Jun 17 13:52:51 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ansi.h,v 1.29 2011/07/17 20:54:45 joerg Exp $ */ +/* $NetBSD: ansi.h,v 1.30 2015/06/17 13:52:51 matt Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -46,7 +46,7 @@ * #undef _BSD_SIZE_T_ * #endif */ -#define _BSD_CLOCK_T_ unsigned long /* clock() */ +#define _BSD_CLOCK_T_ unsigned int /* clock() */ #ifdef _LP64 #define _BSD_PTRDIFF_T_ long /* ptr1 - ptr2 */ #define _BSD_SIZE_T_ unsigned long /* sizeof() */
CVS commit: src/sys/rump
Module Name:src Committed By: pooka Date: Wed Jun 17 11:48:06 UTC 2015 Modified Files: src/sys/rump: README.compileopts Log Message: note RUMP_{,LOCK}DEBUG default values To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/rump/README.compileopts Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/README.compileopts diff -u src/sys/rump/README.compileopts:1.12 src/sys/rump/README.compileopts:1.13 --- src/sys/rump/README.compileopts:1.12 Wed Jun 17 11:46:33 2015 +++ src/sys/rump/README.compileopts Wed Jun 17 11:48:06 2015 @@ -1,4 +1,4 @@ - $NetBSD: README.compileopts,v 1.12 2015/06/17 11:46:33 pooka Exp $ + $NetBSD: README.compileopts,v 1.13 2015/06/17 11:48:06 pooka Exp $ This file describes compile-time options for rump kernels. Additionally, NetBSD build options will have an effect. See src/share/mk/bsd.README @@ -18,13 +18,15 @@ effect: Iff "yes", build with -DDIAGNOST RUMP_DEBUG -values: defined / not defined +values: / +defval: effect: Iff defined, build with -DDEBUG. RUMP_LOCKDEBUG -values: defined / not defined +values: / +defval: effect: Iff defined, build with -DLOCKDEBUG.
CVS commit: src/sys/rump
Module Name:src Committed By: pooka Date: Wed Jun 17 11:46:34 UTC 2015 Modified Files: src/sys/rump: README.compileopts src/sys/rump/librump/rumpkern: Makefile.rumpkern Removed Files: src/sys/rump/librump/rumpkern: memalloc.c Log Message: Remove unreal allocators, unconditionally use subr_{kmem,pool}. Will, with other work, allow to tighten the memory allocation hypercall specification to page-granularity allocations in the future. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/rump/README.compileopts cvs rdiff -u -r1.159 -r1.160 src/sys/rump/librump/rumpkern/Makefile.rumpkern cvs rdiff -u -r1.21 -r0 src/sys/rump/librump/rumpkern/memalloc.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/rump/README.compileopts diff -u src/sys/rump/README.compileopts:1.11 src/sys/rump/README.compileopts:1.12 --- src/sys/rump/README.compileopts:1.11 Wed Jun 3 14:40:11 2015 +++ src/sys/rump/README.compileopts Wed Jun 17 11:46:33 2015 @@ -1,4 +1,4 @@ - $NetBSD: README.compileopts,v 1.11 2015/06/03 14:40:11 pooka Exp $ + $NetBSD: README.compileopts,v 1.12 2015/06/17 11:46:33 pooka Exp $ This file describes compile-time options for rump kernels. Additionally, NetBSD build options will have an effect. See src/share/mk/bsd.README @@ -44,16 +44,6 @@ effect: If "yes", build rump kernel with runtime. If "no", build with multiprocessor-capable locking. -RUMP_UNREAL_ALLOCATORS - -values: yes|no -defval: no -effect: If "yes", build version of kmem_alloc, pool and pool_cache - that directly relegate allocation to a hypercall. If "no", - build the regular NetBSD memory allocators which use - page-sized memory allocation hypercalls. - - RUMP_VIRTIF values: yes|no Index: src/sys/rump/librump/rumpkern/Makefile.rumpkern diff -u src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.159 src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.160 --- src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.159 Thu Apr 23 14:49:26 2015 +++ src/sys/rump/librump/rumpkern/Makefile.rumpkern Wed Jun 17 11:46:34 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.rumpkern,v 1.159 2015/04/23 14:49:26 pooka Exp $ +# $NetBSD: Makefile.rumpkern,v 1.160 2015/06/17 11:46:34 pooka Exp $ # .include "${RUMPTOP}/Makefile.rump" @@ -104,12 +104,14 @@ SRCS+= init_sysctl_base.c \ subr_humanize.c \ subr_iostat.c \ subr_kcpuset.c \ + subr_kmem.c \ subr_kobj.c \ subr_log.c \ subr_lwp_specificdata.c \ subr_once.c \ subr_pcq.c \ subr_percpu.c \ + subr_pool.c \ subr_prf.c \ subr_pserialize.c \ subr_specificdata.c \ @@ -156,16 +158,6 @@ SRCS+= kern_time_50.c SRCS+= rndpseudo_50.c .endif -# Set RUMP_UNREAL_ALLOCATORS to "yes" to use memory allocation hypercalls -# directly instead of the kmem/pool allocators backed by hypercalls. -# Direct hypercalls may be a few percent faster, but don't emulate -# all kernel corner cases as well (not to mention if you want to debug the -# allocators themselves). -.if defined(RUMP_UNREAL_ALLOCATORS) && ${RUMP_UNREAL_ALLOCATORS} == "yes" -SRCS+= memalloc.c -.else -SRCS+= subr_kmem.c subr_pool.c -.endif .ifdef RUMP_LOCKDEBUG SRCS+= subr_lockdebug.c