CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: skrll Date: Mon Aug 10 05:40:21 UTC 2020 Modified Files: src/sys/arch/arm/arm32: pmap.c Log Message: More UVMHIST_LOG and a new KASSERT To generate a diff of this commit: cvs rdiff -u -r1.418 -r1.419 src/sys/arch/arm/arm32/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/arch/arm/arm32/pmap.c diff -u src/sys/arch/arm/arm32/pmap.c:1.418 src/sys/arch/arm/arm32/pmap.c:1.419 --- src/sys/arch/arm/arm32/pmap.c:1.418 Mon Aug 10 05:38:43 2020 +++ src/sys/arch/arm/arm32/pmap.c Mon Aug 10 05:40:21 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.418 2020/08/10 05:38:43 skrll Exp $ */ +/* $NetBSD: pmap.c,v 1.419 2020/08/10 05:40:21 skrll Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -192,7 +192,7 @@ #endif #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.418 2020/08/10 05:38:43 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.419 2020/08/10 05:40:21 skrll Exp $"); #include #include @@ -4840,6 +4840,8 @@ pmap_unwire(pmap_t pm, vaddr_t va) } pmap_release_pmap_lock(pm); + + UVMHIST_LOG(pmaphist, " <-- done", 0, 0, 0, 0); } #ifdef ARM_MMU_EXTENDED @@ -5175,6 +5177,11 @@ bool pmap_remove_all(pmap_t pm) { + UVMHIST_FUNC(__func__); + UVMHIST_CALLARGS(pmaphist, "(pm=%#jx)", (uintptr_t)pmap, 0, 0, 0); + + KASSERT(pm != pmap_kernel()); + /* * The vmspace described by this pmap is about to be torn down. * Until pmap_update() is called, UVM will only make calls @@ -5199,6 +5206,8 @@ pmap_remove_all(pmap_t pm) pmap_tlb_asid_release_all(pm); #endif pm->pm_remove_all = true; + + UVMHIST_LOG(pmaphist, " <-- done", 0, 0, 0, 0); return false; }
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: skrll Date: Mon Aug 10 05:38:43 UTC 2020 Modified Files: src/sys/arch/arm/arm32: pmap.c Log Message: In pmag_page_remove initilise pvp after taking the page lock To generate a diff of this commit: cvs rdiff -u -r1.417 -r1.418 src/sys/arch/arm/arm32/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/arch/arm/arm32/pmap.c diff -u src/sys/arch/arm/arm32/pmap.c:1.417 src/sys/arch/arm/arm32/pmap.c:1.418 --- src/sys/arch/arm/arm32/pmap.c:1.417 Fri Jul 10 12:25:09 2020 +++ src/sys/arch/arm/arm32/pmap.c Mon Aug 10 05:38:43 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.417 2020/07/10 12:25:09 skrll Exp $ */ +/* $NetBSD: pmap.c,v 1.418 2020/08/10 05:38:43 skrll Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -192,7 +192,7 @@ #endif #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.417 2020/07/10 12:25:09 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.418 2020/08/10 05:38:43 skrll Exp $"); #include #include @@ -2837,8 +2837,8 @@ pmap_page_remove(struct vm_page_md *md, UVMHIST_FUNC(__func__); UVMHIST_CALLARGS(maphist, "md %#jx pa %#jx", (uintptr_t)md, pa, 0, 0); - struct pv_entry **pvp = _FIRST(>pvh_list); pmap_acquire_page_lock(md); + struct pv_entry **pvp = _FIRST(>pvh_list); if (*pvp == NULL) { #ifdef PMAP_CACHE_VIPT /*
CVS commit: src/share/man/man8/man8.x86
Module Name:src Committed By: uwe Date: Mon Aug 10 01:10:26 UTC 2020 Modified Files: src/share/man/man8/man8.x86: boot.8 Log Message: Formatting fixes for PostScript output. Mostly use .Ar instead of .Va and use -literal, .Ql, etc where appropriate. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/share/man/man8/man8.x86/boot.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man8/man8.x86/boot.8 diff -u src/share/man/man8/man8.x86/boot.8:1.22 src/share/man/man8/man8.x86/boot.8:1.23 --- src/share/man/man8/man8.x86/boot.8:1.22 Sun Aug 9 18:54:59 2020 +++ src/share/man/man8/man8.x86/boot.8 Mon Aug 10 01:10:26 2020 @@ -1,4 +1,4 @@ -.\" $NetBSD: boot.8,v 1.22 2020/08/09 18:54:59 kim Exp $ +.\" $NetBSD: boot.8,v 1.23 2020/08/10 01:10:26 uwe Exp $ .\" .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -99,7 +99,7 @@ master boot record - see .Xr x86/mbr 8 ) . .Ss Normal Operation Once running, a banner similar to the following will appear: -.Bd -unfilled -offset indent +.Bd -literal -offset indent >> NetBSD BIOS Boot, revision 3.0 >> (user@buildhost, builddate) >> Memory: 637/15360 k @@ -113,7 +113,7 @@ In the example above, it will be which is the file .Pa /netbsd on partition -.Dq a +.Dq Li a of the .Nx .Tn MBR @@ -122,7 +122,7 @@ partition of the first hard disk known t .Po which is an .Tn IDE -or similar device - see the +or similar device \(em see the .Sx BUGS section .Pc . @@ -173,9 +173,9 @@ input of these commands: .\" also duplicated in the x86-specific x86/dosboot.8 and x86/pxeboot.8; .\" please try to keep all relevant files synchronized. .Bl -tag -width 04n -offset 04n -.It Ic boot Oo Va device : Oc Ns Oo Va filename Oc Oo Fl 1234abcdmqsvxz Oc +.It Ic boot Oo Ar device Ns Ic \&: Oc Ns Oo Ar filename Oc Oo Fl 1234abcdmqsvxz Oc The default -.Va device +.Ar device will be set to the disk from which the boot loader was loaded. The partition is set to the first match in this list: .Bl -enum @@ -196,22 +196,22 @@ The first partition. .Pp To boot from an alternate disk, the full name of the device should be given at the prompt. -.Va device +.Ar device is of the form -.Va NAME=partition_label +.Li NAME= Ns Ar partition_label when booting from a .Xr gpt 8 partitioned disk. Otherwise, the syntax is -.Xo Va xd -.Op Va N Ns Op Va x +.Xo Ar xd\^ Ns +.Op Ar N\^ Ns Op Ar x .Xc where -.Va xd +.Ar xd is the device from which to boot, -.Va N +.Ar N is the unit number, and -.Va x +.Ar x is the partition letter. .Pp In the latter case, the following list of supported devices may @@ -238,7 +238,7 @@ attribute set. Inner RAIDframe partitions can also be given to the .Ic dev command using he -.Va NAME=partition_label +.Li NAME= Ns Ar partition_label syntax. .El .Pp @@ -261,7 +261,7 @@ Options are: .Bl -tag -width xxx .It Fl 1 Sets the machine-dependent flag -.Sy RB_MD1 +.Dv RB_MD1 in .Va boothowto . In @@ -270,7 +270,7 @@ this disables multiprocessor boot; the kernel will boot in uniprocessor mode. .It Fl 2 Sets the machine-dependent flag -.Sy RB_MD2 +.Dv RB_MD2 in .Va boothowto . In @@ -278,7 +278,7 @@ In this disables ACPI. .It Fl 3 Sets the machine-dependent flag -.Sy RB_MD3 +.Dv RB_MD3 in .Va boothowto . In @@ -286,7 +286,7 @@ In this disables SVS. .It Fl 4 Sets the machine-dependent flag -.Sy RB_MD4 +.Dv RB_MD4 in .Va boothowto . In @@ -294,7 +294,7 @@ In this has no effect. .It Fl a Sets the -.Sy RB_ASKNAME +.Dv RB_ASKNAME flag in .Va boothowto . This causes the kernel to prompt for the root file system device, @@ -302,13 +302,13 @@ the system crash dump device, and the pa .Xr init 8 . .It Fl b Sets the -.Sy RB_HALT +.Dv RB_HALT flag in .Va boothowto . This causes subsequent reboot attempts to halt instead of rebooting. .It Fl c Sets the -.Sy RB_USERCONF +.Dv RB_USERCONF flag in .Va boothowto . This causes the kernel to enter the @@ -320,7 +320,7 @@ allows devices to be enabled or disabled to be modified before the kernel attempts to attach the devices. .It Fl d Sets the -.Sy RB_KDB +.Dv RB_KDB flag in .Va boothowto . Requests the kernel to enter debug mode, in which it @@ -328,76 +328,76 @@ waits for a connection from a kernel deb .Xr ddb 4 . .It Fl m Sets the -.Sy RB_MINIROOT +.Dv RB_MINIROOT flag in .Va boothowto . Informs the kernel that a mini-root file system is present in memory. .It Fl q Sets the -.Sy AB_QUIET +.Dv AB_QUIET flag in .Va boothowto . Boot the system in quiet mode. .It Fl s Sets the -.Sy RB_SINGLE +.Dv RB_SINGLE flag in .Va boothowto . Boot the system in single-user mode. .It Fl v Sets the -.Sy AB_VERBOSE +.Dv AB_VERBOSE flag in .Va boothowto . Boot the system in verbose mode. .It Fl x Sets the -.Sy AB_DEBUG +.Dv AB_DEBUG flag in .Va boothowto . Boot the system with debug
CVS commit: src/etc/defaults
Module Name:src Committed By: gutteridge Date: Sun Aug 9 23:43:58 UTC 2020 Modified Files: src/etc/defaults: npf.boot.conf Log Message: Fix minor typo, it's npf(7), not npf(4) To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/etc/defaults/npf.boot.conf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/defaults/npf.boot.conf diff -u src/etc/defaults/npf.boot.conf:1.2 src/etc/defaults/npf.boot.conf:1.3 --- src/etc/defaults/npf.boot.conf:1.2 Sun Apr 7 02:08:08 2019 +++ src/etc/defaults/npf.boot.conf Sun Aug 9 23:43:58 2020 @@ -1,7 +1,7 @@ -# $NetBSD: npf.boot.conf,v 1.2 2019/04/07 02:08:08 sevan Exp $ +# $NetBSD: npf.boot.conf,v 1.3 2020/08/09 23:43:58 gutteridge Exp $ # # /etc/defaults/npf.boot.conf -- -# initial configuration for npf(4) +# initial configuration for npf(7) # # DO NOT EDIT THIS FILE DIRECTLY; IT MAY BE REPLACED DURING A SYSTEM UPGRADE. # EDIT /etc/npf.boot.conf INSTEAD.
CVS commit: src/share/misc
Module Name:src Committed By: maya Date: Sun Aug 9 22:07:06 UTC 2020 Modified Files: src/share/misc: acronyms.comp Log Message: Add another TOFU To generate a diff of this commit: cvs rdiff -u -r1.309 -r1.310 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.309 src/share/misc/acronyms.comp:1.310 --- src/share/misc/acronyms.comp:1.309 Tue Jul 28 14:35:34 2020 +++ src/share/misc/acronyms.comp Sun Aug 9 22:07:06 2020 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.309 2020/07/28 14:35:34 leot Exp $ +$NetBSD: acronyms.comp,v 1.310 2020/08/09 22:07:06 maya Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -1616,6 +1616,7 @@ TMG transmogrifier TMDS transition minimized differential signaling TMO timeout TOD time of day +TOFU trust on first use TOS terms of service TOS trusted operating system TOS type of service
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Sun Aug 9 21:13:38 UTC 2020 Modified Files: src/share/mk: bsd.host.mk Log Message: Expose 64 bit fileystems API's on Linux and make the default FS API 64 bits Should unbreak newfs's of fs's, using the tool version of newfs. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/share/mk/bsd.host.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.host.mk diff -u src/share/mk/bsd.host.mk:1.4 src/share/mk/bsd.host.mk:1.5 --- src/share/mk/bsd.host.mk:1.4 Sun Feb 25 13:53:23 2018 +++ src/share/mk/bsd.host.mk Sun Aug 9 17:13:38 2020 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.host.mk,v 1.4 2018/02/25 18:53:23 chs Exp $ +# $NetBSD: bsd.host.mk,v 1.5 2020/08/09 21:13:38 christos Exp $ .if !defined(_BSD_HOST_MK_) _BSD_HOST_MK_=1 @@ -65,6 +65,10 @@ HOST_MKDEP?= CC=${HOST_CC:Q} mkdep HOST_MKDEPCXX?= CC=${HOST_CXX:Q} mkdep .endif +.if ${HOST_OSTYPE:MLinux*} +HOST_CPPFLAGS+=-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 +.endif + .if ${NEED_OWN_INSTALL_TARGET} != "no" HOST_INSTALL_FILE?= ${INSTALL} ${COPY} ${PRESERVE} ${RENAME} HOST_INSTALL_DIR?= ${INSTALL} -d
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sun Aug 9 20:49:15 UTC 2020 Modified Files: src/usr.bin/make: lst.c Log Message: make(1): fix inconsistent formatting in lst.c To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/lst.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/lst.c diff -u src/usr.bin/make/lst.c:1.3 src/usr.bin/make/lst.c:1.4 --- src/usr.bin/make/lst.c:1.3 Sat Aug 1 14:47:49 2020 +++ src/usr.bin/make/lst.c Sun Aug 9 20:49:15 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: lst.c,v 1.3 2020/08/01 14:47:49 rillig Exp $ */ +/* $NetBSD: lst.c,v 1.4 2020/08/09 20:49:15 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -36,53 +36,54 @@ #include "make_malloc.h" #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: lst.c,v 1.3 2020/08/01 14:47:49 rillig Exp $"; +static char rcsid[] = "$NetBSD: lst.c,v 1.4 2020/08/09 20:49:15 rillig Exp $"; #else #include #ifndef lint -__RCSID("$NetBSD: lst.c,v 1.3 2020/08/01 14:47:49 rillig Exp $"); +__RCSID("$NetBSD: lst.c,v 1.4 2020/08/09 20:49:15 rillig Exp $"); #endif /* not lint */ #endif typedef struct ListNode { - struct ListNode *prevPtr; /* previous element in list */ - struct ListNode *nextPtr; /* next in list */ - unsigned int useCount:8, /* Count of functions using the node. - * node may not be deleted until count - * goes to 0 */ - flags:8;/* Node status flags */ - void *datum; /* datum associated with this element */ +struct ListNode *prevPtr; /* previous element in list */ +struct ListNode *nextPtr; /* next in list */ +unsigned int useCount: 8, /* Count of functions using the node. + * node may not be deleted until count + * goes to 0 */ + flags: 8; /* Node status flags */ +void *datum; /* datum associated with this element */ } *ListNode; /* * Flags required for synchronization */ -#define LN_DELETED 0x0001 /* List node should be removed when done */ +#define LN_DELETED 0x0001 /* List node should be removed when done */ typedef enum { Head, Middle, Tail, Unknown } Where; -typedef struct List { - ListNode firstPtr; /* first node in list */ - ListNode lastPtr; /* last node in list */ - Boolean isCirc; /* true if the list should be considered - * circular */ +typedef struct List { +ListNode firstPtr; /* first node in list */ +ListNode lastPtr; /* last node in list */ +Boolean isCirc; /* true if the list should be considered + * circular */ /* * fields for sequential access */ - Where atEnd; /* Where in the list the last access was */ - Boolean isOpen; /* true if list has been Lst_Open'ed */ - ListNode curPtr; /* current node, if open. NULL if - * *just* opened */ - ListNode prevPtr; /* Previous node, if open. Used by - * Lst_Remove */ +Where atEnd; /* Where in the list the last access was */ +Boolean isOpen; /* true if list has been Lst_Open'ed */ +ListNode curPtr; /* current node, if open. NULL if + * *just* opened */ +ListNode prevPtr; /* Previous node, if open. Used by + * Lst_Remove */ } *List; /* * PAlloc (var, ptype) -- * Allocate a pointer-typedef structure 'ptype' into the variable 'var' */ -#define PAlloc(var,ptype) var = (ptype) bmake_malloc(sizeof *(var)) +#define PAlloc(var, ptype) \ +var = (ptype) bmake_malloc(sizeof *(var)) /* * LstValid -- @@ -133,7 +134,7 @@ LstIsEmpty(Lst l) Lst Lst_Init(Boolean circ) { -List nList; +List nList; PAlloc (nList, List); @@ -166,11 +167,11 @@ Lst_Init(Boolean circ) Lst Lst_Duplicate(Lst l, DuplicateProc *copyProc) { -Lst nl; -ListNode ln; -List list = l; +Lst nl; +ListNode ln; +List list = l; -if (!LstValid (l)) { +if (!LstValid(l)) { return NULL; } @@ -217,8 +218,8 @@ Lst_Duplicate(Lst l, DuplicateProc *copy void Lst_Destroy(Lst list, FreeProc *freeProc) { -ListNode ln; -ListNode tln = NULL; +ListNode ln; +ListNode tln = NULL; if (list == NULL) return; @@ -233,14 +234,14 @@ Lst_Destroy(Lst list, FreeProc *freeProc if (freeProc) { for (ln = list->firstPtr; ln != NULL; ln = tln) { - tln = ln->nextPtr; - freeProc(ln->datum); - free(ln); + tln = ln->nextPtr; + freeProc(ln->datum); + free(ln); } } else { for (ln = list->firstPtr; ln != NULL; ln = tln) { - tln = ln->nextPtr; - free(ln); + tln = ln->nextPtr; + free(ln); } } @@ -274,18 +275,18 @@ Lst_Destroy(Lst list, FreeProc *freeProc ReturnStatus Lst_InsertBefore(Lst l, LstNode ln, void *d) { -ListNode nLNode; /* new lnode for d */ -ListNode lNode = ln; -List list = l; +ListNode nLNode; /* new lnode for d */ +ListNode lNode = ln; +List list = l; /* * check validity of arguments
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sun Aug 9 19:51:02 UTC 2020 Modified Files: src/usr.bin/make: buf.c cond.c dir.c for.c strlist.c Log Message: make(1): format the source code consistently, at least per file Some files use 4 spaces per indentation level, others use 8. At least for the few files from this commit, they use a consistent style throughout each file now. In Cond_Eval, the #define has changed into an enum since the identifiers need not be visible to the C preprocessor. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/usr.bin/make/buf.c cvs rdiff -u -r1.92 -r1.93 src/usr.bin/make/cond.c cvs rdiff -u -r1.84 -r1.85 src/usr.bin/make/dir.c cvs rdiff -u -r1.62 -r1.63 src/usr.bin/make/for.c cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/strlist.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/buf.c diff -u src/usr.bin/make/buf.c:1.33 src/usr.bin/make/buf.c:1.34 --- src/usr.bin/make/buf.c:1.33 Sun Aug 9 18:52:03 2020 +++ src/usr.bin/make/buf.c Sun Aug 9 19:51:02 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: buf.c,v 1.33 2020/08/09 18:52:03 rillig Exp $ */ +/* $NetBSD: buf.c,v 1.34 2020/08/09 19:51:02 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: buf.c,v 1.33 2020/08/09 18:52:03 rillig Exp $"; +static char rcsid[] = "$NetBSD: buf.c,v 1.34 2020/08/09 19:51:02 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)buf.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: buf.c,v 1.33 2020/08/09 18:52:03 rillig Exp $"); +__RCSID("$NetBSD: buf.c,v 1.34 2020/08/09 19:51:02 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -144,8 +144,8 @@ Buf_AddInt(Buffer *bp, int n) * add enough slop to cope with a '-' sign and a trailing '\0'. */ enum { -bits = sizeof(int) * CHAR_BIT, -buf_size = 1 + (bits + 2) / 3 + 1 + bits = sizeof(int) * CHAR_BIT, + buf_size = 1 + (bits + 2) / 3 + 1 }; char buf[buf_size]; @@ -209,7 +209,7 @@ Buf_Destroy(Buffer *buf, Boolean freeDat } #ifndef BUF_COMPACT_LIMIT -# define BUF_COMPACT_LIMIT 128 /* worthwhile saving */ +# define BUF_COMPACT_LIMIT 128 /* worthwhile saving */ #endif /* Reset the buffer and return its data. Index: src/usr.bin/make/cond.c diff -u src/usr.bin/make/cond.c:1.92 src/usr.bin/make/cond.c:1.93 --- src/usr.bin/make/cond.c:1.92 Sat Aug 8 18:54:04 2020 +++ src/usr.bin/make/cond.c Sun Aug 9 19:51:02 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cond.c,v 1.92 2020/08/08 18:54:04 rillig Exp $ */ +/* $NetBSD: cond.c,v 1.93 2020/08/09 19:51:02 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: cond.c,v 1.92 2020/08/08 18:54:04 rillig Exp $"; +static char rcsid[] = "$NetBSD: cond.c,v 1.93 2020/08/09 19:51:02 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)cond.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: cond.c,v 1.92 2020/08/08 18:54:04 rillig Exp $"); +__RCSID("$NetBSD: cond.c,v 1.93 2020/08/09 19:51:02 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -93,7 +93,7 @@ __RCSID("$NetBSD: cond.c,v 1.92 2020/08/ #include #include -#include/* For strtoul() error checking */ +#include #include"make.h" #include"hash.h" @@ -148,13 +148,13 @@ typedef enum { static Token CondE(Boolean); static CondEvalResult do_Cond_EvalExpression(Boolean *); -static const struct If *if_info;/* Info for current statement */ -static const char *condExpr; /* The expression to parse */ -static Token condPushBack=TOK_NONE; /* Single push-back token used in +static const struct If *if_info; /* Info for current statement */ +static const char *condExpr; /* The expression to parse */ +static Token condPushBack = TOK_NONE; /* Single push-back token used in * parsing */ -static unsigned int cond_depth = 0; /* current .if nesting level */ -static unsigned int cond_min_depth = 0; /* depth at makefile open */ +static unsigned int cond_depth = 0; /* current .if nesting level */ +static unsigned int cond_min_depth = 0; /* depth at makefile open */ /* * Indicate when we should be strict about lhs of comparisons. @@ -168,7 +168,7 @@ static Boolean lhsStrict; static int istoken(const char *str, const char *tok, size_t len) { - return strncmp(str, tok, len) == 0 && !isalpha((unsigned char)str[len]); +return strncmp(str, tok, len) == 0 && !isalpha((unsigned char)str[len]); } /* Push back the most recent token read. We only need one level of @@ -191,11 +191,11 @@ static int CondGetArg(Boolean doEval, const char **linePtr, char **argPtr, const char *func) { -const char *cp; -
CVS commit: src/share/man/man8/man8.x86
Module Name:src Committed By: kim Date: Sun Aug 9 18:54:59 UTC 2020 Modified Files: src/share/man/man8/man8.x86: boot.8 Log Message: Fix cross-refs to x86/mbr that were still missing x86 Additionally made some typo fixes, and added some vertical whitespace to lists that felt crowded. Unified markup for displaying commands. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/share/man/man8/man8.x86/boot.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man8/man8.x86/boot.8 diff -u src/share/man/man8/man8.x86/boot.8:1.21 src/share/man/man8/man8.x86/boot.8:1.22 --- src/share/man/man8/man8.x86/boot.8:1.21 Wed Jul 15 12:38:30 2020 +++ src/share/man/man8/man8.x86/boot.8 Sun Aug 9 18:54:59 2020 @@ -1,4 +1,4 @@ -.\" $NetBSD: boot.8,v 1.21 2020/07/15 12:38:30 kim Exp $ +.\" $NetBSD: boot.8,v 1.22 2020/08/09 18:54:59 kim Exp $ .\" .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -178,7 +178,7 @@ The default .Va device will be set to the disk from which the boot loader was loaded. The partition is set to the first match in this list: -.Bl -enum -compact +.Bl -enum .It The first .Xr gpt 8 @@ -193,6 +193,7 @@ The first partition with a file system t .It The first partition. .El +.Pp To boot from an alternate disk, the full name of the device should be given at the prompt. .Va device @@ -213,10 +214,9 @@ is the unit number, and .Va x is the partition letter. .Pp -In the later case, the following list of supported devices may +In the latter case, the following list of supported devices may vary from installation to installation: -.Pp -.Bl -hang -compact +.Bl -hang .It hd Hard disks as numbered by the BIOS. This includes ST506, IDE, ESDI, RLL disks on a WD100[2367] or @@ -767,7 +767,7 @@ directory in a formatted partition of type .Tn EFI (Either -.Xr mbr 8 +.Xr x86/mbr 8 and .Xr gpt 8 , see the @@ -839,10 +839,10 @@ disklabel (if it is a hard disk). .Pp .Tn UEFI implementation are supposed to support either -.Xr mbr 8 +.Xr x86/mbr 8 or .Xr gpt 8 -partitionning, but some do not handle the later. +partitioning, but some do not handle the latter. .Tn UEFI Booting from a @@ -851,17 +851,20 @@ partitioned disk is still possible in th an overlapping .Tn EFI partition in the protective -.Xr mbr 8 +.Xr x86/mbr 8 block. This can be achieved using the following commands (you must adapt the hard disk and .Tn EFI partition start end size to fit your setup): -.Dl Ic dd if=/dev/rwd0d bs=512 count=1 of=mbr -.Dl Ic fdisk -FIfaui1s 4/34/32768 -c /usr/mdec/mbr mbr -.Dl Ic dd if=mbr bs=512 count=1 of=/dev/rwd0d conv=notrunc +.Bd -unfilled -offset indent +.Cm dd if=/dev/rwd0d bs=512 count=1 of=mbr +.Cm fdisk -FIfaui1s 4/34/32768 -c /usr/mdec/mbr mbr +.Cm dd if=mbr bs=512 count=1 of=/dev/rwd0d conv=notrunc +.Ed +.Pp The resulting -.Xr mbr 8 +.Xr x86/mbr 8 partition table will look like this: .Bd -unfilled -offset indent 0: GPT Protective MBR (sysid 238)
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sun Aug 9 18:52:03 UTC 2020 Modified Files: src/usr.bin/make: buf.c Log Message: make(1): fix variable length array in Buf_AddInt GCC 5 complained about this, but only when make is build with both USE_COVERAGE=yes and USE_FORT=yes. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/usr.bin/make/buf.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/buf.c diff -u src/usr.bin/make/buf.c:1.32 src/usr.bin/make/buf.c:1.33 --- src/usr.bin/make/buf.c:1.32 Sat Aug 8 18:54:04 2020 +++ src/usr.bin/make/buf.c Sun Aug 9 18:52:03 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: buf.c,v 1.32 2020/08/08 18:54:04 rillig Exp $ */ +/* $NetBSD: buf.c,v 1.33 2020/08/09 18:52:03 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: buf.c,v 1.32 2020/08/08 18:54:04 rillig Exp $"; +static char rcsid[] = "$NetBSD: buf.c,v 1.33 2020/08/09 18:52:03 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)buf.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: buf.c,v 1.32 2020/08/08 18:54:04 rillig Exp $"); +__RCSID("$NetBSD: buf.c,v 1.33 2020/08/09 18:52:03 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -143,8 +143,11 @@ Buf_AddInt(Buffer *bp, int n) * We calculate the space needed for the octal representation, and * add enough slop to cope with a '-' sign and a trailing '\0'. */ -size_t bits = sizeof(int) * CHAR_BIT; -char buf[1 + (bits + 2) / 3 + 1]; +enum { +bits = sizeof(int) * CHAR_BIT, +buf_size = 1 + (bits + 2) / 3 + 1 +}; +char buf[buf_size]; size_t len = (size_t)snprintf(buf, sizeof buf, "%d", n); Buf_AddBytes(bp, buf, len);
CVS commit: src/share/misc
Module Name:src Committed By: nia Date: Sun Aug 9 17:18:47 UTC 2020 Modified Files: src/share/misc: acronyms-o.real Log Message: TIFU To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/share/misc/acronyms-o.real Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms-o.real diff -u src/share/misc/acronyms-o.real:1.8 src/share/misc/acronyms-o.real:1.9 --- src/share/misc/acronyms-o.real:1.8 Sat Jun 6 17:39:35 2020 +++ src/share/misc/acronyms-o.real Sun Aug 9 17:18:47 2020 @@ -1,4 +1,4 @@ -# $NetBSD: acronyms-o.real,v 1.8 2020/06/06 17:39:35 nia Exp $ +# $NetBSD: acronyms-o.real,v 1.9 2020/08/09 17:18:47 nia Exp $ ACAB all cops are bastards AFU all fucked up AYFKM are you fucking kidding me @@ -63,6 +63,7 @@ STFA search the fucking archives STFU shut the fuck up STFW search the fucking web SWFG search with fucking Google +TIFU today I fucked up TU tits up WOFTAM waste of fucking time and money WTF {what,when,where,who,why} the fuck
CVS commit: src
Module Name:src Committed By: rillig Date: Sun Aug 9 16:32:29 UTC 2020 Modified Files: src/distrib/sets/lists/tests: mi src/usr.bin/make/unit-tests: Makefile Added Files: src/usr.bin/make/unit-tests: use-inference.exp use-inference.mk Log Message: make(1): add test for .USE combined with inference rule without commands Discovered by christos. To generate a diff of this commit: cvs rdiff -u -r1.887 -r1.888 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.90 -r1.91 src/usr.bin/make/unit-tests/Makefile cvs rdiff -u -r0 -r1.1 src/usr.bin/make/unit-tests/use-inference.exp \ src/usr.bin/make/unit-tests/use-inference.mk 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/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.887 src/distrib/sets/lists/tests/mi:1.888 --- src/distrib/sets/lists/tests/mi:1.887 Sun Aug 9 12:59:16 2020 +++ src/distrib/sets/lists/tests/mi Sun Aug 9 16:32:28 2020 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.887 2020/08/09 12:59:16 rillig Exp $ +# $NetBSD: mi,v 1.888 2020/08/09 16:32:28 rillig Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -4616,6 +4616,8 @@ ./usr/tests/usr.bin/make/unit-tests/unexport-env.mk tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/make/unit-tests/unexport.exp tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/make/unit-tests/unexport.mk tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/make/unit-tests/use-inference.exp tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/make/unit-tests/use-inference.mk tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/make/unit-tests/varcmd.exp tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/make/unit-tests/varcmd.mk tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/make/unit-tests/vardebug.exp tests-usr.bin-tests compattestfile,atf Index: src/usr.bin/make/unit-tests/Makefile diff -u src/usr.bin/make/unit-tests/Makefile:1.90 src/usr.bin/make/unit-tests/Makefile:1.91 --- src/usr.bin/make/unit-tests/Makefile:1.90 Sun Aug 9 12:59:16 2020 +++ src/usr.bin/make/unit-tests/Makefile Sun Aug 9 16:32:28 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.90 2020/08/09 12:59:16 rillig Exp $ +# $NetBSD: Makefile,v 1.91 2020/08/09 16:32:28 rillig Exp $ # # Unit tests for make(1) # @@ -79,6 +79,7 @@ TESTS+= sysv TESTS+= ternary TESTS+= unexport TESTS+= unexport-env +TESTS+= use-inference TESTS+= varcmd TESTS+= vardebug TESTS+= varfind Added files: Index: src/usr.bin/make/unit-tests/use-inference.exp diff -u /dev/null src/usr.bin/make/unit-tests/use-inference.exp:1.1 --- /dev/null Sun Aug 9 16:32:29 2020 +++ src/usr.bin/make/unit-tests/use-inference.exp Sun Aug 9 16:32:28 2020 @@ -0,0 +1,4 @@ +Building use-inference.from from nothing +make: don't know how to make use-inference.to (continuing) +`all' not remade because of errors. +exit status 0 Index: src/usr.bin/make/unit-tests/use-inference.mk diff -u /dev/null src/usr.bin/make/unit-tests/use-inference.mk:1.1 --- /dev/null Sun Aug 9 16:32:29 2020 +++ src/usr.bin/make/unit-tests/use-inference.mk Sun Aug 9 16:32:28 2020 @@ -0,0 +1,35 @@ +# $NetBSD: use-inference.mk,v 1.1 2020/08/09 16:32:28 rillig Exp $ +# +# Demonstrate that .USE rules do not have an effect on inference rules. +# At least not in the special case where the inference rule does not +# have any associated commands. + +.SUFFIXES: +.SUFFIXES: .from .to + +all: use-inference.to + +verbose: .USE + @echo 'Verbosely making $@ out of $>' + +.from.to: verbose +# Since this inference rule does not have any associated commands, it +# is ignored. +# +# @echo 'Building $@ from $<' + +use-inference.from: # assume it exists + @echo 'Building $@ from nothing' + +# Possible but unproven explanation: +# +# The main target is "all", which depends on "use-inference.to". +# The inference connects the .from to the .to file, otherwise make +# would not know that the .from file would need to be built. +# +# The .from file is then built. +# +# After this, make stops since it doesn't know how to make the .to file. +# This is strange since make definitely knows about the .from.to suffix +# inference rule. But it seems to ignore it, maybe because it doesn't +# have any associated commands.
CVS commit: xsrc/external/mit/xorg-server.old/dist/hw/sun
Module Name:xsrc Committed By: tsutsui Date: Sun Aug 9 16:01:19 UTC 2020 Modified Files: xsrc/external/mit/xorg-server.old/dist/hw/sun: sun.h sunCfb.c sunInit.c sunIo.c Log Message: Cherry-pick to sync with xorg-server: Inform detected keyboard type and layout via LogMessage(). Remove a leftover variable for non-XKB autorepeat. Remove redundant command option arg checks. Put probed framebuffer info to a log file by default. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 xsrc/external/mit/xorg-server.old/dist/hw/sun/sun.h \ xsrc/external/mit/xorg-server.old/dist/hw/sun/sunCfb.c \ xsrc/external/mit/xorg-server.old/dist/hw/sun/sunIo.c cvs rdiff -u -r1.3 -r1.4 \ xsrc/external/mit/xorg-server.old/dist/hw/sun/sunInit.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xorg-server.old/dist/hw/sun/sun.h diff -u xsrc/external/mit/xorg-server.old/dist/hw/sun/sun.h:1.2 xsrc/external/mit/xorg-server.old/dist/hw/sun/sun.h:1.3 --- xsrc/external/mit/xorg-server.old/dist/hw/sun/sun.h:1.2 Sat Aug 1 13:40:55 2020 +++ xsrc/external/mit/xorg-server.old/dist/hw/sun/sun.h Sun Aug 9 16:01:19 2020 @@ -295,10 +295,11 @@ typedef struct { /* sunInit.c */ extern EventList *sunEvents; -extern Bool sunAutoRepeatHandlersInstalled; extern sunFbDataRec sunFbData[]; extern fbFd sunFbs[]; extern Bool sunSwapLkeys; +extern Bool sunForceMono; +extern Bool sunDebug; extern Bool sunFlipPixels; extern Bool sunFbInfo; extern Bool sunCG4Frob; Index: xsrc/external/mit/xorg-server.old/dist/hw/sun/sunCfb.c diff -u xsrc/external/mit/xorg-server.old/dist/hw/sun/sunCfb.c:1.2 xsrc/external/mit/xorg-server.old/dist/hw/sun/sunCfb.c:1.3 --- xsrc/external/mit/xorg-server.old/dist/hw/sun/sunCfb.c:1.2 Sat Aug 1 13:40:55 2020 +++ xsrc/external/mit/xorg-server.old/dist/hw/sun/sunCfb.c Sun Aug 9 16:01:19 2020 @@ -98,7 +98,7 @@ static void CGSaveColormap(ScreenPtr); static void CGRestoreColormap(ScreenPtr); static void CGScreenInitCommon(ScreenPtr); static void CGScreenInit(ScreenPtr); -static void checkMono(int, char **); +static void checkMono(void); #ifdef INCLUDE_CG2_HEADER static void CG2UpdateColormap(ScreenPtr, int, int, u_char *, u_char *, u_char *); static void CG2GetColormap(ScreenPtr, int, int, u_char *, u_char *, u_char *); @@ -307,13 +307,11 @@ CGScreenInit(ScreenPtr pScreen) } static void -checkMono(int argc, char** argv) +checkMono(void) { -int i; -for (i = 1; i < argc; i++) - if (strcmp (argv[i], "-mono") == 0) - ErrorF ("-mono not appropriate for CG3/CG4/CG6\n"); +if (sunForceMono) + ErrorF("-mono not appropriate for CG3/CG4/CG6\n"); } /* @@ -334,7 +332,7 @@ sunCG3Init( char **argv /* The arguments themselves. Don't change! */ ) { -checkMono (argc, argv); +checkMono(); sunFbs[screen].EnterLeave = (void (*)(ScreenPtr, int))NoopDDA; return sunInitCommon (screen, pScreen, (off_t) CG3_MMAP_OFFSET, sunCfbScreenInit, CGScreenInit, @@ -349,7 +347,7 @@ sunTCXInit( char **argv /* The arguments themselves. Don't change! */ ) { -checkMono (argc, argv); +checkMono(); sunFbs[screen].EnterLeave = (void (*)(ScreenPtr, int))NoopDDA; return sunInitCommon (screen, pScreen, (off_t) 0, sunCfbScreenInit, CGScreenInit, @@ -454,18 +452,12 @@ sunCG2Init( char** argv /* The arguments themselves. Don't change! */ ) { -int i; Bool ret; -Bool mono = FALSE; - -for (i = 1; i < argc; i++) - if (strcmp (argv[i], "-mono") == 0) - mono = TRUE; sunFbs[screen].EnterLeave = (void (*)(ScreenPtr, int))NoopDDA; pScreen->SaveScreen = CG2SaveScreen; #ifndef LOWMEMFTPT -if (mono) { +if (sunForceMono) { pScreen->whitePixel = 0; pScreen->blackPixel = 1; sunFbs[screen].info.fb_depth = 1; @@ -514,7 +506,7 @@ sunCG4Init( char** argv /* The arguments themselves. Don't change! */ ) { -checkMono (argc, argv); +checkMono(); if (sunCG4Frob) sunFbs[screen].EnterLeave = (void (*)(ScreenPtr, int))NoopDDA; else @@ -539,7 +531,7 @@ sunCG6Init( { pointer fb; -checkMono (argc, argv); +checkMono(); if (!sunScreenAllocate (pScreen)) return FALSE; if (!sunFbs[screen].fb) { Index: xsrc/external/mit/xorg-server.old/dist/hw/sun/sunIo.c diff -u xsrc/external/mit/xorg-server.old/dist/hw/sun/sunIo.c:1.2 xsrc/external/mit/xorg-server.old/dist/hw/sun/sunIo.c:1.3 --- xsrc/external/mit/xorg-server.old/dist/hw/sun/sunIo.c:1.2 Tue Aug 4 14:34:35 2020 +++ xsrc/external/mit/xorg-server.old/dist/hw/sun/sunIo.c Sun Aug 9 16:01:19 2020 @@ -205,6 +205,7 @@ ddxProcessArgument(int argc, char *argv[ return 1; } if (strcmp (argv[i], "-debug") == 0) { /* -debug */ + sunDebug = TRUE; return 1; } if (strcmp (argv[i], "-dev") == 0) { /* -dev /dev/mumble */ @@ -212,6 +213,7 @@
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sun Aug 9 15:54:13 UTC 2020 Modified Files: src/usr.bin/make: Makefile.boot Log Message: make(1): clean up Makefile.boot The previous version stopped working in 2015, when metachar.c was added. Since then, lst.c and enum.c have been added, and the lst.lib directory has gone. To build bmake on Cygwin, some extra CFLAGS are necessary for some of the files. Compilation succeeded by first building the majority of files with "bmake -f Makefile.boot EXTRA_CFLAGS=-DMAKE_NATIVE", and the remaining files with "-UMAKE_NATIVE". Reorganize the file structure to put the most likely configuration into the top paragraph, with all variable values nicely aligned. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/usr.bin/make/Makefile.boot 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.boot diff -u src/usr.bin/make/Makefile.boot:1.21 src/usr.bin/make/Makefile.boot:1.22 --- src/usr.bin/make/Makefile.boot:1.21 Mon Feb 24 07:23:44 2014 +++ src/usr.bin/make/Makefile.boot Sun Aug 9 15:54:13 2020 @@ -1,45 +1,39 @@ -# $NetBSD: Makefile.boot,v 1.21 2014/02/24 07:23:44 skrll Exp $ +# $NetBSD: Makefile.boot,v 1.22 2020/08/09 15:54:13 rillig Exp $ # -# a very simple makefile... +# A very simple makefile... # # You only want to use this if you aren't running NetBSD. # -# modify MACHINE and MACHINE_ARCH as appropriate for your target architecture +# Modify MACHINE and MACHINE_ARCH as appropriate for your target architecture. +# See config.h and the various #ifdef directives for further configuration. # -CC=gcc -O -g + +PROG= bmake +MACHINE= i386 +MACHINE_ARCH= i386 +CC= gcc +CFLAGS= -O -g +EXTRA_CFLAGS= +EXTRA_LIBS= + +OBJS= arch.o buf.o compat.o cond.o dir.o enum.o for.o hash.o \ + job.o lst.o main.o make.o make_malloc.o metachar.o parse.o \ + str.o strlist.o suff.o targ.o trace.o var.o util.o .c.o: - ${CC} ${CFLAGS} -c $< -o $@ + ${CC} ${CPPFLAGS} ${CFLAGS} ${EXTRA_CFLAGS} -c $< -o $@ -MACHINE=i386 -MACHINE_ARCH=i386 -# tested on HP-UX 10.20 -#MAKE_MACHINE=hppa -#MAKE_MACHINE_ARCH=hppa -CFLAGS= -DTARGET_MACHINE=\"${MACHINE}\" \ +CPPFLAGS= \ + -DTARGET_MACHINE=\"${MACHINE}\" \ -DTARGET_MACHINE_ARCH=\"${MACHINE_ARCH}\" \ -DMAKE_MACHINE=\"${MACHINE}\" -LIBS= - -OBJ=arch.o buf.o compat.o cond.o dir.o for.o hash.o job.o main.o make.o \ -make_malloc.o parse.o str.o strlist.o suff.o targ.o trace.o var.o util.o -LIBOBJ= lst.lib/lstAppend.o lst.lib/lstAtEnd.o lst.lib/lstAtFront.o \ - lst.lib/lstClose.o lst.lib/lstConcat.o lst.lib/lstDatum.o \ - lst.lib/lstDeQueue.o lst.lib/lstDestroy.o lst.lib/lstDupl.o \ - lst.lib/lstEnQueue.o lst.lib/lstFind.o lst.lib/lstFindFrom.o \ - lst.lib/lstFirst.o lst.lib/lstForEach.o lst.lib/lstForEachFrom.o \ - lst.lib/lstInit.o lst.lib/lstInsert.o lst.lib/lstIsAtEnd.o \ - lst.lib/lstIsEmpty.o lst.lib/lstLast.o lst.lib/lstMember.o \ - lst.lib/lstNext.o lst.lib/lstOpen.o lst.lib/lstRemove.o \ - lst.lib/lstReplace.o lst.lib/lstSucc.o lst.lib/lstPrev.o - -bmake: ${OBJ} ${LIBOBJ} -# @echo 'make of make and make.0 started.' - ${CC} ${CFLAGS} ${OBJ} ${LIBOBJ} -o bmake ${LIBS} +${PROG}: ${OBJS} +# @echo 'make of ${PROG} and make.0 started.' + ${CC} ${CFLAGS} ${OBJS} -o $@ ${EXTRA_LIBS} @ls -l $@ # nroff -h -man make.1 > make.0 -# @echo 'make of make and make.0 completed.' +# @echo 'make of ${PROG} and make.0 completed.' clean: - rm -f ${OBJ} ${LIBOBJ} ${PORTOBJ} bmake + rm -f ${OBJS} ${PROG}
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: christos Date: Sun Aug 9 15:32:44 UTC 2020 Modified Files: src/sys/arch/x86/x86: cpu.c x86_machdep.c Log Message: move lcall sniffer to x86_machdep since xen/pv has its own cpu.c To generate a diff of this commit: cvs rdiff -u -r1.197 -r1.198 src/sys/arch/x86/x86/cpu.c cvs rdiff -u -r1.145 -r1.146 src/sys/arch/x86/x86/x86_machdep.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/x86/cpu.c diff -u src/sys/arch/x86/x86/cpu.c:1.197 src/sys/arch/x86/x86/cpu.c:1.198 --- src/sys/arch/x86/x86/cpu.c:1.197 Sat Aug 8 15:08:48 2020 +++ src/sys/arch/x86/x86/cpu.c Sun Aug 9 11:32:44 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.197 2020/08/08 19:08:48 christos Exp $ */ +/* $NetBSD: cpu.c,v 1.198 2020/08/09 15:32:44 christos Exp $ */ /* * Copyright (c) 2000-2020 NetBSD Foundation, Inc. @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.197 2020/08/08 19:08:48 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.198 2020/08/09 15:32:44 christos Exp $"); #include "opt_ddb.h" #include "opt_mpbios.h" /* for MPDEBUG */ @@ -1451,26 +1451,3 @@ cpu_kick(struct cpu_info *ci) { x86_send_ipi(ci, X86_IPI_AST); } - -int -x86_cpu_is_lcall(const void *ip) -{ -static const uint8_t lcall[] = { 0x9a, 0, 0, 0, 0 }; - int error; -const size_t sz = sizeof(lcall) + 2; -uint8_t tmp[sizeof(lcall) + 2]; - - if ((error = copyin(ip, tmp, sz)) != 0) - return error; - - if (memcmp(tmp, lcall, sizeof(lcall)) != 0 || tmp[sz - 1] != 0) - return EINVAL; - - switch (tmp[sz - 2]) { -case (uint8_t)0x07: /* NetBSD */ - case (uint8_t)0x87: /* BSD/OS */ - return 0; - default: - return EINVAL; -} -} Index: src/sys/arch/x86/x86/x86_machdep.c diff -u src/sys/arch/x86/x86/x86_machdep.c:1.145 src/sys/arch/x86/x86/x86_machdep.c:1.146 --- src/sys/arch/x86/x86/x86_machdep.c:1.145 Sun Jul 19 10:31:31 2020 +++ src/sys/arch/x86/x86/x86_machdep.c Sun Aug 9 11:32:44 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: x86_machdep.c,v 1.145 2020/07/19 14:31:31 maxv Exp $ */ +/* $NetBSD: x86_machdep.c,v 1.146 2020/08/09 15:32:44 christos Exp $ */ /*- * Copyright (c) 2002, 2006, 2007 YAMAMOTO Takashi, @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.145 2020/07/19 14:31:31 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.146 2020/08/09 15:32:44 christos Exp $"); #include "opt_modular.h" #include "opt_physmem.h" @@ -1508,3 +1508,26 @@ cpu_initclocks(void) /* Now start the clocks on this CPU (the boot CPU). */ (*x86_initclock_func)(); } + +int +x86_cpu_is_lcall(const void *ip) +{ +static const uint8_t lcall[] = { 0x9a, 0, 0, 0, 0 }; + int error; +const size_t sz = sizeof(lcall) + 2; +uint8_t tmp[sizeof(lcall) + 2]; + + if ((error = copyin(ip, tmp, sz)) != 0) + return error; + + if (memcmp(tmp, lcall, sizeof(lcall)) != 0 || tmp[sz - 1] != 0) + return EINVAL; + + switch (tmp[sz - 2]) { +case (uint8_t)0x07: /* NetBSD */ + case (uint8_t)0x87: /* BSD/OS */ + return 0; + default: + return EINVAL; +} +}
CVS commit: src/usr.bin/make/unit-tests
Module Name:src Committed By: rillig Date: Sun Aug 9 15:15:29 UTC 2020 Modified Files: src/usr.bin/make/unit-tests: moderrs.exp moderrs.mk Log Message: make(1): improve test for undefined subexpression in :C modifier In the previous test output, it was unnecessarily hard to see what happens because of the many empty strings. Enclosing the capturing groups in parentheses helps against this. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/usr.bin/make/unit-tests/moderrs.exp cvs rdiff -u -r1.13 -r1.14 src/usr.bin/make/unit-tests/moderrs.mk 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/unit-tests/moderrs.exp diff -u src/usr.bin/make/unit-tests/moderrs.exp:1.14 src/usr.bin/make/unit-tests/moderrs.exp:1.15 --- src/usr.bin/make/unit-tests/moderrs.exp:1.14 Sun Aug 9 15:03:25 2020 +++ src/usr.bin/make/unit-tests/moderrs.exp Sun Aug 9 15:15:29 2020 @@ -96,7 +96,7 @@ make: No match for subexpression \2 make: No match for subexpression \1 make: No match for subexpression \2 make: No match for subexpression \1 -+ + + 3 5 8 3+ +1 34 +()+() ()+() ()+() 3 5 8 (3)+() ()+(1) 34 mod-ts-parse: 112358132134 15152535558513521534 Index: src/usr.bin/make/unit-tests/moderrs.mk diff -u src/usr.bin/make/unit-tests/moderrs.mk:1.13 src/usr.bin/make/unit-tests/moderrs.mk:1.14 --- src/usr.bin/make/unit-tests/moderrs.mk:1.13 Sun Aug 9 15:03:25 2020 +++ src/usr.bin/make/unit-tests/moderrs.mk Sun Aug 9 15:15:29 2020 @@ -1,4 +1,4 @@ -# $Id: moderrs.mk,v 1.13 2020/08/09 15:03:25 rillig Exp $ +# $Id: moderrs.mk,v 1.14 2020/08/09 15:15:29 rillig Exp $ # # various modifier error tests @@ -140,7 +140,7 @@ mod-regex-delimiter: mod-regex-undefined-subexpression: @echo $@: @echo ${FIB:C,1(.*),one\1,} # all ok - @echo ${FIB:C,1(.*)|2(.*),\1+\2,} # no match for subexpression + @echo ${FIB:C,1(.*)|2(.*),(\1)+(\2),:Q} # no match for subexpression mod-ts-parse: @echo $@:
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sun Aug 9 15:07:13 UTC 2020 Modified Files: src/usr.bin/make: var.c Log Message: make(1): clean up code for subexpressions in the :C modifier An ampersand in the replacement string can never produce an out-of-bounds error or an undefined-subexpression error. This makes the error message simpler since it only needs to cover the case of a single digit. To generate a diff of this commit: cvs rdiff -u -r1.444 -r1.445 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/var.c diff -u src/usr.bin/make/var.c:1.444 src/usr.bin/make/var.c:1.445 --- src/usr.bin/make/var.c:1.444 Sun Aug 9 14:30:35 2020 +++ src/usr.bin/make/var.c Sun Aug 9 15:07:13 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: var.c,v 1.444 2020/08/09 14:30:35 rillig Exp $ */ +/* $NetBSD: var.c,v 1.445 2020/08/09 15:07:13 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: var.c,v 1.444 2020/08/09 14:30:35 rillig Exp $"; +static char rcsid[] = "$NetBSD: var.c,v 1.445 2020/08/09 15:07:13 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: var.c,v 1.444 2020/08/09 14:30:35 rillig Exp $"); +__RCSID("$NetBSD: var.c,v 1.445 2020/08/09 15:07:13 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -1384,36 +1384,34 @@ tryagain: if (*rp == '\\' && (rp[1] == '&' || rp[1] == '\\')) { SepBuf_AddBytes(buf, rp + 1, 1); rp++; - } else if (*rp == '&' || - (*rp == '\\' && isdigit((unsigned char)rp[1]))) { - int n; - char errstr[3]; - - if (*rp == '&') { - n = 0; - errstr[0] = '&'; - errstr[1] = '\0'; - } else { - n = rp[1] - '0'; - errstr[0] = '\\'; - errstr[1] = rp[1]; - errstr[2] = '\0'; - rp++; - } + continue; + } + + if (*rp == '&') { + SepBuf_AddBytesBetween(buf, wp + m[0].rm_so, wp + m[0].rm_eo); + continue; + } + + if (*rp != '\\' || !isdigit((unsigned char)rp[1])) { + SepBuf_AddBytes(buf, rp, 1); + continue; + } + + { /* \0 to \9 backreference */ + int n = rp[1] - '0'; + rp++; if (n >= args->nsub) { - Error("No subexpression %s", errstr); + Error("No subexpression \\%d", n); } else if (m[n].rm_so == -1 && m[n].rm_eo == -1) { - Error("No match for subexpression %s", errstr); + Error("No match for subexpression \\%d", n); } else { SepBuf_AddBytesBetween(buf, wp + m[n].rm_so, wp + m[n].rm_eo); } - - } else { - SepBuf_AddBytes(buf, rp, 1); } } + wp += m[0].rm_eo; if (args->pflags & VARP_SUB_GLOBAL) { flags |= REG_NOTBOL;
CVS commit: src/usr.bin/make/unit-tests
Module Name:src Committed By: rillig Date: Sun Aug 9 15:03:25 UTC 2020 Modified Files: src/usr.bin/make/unit-tests: moderrs.exp moderrs.mk Log Message: make(1): add test for undefined subexpression in the :C modifier To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/usr.bin/make/unit-tests/moderrs.exp cvs rdiff -u -r1.12 -r1.13 src/usr.bin/make/unit-tests/moderrs.mk 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/unit-tests/moderrs.exp diff -u src/usr.bin/make/unit-tests/moderrs.exp:1.13 src/usr.bin/make/unit-tests/moderrs.exp:1.14 --- src/usr.bin/make/unit-tests/moderrs.exp:1.13 Sat Aug 8 13:27:42 2020 +++ src/usr.bin/make/unit-tests/moderrs.exp Sun Aug 9 15:03:25 2020 @@ -89,6 +89,14 @@ make: Unfinished modifier for VAR (',' m make: Unclosed variable specification (expecting '}') for "VAR" (value "TheVariable") modifier C TheVariable TheVariable +mod-regex-undefined-subexpression: +one one 2 3 5 8 one3 2one 34 +make: No match for subexpression \2 +make: No match for subexpression \2 +make: No match for subexpression \1 +make: No match for subexpression \2 +make: No match for subexpression \1 ++ + + 3 5 8 3+ +1 34 mod-ts-parse: 112358132134 15152535558513521534 Index: src/usr.bin/make/unit-tests/moderrs.mk diff -u src/usr.bin/make/unit-tests/moderrs.mk:1.12 src/usr.bin/make/unit-tests/moderrs.mk:1.13 --- src/usr.bin/make/unit-tests/moderrs.mk:1.12 Sat Aug 8 13:27:42 2020 +++ src/usr.bin/make/unit-tests/moderrs.mk Sun Aug 9 15:03:25 2020 @@ -1,4 +1,4 @@ -# $Id: moderrs.mk,v 1.12 2020/08/08 13:27:42 rillig Exp $ +# $Id: moderrs.mk,v 1.13 2020/08/09 15:03:25 rillig Exp $ # # various modifier error tests @@ -16,6 +16,7 @@ all: modwords all: modexclam all: mod-subst-delimiter all: mod-regex-delimiter +all: mod-regex-undefined-subexpression all: mod-ts-parse all: mod-t-parse all: mod-ifelse-parse @@ -124,6 +125,23 @@ mod-regex-delimiter: @echo ${VAR:C,from,to, @echo ${VAR:C,from,to,} +# In regular expressions with alternatives, not all capturing groups are +# always set; some may be missing. Warn about these. +# +# Since there is no way to turn off this warning, the combination of +# alternative matches and capturing groups is not widely used. +# +# A newly added modifier 'U' such as in :C,(a.)|(b.),\1\2,U might be added +# for treating undefined capturing groups as empty, but that would create a +# syntactical ambiguity since the :S and :C modifiers are open-ended (see +# mod-subst-chain). Luckily the modifier :U does not make sense after :C, +# therefore this case does not happen in practice. +# The sub-modifier for the :C modifier would have to be chosen wisely. +mod-regex-undefined-subexpression: + @echo $@: + @echo ${FIB:C,1(.*),one\1,} # all ok + @echo ${FIB:C,1(.*)|2(.*),\1+\2,} # no match for subexpression + mod-ts-parse: @echo $@: @echo ${FIB:ts}
CVS commit: src/external/mit/xorg/server/xorg-server/fb
Module Name:src Committed By: tsutsui Date: Sun Aug 9 15:02:53 UTC 2020 Modified Files: src/external/mit/xorg/server/xorg-server/fb: Makefile.fb Log Message: Put back fbtile.c to SRCS.fb per xsrc dist file changes: https://mail-index.netbsd.org/source-changes/2020/08/09/msg120399.html > Revert upstream "fb: Remove even/odd tile slow-pathing" changes. > > https://gitlab.freedesktop.org/xorg/xserver/-/commit/e572bcc7f4236b7e0f23ab762f225b3bce37db59 > >> fb: Remove even/odd tile slow-pathing > >> > >> Again, clearly meant to be a fast path, but this turns out not to be the > >> case. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 \ src/external/mit/xorg/server/xorg-server/fb/Makefile.fb Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/server/xorg-server/fb/Makefile.fb diff -u src/external/mit/xorg/server/xorg-server/fb/Makefile.fb:1.11 src/external/mit/xorg/server/xorg-server/fb/Makefile.fb:1.12 --- src/external/mit/xorg/server/xorg-server/fb/Makefile.fb:1.11 Mon Dec 31 11:14:04 2018 +++ src/external/mit/xorg/server/xorg-server/fb/Makefile.fb Sun Aug 9 15:02:52 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.fb,v 1.11 2018/12/31 11:14:04 mrg Exp $ +# $NetBSD: Makefile.fb,v 1.12 2020/08/09 15:02:52 tsutsui Exp $ .PATH: ${X11SRCDIR.xorg-server}/fb SRCS.fb= fballpriv.c \ @@ -25,6 +25,7 @@ SRCS.fb= fballpriv.c \ fbseg.c \ fbsetsp.c \ fbsolid.c \ + fbtile.c\ fbtrap.c\ fbutil.c\ fbwindow.c
CVS commit: xsrc/external/mit/xorg-server/dist/fb
Module Name:xsrc Committed By: tsutsui Date: Sun Aug 9 14:55:26 UTC 2020 Modified Files: xsrc/external/mit/xorg-server/dist/fb: fb.h fbfill.c wfbrename.h Added Files: xsrc/external/mit/xorg-server/dist/fb: fbtile.c Log Message: Revert upstream "fb: Remove even/odd tile slow-pathing" changes. https://gitlab.freedesktop.org/xorg/xserver/-/commit/e572bcc7f4236b7e0f23ab762f225b3bce37db59 >> fb: Remove even/odd tile slow-pathing >> >> Again, clearly meant to be a fast path, but this turns out not to be the >> case. This causes serious performance regression on 1bpp servers. Ok'ed by mrg@. See my post on tech-x11@ for more details: https://mail-index.netbsd.org/tech-x11/2020/08/07/msg002115.html To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 xsrc/external/mit/xorg-server/dist/fb/fb.h cvs rdiff -u -r1.1.1.3 -r1.2 xsrc/external/mit/xorg-server/dist/fb/fbfill.c cvs rdiff -u -r0 -r1.3 xsrc/external/mit/xorg-server/dist/fb/fbtile.c cvs rdiff -u -r1.1.1.6 -r1.2 \ xsrc/external/mit/xorg-server/dist/fb/wfbrename.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xorg-server/dist/fb/fb.h diff -u xsrc/external/mit/xorg-server/dist/fb/fb.h:1.2 xsrc/external/mit/xorg-server/dist/fb/fb.h:1.3 --- xsrc/external/mit/xorg-server/dist/fb/fb.h:1.2 Sat Jul 18 17:37:08 2020 +++ xsrc/external/mit/xorg-server/dist/fb/fb.h Sun Aug 9 14:55:26 2020 @@ -,6 +,45 @@ extern _X_EXPORT WriteMemoryProcPtr wfbW #endif /* + * fbtile.c + */ + +extern _X_EXPORT void + +fbEvenTile(FbBits * dst, + FbStride dstStride, + int dstX, + int width, + int height, + FbBits * tile, + FbStride tileStride, + int tileHeight, int alu, FbBits pm, int xRot, int yRot); + +extern _X_EXPORT void + +fbOddTile(FbBits * dst, + FbStride dstStride, + int dstX, + int width, + int height, + FbBits * tile, + FbStride tileStride, + int tileWidth, + int tileHeight, int alu, FbBits pm, int bpp, int xRot, int yRot); + +extern _X_EXPORT void + +fbTile(FbBits * dst, + FbStride dstStride, + int dstX, + int width, + int height, + FbBits * tile, + FbStride tileStride, + int tileWidth, + int tileHeight, int alu, FbBits pm, int bpp, int xRot, int yRot); + +/* * fbwindow.c */ Index: xsrc/external/mit/xorg-server/dist/fb/fbfill.c diff -u xsrc/external/mit/xorg-server/dist/fb/fbfill.c:1.1.1.3 xsrc/external/mit/xorg-server/dist/fb/fbfill.c:1.2 --- xsrc/external/mit/xorg-server/dist/fb/fbfill.c:1.1.1.3 Wed Aug 10 07:44:35 2016 +++ xsrc/external/mit/xorg-server/dist/fb/fbfill.c Sun Aug 9 14:55:26 2020 @@ -27,44 +27,6 @@ #include "fb.h" static void -fbTile(FbBits * dst, FbStride dstStride, int dstX, int width, int height, - FbBits * tile, FbStride tileStride, int tileWidth, int tileHeight, - int alu, FbBits pm, int bpp, int xRot, int yRot) -{ -int tileX, tileY; -int widthTmp; -int h, w; -int x, y; - -modulus(-yRot, tileHeight, tileY); -y = 0; -while (height) { -h = tileHeight - tileY; -if (h > height) -h = height; -height -= h; -widthTmp = width; -x = dstX; -modulus(dstX - xRot, tileWidth, tileX); -while (widthTmp) { -w = tileWidth - tileX; -if (w > widthTmp) -w = widthTmp; -widthTmp -= w; -fbBlt(tile + tileY * tileStride, - tileStride, - tileX, - dst + y * dstStride, - dstStride, x, w, h, alu, pm, bpp, FALSE, FALSE); -x += w; -tileX = 0; -} -y += h; -tileY = 0; -} -} - -static void fbStipple(FbBits * dst, FbStride dstStride, int dstX, int dstBpp, int width, int height, Index: xsrc/external/mit/xorg-server/dist/fb/wfbrename.h diff -u xsrc/external/mit/xorg-server/dist/fb/wfbrename.h:1.1.1.6 xsrc/external/mit/xorg-server/dist/fb/wfbrename.h:1.2 --- xsrc/external/mit/xorg-server/dist/fb/wfbrename.h:1.1.1.6 Mon Dec 31 09:36:09 2018 +++ xsrc/external/mit/xorg-server/dist/fb/wfbrename.h Sun Aug 9 14:55:26 2020 @@ -43,6 +43,7 @@ #define fbDots16 wfbDots16 #define fbDots32 wfbDots32 #define fbDots8 wfbDots8 +#define fbEvenTile wfbEvenTile #define fbExpandDirectColors wfbExpandDirectColors #define fbFill wfbFill #define fbFillRegionSolid wfbFillRegionSolid @@ -65,6 +66,7 @@ #define fbInitVisuals wfbInitVisuals #define fbListInstalledColormaps wfbListInstalledColormaps #define FbMergeRopBits wFbMergeRopBits +#define fbOddTile wfbOddTile #define fbOver wfbOver #define fbOverlayCloseScreen wfbOverlayCloseScreen #define fbOverlayCopyWindow wfbOverlayCopyWindow @@ -116,6 +118,7 @@ #define _fbSetWindowPixmap
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sun Aug 9 14:30:35 UTC 2020 Modified Files: src/usr.bin/make: var.c Log Message: make(1): use char literals, improve documentation To generate a diff of this commit: cvs rdiff -u -r1.443 -r1.444 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/var.c diff -u src/usr.bin/make/var.c:1.443 src/usr.bin/make/var.c:1.444 --- src/usr.bin/make/var.c:1.443 Sun Aug 9 14:02:15 2020 +++ src/usr.bin/make/var.c Sun Aug 9 14:30:35 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: var.c,v 1.443 2020/08/09 14:02:15 rillig Exp $ */ +/* $NetBSD: var.c,v 1.444 2020/08/09 14:30:35 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: var.c,v 1.443 2020/08/09 14:02:15 rillig Exp $"; +static char rcsid[] = "$NetBSD: var.c,v 1.444 2020/08/09 14:30:35 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: var.c,v 1.443 2020/08/09 14:02:15 rillig Exp $"); +__RCSID("$NetBSD: var.c,v 1.444 2020/08/09 14:30:35 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -1933,7 +1933,8 @@ typedef struct { * to the expression */ char missing_delim; /* For error reporting */ -Byte sep; /* Word separator in expansions */ +Byte sep; /* Word separator in expansions + * (see the :ts modifier) */ Boolean oneBigWord; /* TRUE if the variable value is treated as a * single big word, even if it contains * embedded spaces (as opposed to the @@ -2991,13 +2992,12 @@ ApplyModifier_SysV(const char **pp, Appl #endif /* Apply any modifiers (such as :Mpattern or :@var@loop@ or :Q or ::=value). */ - static char * ApplyModifiers( const char **pp, /* the parsing position, updated upon return */ char *val, /* the current value of the variable */ -char const startc, /* '(' or '{' or '\0' */ -char const endc, /* ')' or '}' or '\0' */ +char const startc, /* '(' or '{', or '\0' for indirect modifiers */ +char const endc, /* ')' or '}', or '\0' for indirect modifiers */ Var * const v, /* the variable may have its flags changed */ GNode * const ctxt, /* for looking up and modifying variables */ VarEvalFlags const eflags, @@ -3045,7 +3045,7 @@ ApplyModifiers( if (rval != NULL && *rval) { const char *rval_pp = rval; - st.val = ApplyModifiers(_pp, st.val, 0, 0, v, + st.val = ApplyModifiers(_pp, st.val, '\0', '\0', v, ctxt, eflags, freePtr); if (st.val == var_Error || (st.val == varNoError && !(st.eflags & VARE_UNDEFERR))
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Sun Aug 9 14:18:56 UTC 2020 Modified Files: src/doc [netbsd-8]: CHANGES-8.3 Log Message: Ticket #1596 To generate a diff of this commit: cvs rdiff -u -r1.1.2.26 -r1.1.2.27 src/doc/CHANGES-8.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-8.3 diff -u src/doc/CHANGES-8.3:1.1.2.26 src/doc/CHANGES-8.3:1.1.2.27 --- src/doc/CHANGES-8.3:1.1.2.26 Wed Aug 5 17:31:45 2020 +++ src/doc/CHANGES-8.3 Sun Aug 9 14:18:56 2020 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.3,v 1.1.2.26 2020/08/05 17:31:45 martin Exp $ +# $NetBSD: CHANGES-8.3,v 1.1.2.27 2020/08/09 14:18:56 martin Exp $ A complete list of changes from the NetBSD 8.2 release to the NetBSD 8.3 release: @@ -992,4 +992,9 @@ sys/arch/x86/x86/errata.c 1.24-1.26 Add six errata for AMD Family 17h (Ryzen etc). [msaitoh, ticket #1595] +sys/dev/pci/mpii.c1.25 + + mpii(4): make it compilable without bio(4). + [jnemeth, ticket #1596] +
CVS commit: [netbsd-8] src/sys/dev/pci
Module Name:src Committed By: martin Date: Sun Aug 9 14:17:48 UTC 2020 Modified Files: src/sys/dev/pci [netbsd-8]: mpii.c Log Message: Pull up following revision(s) (requested by jnemeth in ticket #1596): sys/dev/pci/mpii.c: revision 1.25 make this compile without bio(4) To generate a diff of this commit: cvs rdiff -u -r1.8.10.5 -r1.8.10.6 src/sys/dev/pci/mpii.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/pci/mpii.c diff -u src/sys/dev/pci/mpii.c:1.8.10.5 src/sys/dev/pci/mpii.c:1.8.10.6 --- src/sys/dev/pci/mpii.c:1.8.10.5 Fri Mar 15 14:50:36 2019 +++ src/sys/dev/pci/mpii.c Sun Aug 9 14:17:48 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: mpii.c,v 1.8.10.5 2019/03/15 14:50:36 martin Exp $ */ +/* $NetBSD: mpii.c,v 1.8.10.6 2020/08/09 14:17:48 martin Exp $ */ /* OpenBSD: mpii.c,v 1.115 2012/04/11 13:29:14 naddy Exp */ /* * Copyright (c) 2010 Mike Belopuhov @@ -20,7 +20,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mpii.c,v 1.8.10.5 2019/03/15 14:50:36 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mpii.c,v 1.8.10.6 2020/08/09 14:17:48 martin Exp $"); #include "bio.h" @@ -243,8 +243,10 @@ struct mpii_softc { struct workqueue *sc_evt_ack_wq; struct work sc_evt_ack_work; +#if NBIO > 0 struct sysmon_envsys *sc_sme; envsys_data_t *sc_sensors; +#endif }; int mpii_match(device_t, cfdata_t, void *);
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Sun Aug 9 14:17:17 UTC 2020 Modified Files: src/doc [netbsd-9]: CHANGES-9.1 Log Message: Tickets #1042 - #1044 To generate a diff of this commit: cvs rdiff -u -r1.1.2.90 -r1.1.2.91 src/doc/CHANGES-9.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-9.1 diff -u src/doc/CHANGES-9.1:1.1.2.90 src/doc/CHANGES-9.1:1.1.2.91 --- src/doc/CHANGES-9.1:1.1.2.90 Wed Aug 5 15:20:21 2020 +++ src/doc/CHANGES-9.1 Sun Aug 9 14:17:17 2020 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-9.1,v 1.1.2.90 2020/08/05 15:20:21 martin Exp $ +# $NetBSD: CHANGES-9.1,v 1.1.2.91 2020/08/09 14:17:17 martin Exp $ A complete list of changes from the NetBSD 9.0 release to the NetBSD 9.1 release: @@ -4018,3 +4018,27 @@ sys/dev/nvmm/x86/nvmm_x86_vmx.c 1.46,1 No real functional changes, reduce diff to -current. [maxv, ticket #1041] +sys/dev/ic/bwfm.c1.26,1.27 +sys/dev/sdmmc/if_bwfm_sdio.c 1.5,1.16,1.19-1.21 +sys/dev/sdmmc/ld_sdmmc.c 1.38 +sys/dev/sdmmc/sdmmc.c1.40 +sys/dev/sdmmc/sdmmc_io.c 1.20 +sys/dev/sdmmc/sdmmc_ioreg.h 1.6 +sys/dev/sdmmc/sdmmc_mem.c 1.72 +sys/dev/sdmmc/sdmmcvar.h 1.35 + + Various fixes for bwfm at sdio. + [mrg, ticket #1042] + +sys/arch/arm/broadcom/bcm2835_spi.c 1.7 +sys/dev/spi/spi.c1.15 +sys/dev/spi/spivar.h1.10 + + PR kern/55506: fix locking for spi transfers on Raspberry Pi. + [kardel, ticket #1043] + +sys/dev/pci/mpii.c1.25 + + mpii(4): make it compilable without bio(4). + [jnemeth, ticket #1044] +
CVS commit: [netbsd-9] src/sys/dev/pci
Module Name:src Committed By: martin Date: Sun Aug 9 14:14:34 UTC 2020 Modified Files: src/sys/dev/pci [netbsd-9]: mpii.c Log Message: Pull up following revision(s) (requested by jnemeth in ticket #1044): sys/dev/pci/mpii.c: revision 1.25 make this compile without bio(4) To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.22.4.1 src/sys/dev/pci/mpii.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/pci/mpii.c diff -u src/sys/dev/pci/mpii.c:1.22 src/sys/dev/pci/mpii.c:1.22.4.1 --- src/sys/dev/pci/mpii.c:1.22 Mon Mar 11 14:35:22 2019 +++ src/sys/dev/pci/mpii.c Sun Aug 9 14:14:34 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: mpii.c,v 1.22 2019/03/11 14:35:22 kardel Exp $ */ +/* $NetBSD: mpii.c,v 1.22.4.1 2020/08/09 14:14:34 martin Exp $ */ /* $OpenBSD: mpii.c,v 1.115 2018/08/14 05:22:21 jmatthew Exp $ */ /* * Copyright (c) 2010, 2012 Mike Belopuhov @@ -20,7 +20,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mpii.c,v 1.22 2019/03/11 14:35:22 kardel Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mpii.c,v 1.22.4.1 2020/08/09 14:14:34 martin Exp $"); #include "bio.h" @@ -244,8 +244,10 @@ struct mpii_softc { struct workqueue *sc_evt_ack_wq; struct work sc_evt_ack_work; +#if NBIO > 0 struct sysmon_envsys *sc_sme; envsys_data_t *sc_sensors; +#endif }; int mpii_match(device_t, cfdata_t, void *);
CVS commit: [netbsd-9] src/sys/dev
Module Name:src Committed By: martin Date: Sun Aug 9 14:03:08 UTC 2020 Modified Files: src/sys/dev/ic [netbsd-9]: bwfm.c src/sys/dev/sdmmc [netbsd-9]: if_bwfm_sdio.c ld_sdmmc.c sdmmc.c sdmmc_io.c sdmmc_ioreg.h sdmmc_mem.c sdmmcvar.h Log Message: Pull up following revision(s) (requested by mrg in ticket #1042): sys/dev/sdmmc/if_bwfm_sdio.c: revision 1.19 sys/dev/sdmmc/ld_sdmmc.c: revision 1.38 sys/dev/sdmmc/sdmmcvar.h: revision 1.35 sys/dev/sdmmc/if_bwfm_sdio.c: revision 1.5 sys/dev/ic/bwfm.c: revision 1.26 sys/dev/ic/bwfm.c: revision 1.27 sys/dev/sdmmc/if_bwfm_sdio.c: revision 1.20 sys/dev/sdmmc/if_bwfm_sdio.c: revision 1.21 sys/dev/sdmmc/sdmmc_io.c: revision 1.20 sys/dev/sdmmc/sdmmc_mem.c: revision 1.72 sys/dev/sdmmc/sdmmc.c: revision 1.40 sys/dev/sdmmc/sdmmc_ioreg.h: revision 1.6 sys/dev/sdmmc/if_bwfm_sdio.c: revision 1.16 Don't pass empty mbufs to the network stack. Avoid changing signedness bit with << in sdmmc_ioreg.h Reported by If the controller doesn't support switch func (opcode 6) then skip setting this but continue with other settings. This allows us to use a card, albeit at a lower speed. Fix races in sdmmc tasks and teach ld@sdmmc to abort xfers on detach. - Teach sdmmc_add_task to queue it only if not already queued. - Remove now-redundant logic to avoid repeated queueing elsewhere. - Teach sdmmc_del_task to wait until task has completed. - Call sdmmc_del_task in various needful places. - Replace abuse of pcq by a lock and a tailq. (pcq is multi-producer, _single_-consumer, but there are potentially multiple consumers here and really only one producer.) - Teach ld_sdmmc to abort xfers on detach. (Mechanism is kinda kludgey but it'll do for now; any effort one is tempted to spend overhauling this should be spent overhauling sdmmc to support proper asynchronous commands.) - Make sure ld_sdmmc_discard either returns failure or eventually calls ldenddiscard. XXX Currently ld_sdmmc_detach aborts xfers _before_ ldbegindetach has has committed to detaching or not. This is currently necessary to avoid a deadlock because ldbegindetach waits for xfers to drain -- which strikes me as wrong; ldbegindetach shouldn't wait for anything, and should only make the decision to commit to detaching or not so the caller can decide whether to abort xfers before we actually wait for them in ldenddetach. XXX pullup -- although this changes some kernel symbols (sdmmc_add_task and sdmmc_del_task), it shouldn't affect any existing modules; the only module that uses sdmmc is ld_sdmmc.kmod, which is `.if 0' in the build so there shouldn't be any of them floating around. Make this work on big endian machines move some of the patching of callbacks and other data after ieee80211_ifattach() but before if_deferred_start_init(). may fix panic i saw in after restarting wpa_supplicant. from mlelstv. only ask for SDPCMD_INTSTATUS_HMB_SW_MASK and SDPCMD_INTSTATUS_CHIPACTIVE interrupts, not all of them. we only ack these ones. mostly fixes pinebookpro wifi hard hangs. still is problematic and can trigger interrupt storm that appears as a hard hang without NET_MPSAFE, and a follow up, less clearly right, change will reduce that to a soft hang of the interface that can be cleared with 'ifconfig bwfm0 down up', and even often recovers itself now. clear all interrupts, not just those we expect from the hostintmask. this removes the final hard hang i have seen in pinebookpro wifi, though one may still need to 'ifconfig bwfm0 down up' occasionally, so we still have bugs to fix here (the hang is usually associated with 'checksum error' from bwfm/sdio.) Sort #includes. Nix trailing whitespace. No functional change intended. To generate a diff of this commit: cvs rdiff -u -r1.14.6.1 -r1.14.6.2 src/sys/dev/ic/bwfm.c cvs rdiff -u -r1.3.8.2 -r1.3.8.3 src/sys/dev/sdmmc/if_bwfm_sdio.c cvs rdiff -u -r1.36 -r1.36.4.1 src/sys/dev/sdmmc/ld_sdmmc.c cvs rdiff -u -r1.36.4.1 -r1.36.4.2 src/sys/dev/sdmmc/sdmmc.c cvs rdiff -u -r1.14.4.1 -r1.14.4.2 src/sys/dev/sdmmc/sdmmc_io.c cvs rdiff -u -r1.3.2.1 -r1.3.2.2 src/sys/dev/sdmmc/sdmmc_ioreg.h cvs rdiff -u -r1.68.2.1 -r1.68.2.2 src/sys/dev/sdmmc/sdmmc_mem.c cvs rdiff -u -r1.30.4.1 -r1.30.4.2 src/sys/dev/sdmmc/sdmmcvar.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/ic/bwfm.c diff -u src/sys/dev/ic/bwfm.c:1.14.6.1 src/sys/dev/ic/bwfm.c:1.14.6.2 --- src/sys/dev/ic/bwfm.c:1.14.6.1 Tue Feb 25 18:40:43 2020 +++ src/sys/dev/ic/bwfm.c Sun Aug 9 14:03:08 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: bwfm.c,v 1.14.6.1 2020/02/25 18:40:43 martin Exp $ */ +/* $NetBSD: bwfm.c,v 1.14.6.2 2020/08/09 14:03:08 martin Exp $ */ /* $OpenBSD: bwfm.c,v 1.5 2017/10/16 22:27:16 patrick Exp $ */ /* * Copyright (c) 2010-2016 Broadcom Corporation @@ -18,21
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sun Aug 9 14:02:15 UTC 2020 Modified Files: src/usr.bin/make: var.c Log Message: make(1): revert C99 initializer in ApplyModifiers The code of usr.bin/make is supposed to be C90-compatible. That's why it neither uses line-end comments nor declaration-after-statement nor a few other features. The fields that were copied "by name" did not get any additional comments, only the ones with literal values did, since it's hard to see what these mean. This style of initializer has the additional benefit that a missing or extraneous initializer-item would lead to a compile-time error, rather than going undetected. To generate a diff of this commit: cvs rdiff -u -r1.442 -r1.443 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/var.c diff -u src/usr.bin/make/var.c:1.442 src/usr.bin/make/var.c:1.443 --- src/usr.bin/make/var.c:1.442 Sun Aug 9 13:16:10 2020 +++ src/usr.bin/make/var.c Sun Aug 9 14:02:15 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: var.c,v 1.442 2020/08/09 13:16:10 rillig Exp $ */ +/* $NetBSD: var.c,v 1.443 2020/08/09 14:02:15 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: var.c,v 1.442 2020/08/09 13:16:10 rillig Exp $"; +static char rcsid[] = "$NetBSD: var.c,v 1.443 2020/08/09 14:02:15 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: var.c,v 1.442 2020/08/09 13:16:10 rillig Exp $"); +__RCSID("$NetBSD: var.c,v 1.443 2020/08/09 14:02:15 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -3004,18 +3004,12 @@ ApplyModifiers( void ** const freePtr /* free this after using the return value */ ) { ApplyModifiersState st = { - .startc = startc, - .endc = endc, - .v = v, - .ctxt = ctxt, - .eflags = eflags, - .val = val, - .newVal = NULL, - .missing_delim = '\0', - .sep = ' ', - .oneBigWord = FALSE -} -; + startc, endc, v, ctxt, eflags, val, + NULL, /* .newVal */ + '\0', /* .missing_delim */ + ' ', /* .sep */ + FALSE /* .oneBigWord */ +}; const char *p; const char *mod; ApplyModifierResult res;
CVS commit: src/share/misc
Module Name:src Committed By: christos Date: Sun Aug 9 13:48:00 UTC 2020 Modified Files: src/share/misc: acronyms Log Message: Add TOFU To generate a diff of this commit: cvs rdiff -u -r1.304 -r1.305 src/share/misc/acronyms Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms diff -u src/share/misc/acronyms:1.304 src/share/misc/acronyms:1.305 --- src/share/misc/acronyms:1.304 Sat Jun 13 10:31:49 2020 +++ src/share/misc/acronyms Sun Aug 9 09:48:00 2020 @@ -1,4 +1,4 @@ -$NetBSD: acronyms,v 1.304 2020/06/13 14:31:49 sevan Exp $ +$NetBSD: acronyms,v 1.305 2020/08/09 13:48:00 christos Exp $ 10Q thank you 10X thanks 1337 elite ("leet") @@ -568,6 +568,7 @@ TNF The NetBSD Foundation TOC table of contents TOCTOU time of check to time of use TOEFL test of english as a foreign language +TOFU text over, fullquote under (in email) TOH to other half TP toilet paper TPTB the powers that be
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sun Aug 9 13:16:10 UTC 2020 Modified Files: src/usr.bin/make: var.c Log Message: make(1): mark inconsistent word separators for variable modifiers To generate a diff of this commit: cvs rdiff -u -r1.441 -r1.442 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/var.c diff -u src/usr.bin/make/var.c:1.441 src/usr.bin/make/var.c:1.442 --- src/usr.bin/make/var.c:1.441 Sun Aug 9 13:05:04 2020 +++ src/usr.bin/make/var.c Sun Aug 9 13:16:10 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: var.c,v 1.441 2020/08/09 13:05:04 rillig Exp $ */ +/* $NetBSD: var.c,v 1.442 2020/08/09 13:16:10 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: var.c,v 1.441 2020/08/09 13:05:04 rillig Exp $"; +static char rcsid[] = "$NetBSD: var.c,v 1.442 2020/08/09 13:16:10 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: var.c,v 1.441 2020/08/09 13:05:04 rillig Exp $"); +__RCSID("$NetBSD: var.c,v 1.442 2020/08/09 13:16:10 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -1612,7 +1612,7 @@ WordList_JoinFree(char **av, int ac, cha for (i = 0; i < ac; i++) { if (i != 0) - Buf_AddByte(, ' '); + Buf_AddByte(, ' '); /* XXX: st->sep, for consistency */ Buf_AddStr(, av[i]); } @@ -2215,7 +2215,7 @@ ApplyModifier_Range(const char **pp, App for (i = 0; i < n; i++) { if (i != 0) - Buf_AddByte(, ' '); + Buf_AddByte(, ' '); /* XXX: st->sep, for consistency */ Buf_AddInt(, 1 + i); } @@ -3667,6 +3667,7 @@ Var_Subst(const char *str, GNode *ctxt, while (*str) { if (*str == '\n' && trailingBslash) Buf_AddByte(, ' '); + if (*str == '$' && str[1] == '$') { /* * A dollar sign may be escaped with another dollar sign.
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sun Aug 9 13:05:04 UTC 2020 Modified Files: src/usr.bin/make: nonints.h parse.c var.c Log Message: make(1): improve type signature of Var_Export To generate a diff of this commit: cvs rdiff -u -r1.90 -r1.91 src/usr.bin/make/nonints.h cvs rdiff -u -r1.249 -r1.250 src/usr.bin/make/parse.c cvs rdiff -u -r1.440 -r1.441 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/nonints.h diff -u src/usr.bin/make/nonints.h:1.90 src/usr.bin/make/nonints.h:1.91 --- src/usr.bin/make/nonints.h:1.90 Sat Aug 8 13:00:07 2020 +++ src/usr.bin/make/nonints.h Sun Aug 9 13:05:04 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: nonints.h,v 1.90 2020/08/08 13:00:07 rillig Exp $ */ +/* $NetBSD: nonints.h,v 1.91 2020/08/09 13:05:04 rillig Exp $ */ /*- * Copyright (c) 1988, 1989, 1990, 1993 @@ -200,7 +200,7 @@ void Var_End(void); void Var_Stats(void); void Var_Dump(GNode *); void Var_ExportVars(void); -void Var_Export(const char *, int); +void Var_Export(const char *, Boolean); void Var_UnExport(const char *); /* util.c */ Index: src/usr.bin/make/parse.c diff -u src/usr.bin/make/parse.c:1.249 src/usr.bin/make/parse.c:1.250 --- src/usr.bin/make/parse.c:1.249 Thu Aug 6 16:03:04 2020 +++ src/usr.bin/make/parse.c Sun Aug 9 13:05:04 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: parse.c,v 1.249 2020/08/06 16:03:04 sjg Exp $ */ +/* $NetBSD: parse.c,v 1.250 2020/08/09 13:05:04 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: parse.c,v 1.249 2020/08/06 16:03:04 sjg Exp $"; +static char rcsid[] = "$NetBSD: parse.c,v 1.250 2020/08/09 13:05:04 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: parse.c,v 1.249 2020/08/06 16:03:04 sjg Exp $"); +__RCSID("$NetBSD: parse.c,v 1.250 2020/08/09 13:05:04 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -2020,7 +2020,7 @@ Parse_DoVar(char *line, GNode *ctxt) } else if (strcmp(line, MAKE_JOB_PREFIX) == 0) { Job_SetPrefix(); } else if (strcmp(line, MAKE_EXPORTED) == 0) { - Var_Export(cp, 0); + Var_Export(cp, FALSE); } if (freeCp) free(cp); @@ -3098,7 +3098,7 @@ Parse_File(const char *name, int fd) } else if (strncmp(cp, "export", 6) == 0) { for (cp += 6; isspace((unsigned char) *cp); cp++) continue; - Var_Export(cp, 1); + Var_Export(cp, TRUE); continue; } else if (strncmp(cp, "unexport", 8) == 0) { Var_UnExport(cp); Index: src/usr.bin/make/var.c diff -u src/usr.bin/make/var.c:1.440 src/usr.bin/make/var.c:1.441 --- src/usr.bin/make/var.c:1.440 Sun Aug 9 11:04:05 2020 +++ src/usr.bin/make/var.c Sun Aug 9 13:05:04 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: var.c,v 1.440 2020/08/09 11:04:05 rillig Exp $ */ +/* $NetBSD: var.c,v 1.441 2020/08/09 13:05:04 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: var.c,v 1.440 2020/08/09 11:04:05 rillig Exp $"; +static char rcsid[] = "$NetBSD: var.c,v 1.441 2020/08/09 13:05:04 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: var.c,v 1.440 2020/08/09 11:04:05 rillig Exp $"); +__RCSID("$NetBSD: var.c,v 1.441 2020/08/09 13:05:04 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -623,10 +623,14 @@ Var_ExportVars(void) /* * This is called when .export is seen or .MAKE.EXPORTED is modified. + * * It is also called when any exported variable is modified. + * XXX: Is it really? + * + * str has the format "[-env|-literal] varname...". */ void -Var_Export(const char *str, int isExport) +Var_Export(const char *str, Boolean isExport) { VarExportFlags flags; char *val;
CVS commit: src
Module Name:src Committed By: rillig Date: Sun Aug 9 12:59:16 UTC 2020 Modified Files: src/distrib/sets/lists/tests: mi src/usr.bin/make/unit-tests: Makefile Added Files: src/usr.bin/make/unit-tests: make-exported.exp make-exported.mk Log Message: make(1): add test for non-obvious .MAKE.EXPORTED edge case To generate a diff of this commit: cvs rdiff -u -r1.886 -r1.887 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.89 -r1.90 src/usr.bin/make/unit-tests/Makefile cvs rdiff -u -r0 -r1.1 src/usr.bin/make/unit-tests/make-exported.exp \ src/usr.bin/make/unit-tests/make-exported.mk 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/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.886 src/distrib/sets/lists/tests/mi:1.887 --- src/distrib/sets/lists/tests/mi:1.886 Fri Aug 7 19:24:27 2020 +++ src/distrib/sets/lists/tests/mi Sun Aug 9 12:59:16 2020 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.886 2020/08/07 19:24:27 rillig Exp $ +# $NetBSD: mi,v 1.887 2020/08/09 12:59:16 rillig Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -4576,6 +4576,8 @@ ./usr/tests/usr.bin/make/unit-tests/include-subsub.mk tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/make/unit-tests/lint.exp tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/make/unit-tests/lint.mk tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/make/unit-tests/make-exported.exp tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/make/unit-tests/make-exported.mk tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/make/unit-tests/misc.exp tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/make/unit-tests/misc.mk tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/make/unit-tests/moderrs.exp tests-usr.bin-tests compattestfile,atf Index: src/usr.bin/make/unit-tests/Makefile diff -u src/usr.bin/make/unit-tests/Makefile:1.89 src/usr.bin/make/unit-tests/Makefile:1.90 --- src/usr.bin/make/unit-tests/Makefile:1.89 Fri Aug 7 19:24:27 2020 +++ src/usr.bin/make/unit-tests/Makefile Sun Aug 9 12:59:16 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.89 2020/08/07 19:24:27 rillig Exp $ +# $NetBSD: Makefile,v 1.90 2020/08/09 12:59:16 rillig Exp $ # # Unit tests for make(1) # @@ -59,6 +59,7 @@ TESTS+= hash TESTS+= impsrc TESTS+= include-main TESTS+= lint +TESTS+= make-exported TESTS+= misc TESTS+= moderrs TESTS+= modmatch @@ -93,6 +94,7 @@ ENV.envfirst= FROM_ENV=value-from-env ENV.export= -i PATH=${PATH:Q} ENV.export-variants= -i PATH=${PATH:Q} ENV.lint= -i +ENV.make-exported= -i PATH=${PATH:Q} ENV.recursive= -i ENV.varmisc= FROM_ENV=env ENV.varmisc+= FROM_ENV_BEFORE=env Added files: Index: src/usr.bin/make/unit-tests/make-exported.exp diff -u /dev/null src/usr.bin/make/unit-tests/make-exported.exp:1.1 --- /dev/null Sun Aug 9 12:59:16 2020 +++ src/usr.bin/make/unit-tests/make-exported.exp Sun Aug 9 12:59:16 2020 @@ -0,0 +1,3 @@ +-literal=make-exported-value +UT_VAR= +exit status 0 Index: src/usr.bin/make/unit-tests/make-exported.mk diff -u /dev/null src/usr.bin/make/unit-tests/make-exported.mk:1.1 --- /dev/null Sun Aug 9 12:59:16 2020 +++ src/usr.bin/make/unit-tests/make-exported.mk Sun Aug 9 12:59:16 2020 @@ -0,0 +1,16 @@ +# $NetBSD: make-exported.mk,v 1.1 2020/08/09 12:59:16 rillig Exp $ +# +# As of 2020-08-09, the code in Var_Export is shared between the .export +# directive and the .MAKE.EXPORTED variable. This leads to non-obvious +# behavior for certain variable assignments. + +-env= make-exported-value +-literal= make-exported-value +UT_VAR= ${UNEXPANDED} + +# The following behavior is probably not intended. +.MAKE.EXPORTED= -env # like .export-env +.MAKE.EXPORTED= -literal UT_VAR # like .export-literal PATH + +all: + @env | sort | grep -E '^UT_|make-exported-value' || true
CVS commit: xsrc/external/mit/xorg-server/dist/hw/sun
Module Name:xsrc Committed By: tsutsui Date: Sun Aug 9 11:51:31 UTC 2020 Modified Files: xsrc/external/mit/xorg-server/dist/hw/sun: sunInit.c Log Message: Put probed framebuffer info to a log file by default. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 xsrc/external/mit/xorg-server/dist/hw/sun/sunInit.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xorg-server/dist/hw/sun/sunInit.c diff -u xsrc/external/mit/xorg-server/dist/hw/sun/sunInit.c:1.7 xsrc/external/mit/xorg-server/dist/hw/sun/sunInit.c:1.8 --- xsrc/external/mit/xorg-server/dist/hw/sun/sunInit.c:1.7 Sun Aug 9 07:35:42 2020 +++ xsrc/external/mit/xorg-server/dist/hw/sun/sunInit.c Sun Aug 9 11:51:31 2020 @@ -307,6 +307,11 @@ OpenFrameBuffer( } } if (ret) { + int verb = 1; + + if (sunFbInfo) + verb = -1; + devFbUsed = TRUE; if (fbattr) { if (fbattr->fbtype.fb_type >= XFBTYPE_LASTPLUSONE) { @@ -325,16 +330,14 @@ OpenFrameBuffer( if (sunFbData[fbattr->emu_types[_i]].init) { sunFbs[screen].info.fb_type = fbattr->emu_types[_i]; ret = TRUE; - if (sunFbInfo) - ErrorF ("%s is emulating a %s\n", device, -sunFbData[fbattr->fbtype.fb_type].name); + LogMessageVerb(X_INFO, verb, "%s is emulating a %s\n", + device, sunFbData[fbattr->fbtype.fb_type].name); break; } } } - if (sunFbInfo) - ErrorF ("%s is really a %s\n", device, - sunFbData[fbattr ? fbattr->fbtype.fb_type : sunFbs[screen].info.fb_type].name); + LogMessageVerb(X_INFO, verb, "%s is really a %s\n", device, + sunFbData[fbattr ? fbattr->fbtype.fb_type : sunFbs[screen].info.fb_type].name); } } if (!ret)
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sun Aug 9 11:04:05 UTC 2020 Modified Files: src/usr.bin/make: var.c Log Message: make(1): extend the documentation for variable flags To generate a diff of this commit: cvs rdiff -u -r1.439 -r1.440 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/var.c diff -u src/usr.bin/make/var.c:1.439 src/usr.bin/make/var.c:1.440 --- src/usr.bin/make/var.c:1.439 Sun Aug 9 09:44:14 2020 +++ src/usr.bin/make/var.c Sun Aug 9 11:04:05 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: var.c,v 1.439 2020/08/09 09:44:14 rillig Exp $ */ +/* $NetBSD: var.c,v 1.440 2020/08/09 11:04:05 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: var.c,v 1.439 2020/08/09 09:44:14 rillig Exp $"; +static char rcsid[] = "$NetBSD: var.c,v 1.440 2020/08/09 11:04:05 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: var.c,v 1.439 2020/08/09 09:44:14 rillig Exp $"); +__RCSID("$NetBSD: var.c,v 1.440 2020/08/09 11:04:05 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -207,21 +207,29 @@ typedef enum { } VarFindFlags; typedef enum { -VAR_IN_USE = 0x01, /* Variable's value is currently being used - * by Var_Parse or Var_Subst. - * Used to avoid endless recursion */ -VAR_FROM_ENV = 0x02, /* Variable comes from the environment */ -VAR_JUNK = 0x04, /* Variable is a junk variable that - * should be destroyed when done with - * it. Used by Var_Parse for undefined, - * modified variables */ -VAR_KEEP = 0x08, /* Variable is VAR_JUNK, but we found - * a use for it in some modifier and - * the value is therefore valid */ -VAR_EXPORTED = 0x10, /* Variable is exported */ -VAR_REEXPORT = 0x20, /* Indicate if var needs re-export. - * This would be true if it contains $'s */ -VAR_FROM_CMD = 0x40 /* Variable came from command line */ +/* The variable's value is currently being used by Var_Parse or Var_Subst. + * This marker is used to avoid endless recursion. */ +VAR_IN_USE = 0x01, +/* The variable comes from the environment. + * These variables are not registered in any GNode, therefore they must + * be freed as soon as they are not used anymore. */ +VAR_FROM_ENV = 0x02, +/* The variable is a junk variable that should be destroyed when done with + * it. Used by Var_Parse for undefined, modified variables. */ +VAR_JUNK = 0x04, +/* Variable is VAR_JUNK, but we found a use for it in some modifier and + * the value is therefore valid. */ +VAR_KEEP = 0x08, +/* The variable is exported to the environment, to be used by child + * processes. */ +VAR_EXPORTED = 0x10, +/* At the point where this variable was exported, it contained an + * unresolved reference to another variable. Before any child process is + * started, it needs to be exported again, in the hope that the referenced + * variable can then be resolved. */ +VAR_REEXPORT = 0x20, +/* The variable came from command line. */ +VAR_FROM_CMD = 0x40 } VarFlags; ENUM_RTTI_7(VarFlags, @@ -3591,7 +3599,7 @@ Var_Parse(const char * const str, GNode (void)VarFreeEnv(v, destroy); } else if (v->flags & VAR_JUNK) { /* - * Perform any free'ing needed and set *freePtr to NULL so the caller + * Perform any freeing needed and set *freePtr to NULL so the caller * doesn't try to free a static pointer. * If VAR_KEEP is also set then we want to keep str(?) as is. */
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sun Aug 9 10:24:03 UTC 2020 Modified Files: src/usr.bin/make: str.c Log Message: make(1): format code in str.c consistently To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/usr.bin/make/str.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/str.c diff -u src/usr.bin/make/str.c:1.55 src/usr.bin/make/str.c:1.56 --- src/usr.bin/make/str.c:1.55 Mon Aug 3 20:26:09 2020 +++ src/usr.bin/make/str.c Sun Aug 9 10:24:02 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: str.c,v 1.55 2020/08/03 20:26:09 rillig Exp $ */ +/* $NetBSD: str.c,v 1.56 2020/08/09 10:24:02 rillig Exp $ */ /*- * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: str.c,v 1.55 2020/08/03 20:26:09 rillig Exp $"; +static char rcsid[] = "$NetBSD: str.c,v 1.56 2020/08/09 10:24:02 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)str.c 5.8 (Berkeley) 6/1/90"; #else -__RCSID("$NetBSD: str.c,v 1.55 2020/08/03 20:26:09 rillig Exp $"); +__RCSID("$NetBSD: str.c,v 1.56 2020/08/09 10:24:02 rillig Exp $"); #endif #endif/* not lint */ #endif @@ -140,16 +140,16 @@ str_concat(const char *s1, const char *s */ char ** brk_string(const char *str, int *out_words_len, Boolean expand, - char **out_words_buf) + char **out_words_buf) { - size_t str_len; - char *words_buf; - int words_cap; - char **words; - int words_len; - char inquote; - char *word_start; - char *word_end; + size_t str_len; + char *words_buf; + int words_cap; + char **words; + int words_len; + char inquote; + char *word_start; + char *word_end; const char *str_p; /* skip leading space chars. */ @@ -173,7 +173,7 @@ brk_string(const char *str, int *out_wor word_end = words_buf; for (str_p = str;; ++str_p) { char ch = *str_p; - switch(ch) { + switch (ch) { case '"': case '\'': if (inquote) { @@ -181,9 +181,8 @@ brk_string(const char *str, int *out_wor inquote = '\0'; else break; - } - else { -inquote = (char) ch; + } else { +inquote = (char)ch; /* Don't miss "" or '' */ if (word_start == NULL && str_p[1] == inquote) { if (!expand) { @@ -216,13 +215,14 @@ brk_string(const char *str, int *out_wor * space and save off a pointer. */ if (word_start == NULL) - goto done; +goto done; *word_end++ = '\0'; if (words_len == words_cap) { +size_t new_size; words_cap *= 2; /* ramp up fast */ -words = (char **)bmake_realloc(words, -(words_cap + 1) * sizeof(char *)); +new_size = (words_cap + 1) * sizeof(char *); +words = bmake_realloc(words, new_size); } words[words_len++] = word_start; word_start = NULL; @@ -277,7 +277,8 @@ brk_string(const char *str, int *out_wor word_start = word_end; *word_end++ = ch; } -done: words[words_len] = NULL; +done: + words[words_len] = NULL; *out_words_len = words_len; *out_words_buf = words_buf; return words;
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sun Aug 9 09:44:14 UTC 2020 Modified Files: src/usr.bin/make: enum.c enum.h main.c var.c Log Message: make(1): clean up indentation, includes, add documentation To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/enum.c cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/enum.h cvs rdiff -u -r1.301 -r1.302 src/usr.bin/make/main.c cvs rdiff -u -r1.438 -r1.439 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/enum.c diff -u src/usr.bin/make/enum.c:1.2 src/usr.bin/make/enum.c:1.3 --- src/usr.bin/make/enum.c:1.2 Sat Aug 8 14:43:28 2020 +++ src/usr.bin/make/enum.c Sun Aug 9 09:44:14 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: enum.c,v 1.2 2020/08/08 14:43:28 rillig Exp $ */ +/* $NetBSD: enum.c,v 1.3 2020/08/09 09:44:14 rillig Exp $ */ /* Copyright (c) 2020 Roland Illig @@ -28,11 +28,11 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: enum.c,v 1.2 2020/08/08 14:43:28 rillig Exp $"; +static char rcsid[] = "$NetBSD: enum.c,v 1.3 2020/08/09 09:44:14 rillig Exp $"; #else #include #ifndef lint -__RCSID("$NetBSD: enum.c,v 1.2 2020/08/08 14:43:28 rillig Exp $"); +__RCSID("$NetBSD: enum.c,v 1.3 2020/08/09 09:44:14 rillig Exp $"); #endif #endif @@ -75,7 +75,7 @@ Enum_ToString(char *buf, size_t buf_size assert(value == 0); if (buf == buf_start) - return "none"; + return "none"; assert(buf_size >= 1); buf[0] = '\0'; Index: src/usr.bin/make/enum.h diff -u src/usr.bin/make/enum.h:1.4 src/usr.bin/make/enum.h:1.5 --- src/usr.bin/make/enum.h:1.4 Sun Aug 9 07:03:06 2020 +++ src/usr.bin/make/enum.h Sun Aug 9 09:44:14 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: enum.h,v 1.4 2020/08/09 07:03:06 rillig Exp $ */ +/* $NetBSD: enum.h,v 1.5 2020/08/09 09:44:14 rillig Exp $ */ /* Copyright (c) 2020 Roland Illig @@ -34,6 +34,8 @@ * Generate string representation for bitmasks. */ +#include + typedef struct { int es_value; const char *es_name; Index: src/usr.bin/make/main.c diff -u src/usr.bin/make/main.c:1.301 src/usr.bin/make/main.c:1.302 --- src/usr.bin/make/main.c:1.301 Sun Aug 9 09:27:44 2020 +++ src/usr.bin/make/main.c Sun Aug 9 09:44:14 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.301 2020/08/09 09:27:44 rillig Exp $ */ +/* $NetBSD: main.c,v 1.302 2020/08/09 09:44:14 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,7 +69,7 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: main.c,v 1.301 2020/08/09 09:27:44 rillig Exp $"; +static char rcsid[] = "$NetBSD: main.c,v 1.302 2020/08/09 09:44:14 rillig Exp $"; #else #include #ifndef lint @@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19 #if 0 static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: main.c,v 1.301 2020/08/09 09:27:44 rillig Exp $"); +__RCSID("$NetBSD: main.c,v 1.302 2020/08/09 09:44:14 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -124,13 +124,13 @@ __RCSID("$NetBSD: main.c,v 1.301 2020/08 #include #include +#include #include #include #include #include #include #include -#include #include "make.h" #include "hash.h" @@ -1582,7 +1582,7 @@ found: /*- * Cmd_Exec -- * Execute the command in cmd, and return the output of that command - * in a string. + * in a string. In the output, newlines are replaced with spaces. * * Results: * A string containing the output of the command, or the empty string. Index: src/usr.bin/make/var.c diff -u src/usr.bin/make/var.c:1.438 src/usr.bin/make/var.c:1.439 --- src/usr.bin/make/var.c:1.438 Sun Aug 9 09:40:48 2020 +++ src/usr.bin/make/var.c Sun Aug 9 09:44:14 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: var.c,v 1.438 2020/08/09 09:40:48 rillig Exp $ */ +/* $NetBSD: var.c,v 1.439 2020/08/09 09:44:14 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: var.c,v 1.438 2020/08/09 09:40:48 rillig Exp $"; +static char rcsid[] = "$NetBSD: var.c,v 1.439 2020/08/09 09:44:14 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: var.c,v 1.438 2020/08/09 09:40:48 rillig Exp $"); +__RCSID("$NetBSD: var.c,v 1.439 2020/08/09 09:44:14 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -131,9 +131,9 @@ __RCSID("$NetBSD: var.c,v 1.438 2020/08/ #include #include -#include"enum.h" #include"make.h" #include"buf.h" +#include"enum.h" #include"dir.h" #include"job.h" #include"metachar.h"
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sun Aug 9 09:40:48 UTC 2020 Modified Files: src/usr.bin/make: var.c Log Message: make(1): document a hard-to-understand pointer calculation To generate a diff of this commit: cvs rdiff -u -r1.437 -r1.438 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/var.c diff -u src/usr.bin/make/var.c:1.437 src/usr.bin/make/var.c:1.438 --- src/usr.bin/make/var.c:1.437 Sun Aug 9 07:09:57 2020 +++ src/usr.bin/make/var.c Sun Aug 9 09:40:48 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: var.c,v 1.437 2020/08/09 07:09:57 rillig Exp $ */ +/* $NetBSD: var.c,v 1.438 2020/08/09 09:40:48 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: var.c,v 1.437 2020/08/09 07:09:57 rillig Exp $"; +static char rcsid[] = "$NetBSD: var.c,v 1.438 2020/08/09 09:40:48 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: var.c,v 1.437 2020/08/09 07:09:57 rillig Exp $"); +__RCSID("$NetBSD: var.c,v 1.438 2020/08/09 09:40:48 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -3575,7 +3575,9 @@ Var_Parse(const char * const str, GNode *freePtr = extraFree; } } -*lengthPtr = tstr - str + (*tstr ? 1 : 0); + +/* Skip past endc if possible. */ +*lengthPtr = tstr + (*tstr ? 1 : 0) - str; if (v->flags & VAR_FROM_ENV) { Boolean destroy = nstr != Buf_GetAll(>val, NULL);
CVS commit: src/usr.bin/make/unit-tests
Module Name:src Committed By: rillig Date: Sun Aug 9 09:32:04 UTC 2020 Modified Files: src/usr.bin/make/unit-tests: modmisc.mk Log Message: make(1): add more tests for Cmd_Exec To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/usr.bin/make/unit-tests/modmisc.mk 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/unit-tests/modmisc.mk diff -u src/usr.bin/make/unit-tests/modmisc.mk:1.40 src/usr.bin/make/unit-tests/modmisc.mk:1.41 --- src/usr.bin/make/unit-tests/modmisc.mk:1.40 Sun Aug 9 09:17:19 2020 +++ src/usr.bin/make/unit-tests/modmisc.mk Sun Aug 9 09:32:04 2020 @@ -1,4 +1,4 @@ -# $Id: modmisc.mk,v 1.40 2020/08/09 09:17:19 rillig Exp $ +# $Id: modmisc.mk,v 1.41 2020/08/09 09:32:04 rillig Exp $ # # miscellaneous modifier tests @@ -414,4 +414,16 @@ mod-range: .warning unexpected .endif +.if ${:!echo!} != "" +.warning A newline at the end of the output must be stripped. +.endif + +.if ${:!echo;echo!} != " " +.warning Only a single newline at the end of the output is stripped. +.endif + +.if ${:!echo;echo;echo;echo!} != " " +.warning Other newlines in the output are converted to spaces. +.endif + # end mod-shell
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sun Aug 9 09:27:44 UTC 2020 Modified Files: src/usr.bin/make: main.c Log Message: make(1): remove outdated comment To generate a diff of this commit: cvs rdiff -u -r1.300 -r1.301 src/usr.bin/make/main.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/main.c diff -u src/usr.bin/make/main.c:1.300 src/usr.bin/make/main.c:1.301 --- src/usr.bin/make/main.c:1.300 Sun Aug 9 09:26:21 2020 +++ src/usr.bin/make/main.c Sun Aug 9 09:27:44 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.300 2020/08/09 09:26:21 rillig Exp $ */ +/* $NetBSD: main.c,v 1.301 2020/08/09 09:27:44 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,7 +69,7 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: main.c,v 1.300 2020/08/09 09:26:21 rillig Exp $"; +static char rcsid[] = "$NetBSD: main.c,v 1.301 2020/08/09 09:27:44 rillig Exp $"; #else #include #ifndef lint @@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19 #if 0 static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: main.c,v 1.300 2020/08/09 09:26:21 rillig Exp $"); +__RCSID("$NetBSD: main.c,v 1.301 2020/08/09 09:27:44 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -1664,7 +1664,6 @@ Cmd_Exec(const char *cmd, const char **e savederr = 0; Buf_Init(, 0); - /* XXX: split variable cc into 2 */ do { char result[BUFSIZ]; bytes_read = read(fds[0], result, sizeof(result));
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sun Aug 9 09:26:21 UTC 2020 Modified Files: src/usr.bin/make: main.c Log Message: make(1): avoid undefined behavior in Cmd_Exec Iterating the command output backwards was dangerous since at the end, the pointer cp pointed outside of the array. Even without dereferencing this pointer, this already invokes undefined behavior (C11, 6.5.6p8). Don't risk anything. Iterating forwards is probably faster anyway, since it is more common. To generate a diff of this commit: cvs rdiff -u -r1.299 -r1.300 src/usr.bin/make/main.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/main.c diff -u src/usr.bin/make/main.c:1.299 src/usr.bin/make/main.c:1.300 --- src/usr.bin/make/main.c:1.299 Sun Aug 9 09:07:54 2020 +++ src/usr.bin/make/main.c Sun Aug 9 09:26:21 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.299 2020/08/09 09:07:54 rillig Exp $ */ +/* $NetBSD: main.c,v 1.300 2020/08/09 09:26:21 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,7 +69,7 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: main.c,v 1.299 2020/08/09 09:07:54 rillig Exp $"; +static char rcsid[] = "$NetBSD: main.c,v 1.300 2020/08/09 09:26:21 rillig Exp $"; #else #include #ifndef lint @@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19 #if 0 static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: main.c,v 1.299 2020/08/09 09:07:54 rillig Exp $"); +__RCSID("$NetBSD: main.c,v 1.300 2020/08/09 09:26:21 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -1699,14 +1699,11 @@ Cmd_Exec(const char *cmd, const char **e *errfmt = "\"%s\" returned non-zero status"; /* Convert newlines to spaces. A final newline is just stripped */ - cp = [res_len]; - if (res_len > 0 && *--cp == '\n') - *cp-- = '\0'; - while (cp >= res) { + if (res_len > 0 && res[res_len - 1] == '\n') + res[res_len - 1] = '\0'; + for (cp = res; *cp != '\0'; cp++) if (*cp == '\n') *cp = ' '; - cp--; - } break; } return res;
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: skrll Date: Sun Aug 9 09:23:17 UTC 2020 Modified Files: src/sys/arch/mips/mips: spl.S Log Message: ONe '#' is enough for a comment To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/mips/mips/spl.S 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/mips/spl.S diff -u src/sys/arch/mips/mips/spl.S:1.18 src/sys/arch/mips/mips/spl.S:1.19 --- src/sys/arch/mips/mips/spl.S:1.18 Sat Aug 1 05:45:30 2020 +++ src/sys/arch/mips/mips/spl.S Sun Aug 9 09:23:17 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: spl.S,v 1.18 2020/08/01 05:45:30 skrll Exp $ */ +/* $NetBSD: spl.S,v 1.19 2020/08/09 09:23:17 skrll Exp $ */ /*- * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ #include #include -RCSID("$NetBSD: spl.S,v 1.18 2020/08/01 05:45:30 skrll Exp $") +RCSID("$NetBSD: spl.S,v 1.19 2020/08/09 09:23:17 skrll Exp $") #include "assym.h" @@ -83,17 +83,17 @@ _splraise: #if !defined(__mips_o32) or v1, MIPS_SR_INT_IE # xor v1, MIPS_SR_INT_IE # clear interrupt enable bit - mtc0 v1, MIPS_COP_0_STATUS ## disable interrupts + mtc0 v1, MIPS_COP_0_STATUS # disable interrupts #else - mtc0 zero, MIPS_COP_0_STATUS ## disable interrupts + mtc0 zero, MIPS_COP_0_STATUS # disable interrupts #endif COP0_SYNC #ifdef MULTIPROCESSOR - PTR_L a3, L_CPU(MIPS_CURLWP) ## make sure curcpu is correct - NOP_L ## load delay + PTR_L a3, L_CPU(MIPS_CURLWP) # make sure curcpu is correct + NOP_L # load delay #endif - INT_S a1, CPU_INFO_CPL(a3) ## save IPL in cpu_info - mtc0 a0, MIPS_COP_0_STATUS ## store back + INT_S a1, CPU_INFO_CPL(a3) # save IPL in cpu_info + mtc0 a0, MIPS_COP_0_STATUS # store back COP0_SYNC #ifdef PARANOIA jr ra @@ -140,13 +140,13 @@ STATIC_XLEAF(_splsw_splx_noprof) # does #if !defined(__mips_o32) or v0, v1, MIPS_SR_INT_IE # xor v0, MIPS_SR_INT_IE # clear interrupt enable bit - mtc0 v0, MIPS_COP_0_STATUS ## disable interrupts + mtc0 v0, MIPS_COP_0_STATUS # disable interrupts #else - mtc0 zero, MIPS_COP_0_STATUS ## disable interrupts + mtc0 zero, MIPS_COP_0_STATUS # disable interrupts #endif COP0_SYNC - INT_S a0, CPU_INFO_CPL(a3) ## save IPL in cpu_info (KSEG0) - mtc0 v1, MIPS_COP_0_STATUS ## store back + INT_S a0, CPU_INFO_CPL(a3) # save IPL in cpu_info (KSEG0) + mtc0 v1, MIPS_COP_0_STATUS # store back COP0_SYNC #ifdef PARANOIA jr ra @@ -181,17 +181,17 @@ STATIC_LEAF(_splsw_spl0) #if !defined(__mips_o32) or v1, v0, MIPS_SR_INT_IE # xor v1, MIPS_SR_INT_IE # clear interrupt enable bit - mtc0 v1, MIPS_COP_0_STATUS ## disable interrupts + mtc0 v1, MIPS_COP_0_STATUS # disable interrupts #else - mtc0 zero, MIPS_COP_0_STATUS ## disable interrupts + mtc0 zero, MIPS_COP_0_STATUS # disable interrupts #endif COP0_SYNC #if IPL_NONE == 0 - INT_S zero, CPU_INFO_CPL(a3) ## set ipl to 0 + INT_S zero, CPU_INFO_CPL(a3) # set ipl to 0 #else #error IPL_NONE != 0 #endif - mtc0 v0, MIPS_COP_0_STATUS ## enable all sources + mtc0 v0, MIPS_COP_0_STATUS # enable all sources JR_HB_RA# return (clear hazards) END(_splsw_spl0) @@ -201,9 +201,9 @@ STATIC_LEAF(_splsw_setsoftintr) MFC0_HAZARD# load delay or v0, v1, MIPS_SR_INT_IE # xor v0, MIPS_SR_INT_IE # clear interrupt enable bit - mtc0 v0, MIPS_COP_0_STATUS ## disable interrupts + mtc0 v0, MIPS_COP_0_STATUS # disable interrupts #else - mtc0 zero, MIPS_COP_0_STATUS ## disable interrupts + mtc0 zero, MIPS_COP_0_STATUS # disable interrupts #endif COP0_SYNC mfc0 v0, MIPS_COP_0_CAUSE # fetch cause register @@ -221,9 +221,9 @@ STATIC_LEAF(_splsw_clrsoftintr) MFC0_HAZARD# load delay or v0, v1, MIPS_SR_INT_IE # xor v0, MIPS_SR_INT_IE # clear interrupt enable bit - mtc0 v0, MIPS_COP_0_STATUS ## disable interrupts + mtc0 v0, MIPS_COP_0_STATUS # disable interrupts #else - mtc0 zero, MIPS_COP_0_STATUS ## disable interrupts + mtc0 zero, MIPS_COP_0_STATUS # disable interrupts #endif COP0_SYNC mfc0 v0, MIPS_COP_0_CAUSE # fetch cause register @@ -260,15 +260,15 @@ STATIC_XLEAF(_splsw_splhigh_noprof) and a0, v1, MIPS_INT_MASK # select all interrupts xor a0, v1# clear all interrupts DYNAMIC_STATUS_MASK(a0,a2) # machine dependent masking - mtc0 a0, MIPS_COP_0_STATUS ## store back + mtc0 a0, MIPS_COP_0_STATUS # store back COP0_SYNC #ifdef MULTIPROCESSOR - PTR_L a3, L_CPU(MIPS_CURLWP) ## make sure curcpu is correct - NOP_L ## load delay + PTR_L a3, L_CPU(MIPS_CURLWP) # make sure curcpu is correct + NOP_L # load delay #endif - INT_S a1, CPU_INFO_CPL(a3) ## save IPL in cpu_info + INT_S a1, CPU_INFO_CPL(a3) # save IPL in cpu_info #ifdef PARANOIA - jr ra## return + jr ra# return nop # branch delay #endif /* PARANOIA */ 1: @@ -279,7 +279,7 @@ STATIC_XLEAF(_splsw_splhigh_noprof) 2: bnez v1, 2b# loop forever. nop # branch delay #endif /*
CVS commit: src/share/man/man9
Module Name:src Committed By: mrg Date: Sun Aug 9 09:20:30 UTC 2020 Modified Files: src/share/man/man9: usbnet.9 Log Message: fix a couple of minor issues: - un_ed is not a function, but an array - fix a typo - add a blank line after a list To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/share/man/man9/usbnet.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/usbnet.9 diff -u src/share/man/man9/usbnet.9:1.11 src/share/man/man9/usbnet.9:1.12 --- src/share/man/man9/usbnet.9:1.11 Fri Mar 20 08:02:55 2020 +++ src/share/man/man9/usbnet.9 Sun Aug 9 09:20:30 2020 @@ -1,4 +1,4 @@ -.\" $NetBSD: usbnet.9,v 1.11 2020/03/20 08:02:55 wiz Exp $ +.\" $NetBSD: usbnet.9,v 1.12 2020/08/09 09:20:30 mrg Exp $ .\" .\" Copyright (c) 2019 Matthew R. Green .\" All rights reserved. @@ -580,8 +580,8 @@ Typically, the device attach routine wil structure, as listed in .Sx AUTOCONFIGURATION . The -.Fn un_ed -member should have the +.Dv un_ed +array should have the .Dv USBNET_ENDPT_RX and .Dv USBNET_ENDPT_TX @@ -672,6 +672,7 @@ Returns standard .It uno_statchg Handle a status change event for this interface. .El +.Pp The read and write callbacks are called with the core lock held. See .Fn usbnet_lock_mii @@ -805,7 +806,7 @@ The framework provides three locks for the system: core lock, receive lock, and transmit lock. The normal locking order -for these locks is ifnet lock -> usbnet core lock -> usbnet rxlock -> usbne +for these locks is ifnet lock -> usbnet core lock -> usbnet rxlock -> usbnet txlock, or, ifnet lock -> usbnet core lock. Also note that the core lock may be taken when the ifnet lock is not held.
CVS commit: src/usr.bin/make/unit-tests
Module Name:src Committed By: rillig Date: Sun Aug 9 09:17:19 UTC 2020 Modified Files: src/usr.bin/make/unit-tests: modmisc.mk Log Message: make(1): add test for null byte in the output of a command To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/usr.bin/make/unit-tests/modmisc.mk 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/unit-tests/modmisc.mk diff -u src/usr.bin/make/unit-tests/modmisc.mk:1.39 src/usr.bin/make/unit-tests/modmisc.mk:1.40 --- src/usr.bin/make/unit-tests/modmisc.mk:1.39 Sun Aug 9 08:03:31 2020 +++ src/usr.bin/make/unit-tests/modmisc.mk Sun Aug 9 09:17:19 2020 @@ -1,4 +1,4 @@ -# $Id: modmisc.mk,v 1.39 2020/08/09 08:03:31 rillig Exp $ +# $Id: modmisc.mk,v 1.40 2020/08/09 09:17:19 rillig Exp $ # # miscellaneous modifier tests @@ -401,3 +401,17 @@ mod-range: .if ${value:L:${:Dempty}S,a,A,} != "vAlue" .warning unexpected .endif + +# begin mod-shell + +.if ${:!echo hello | tr 'l' 'l'!} != "hello" +.warning unexpected +.endif + +# The output is truncated at the first null byte. +# Cmd_Exec returns only a string pointer without length information. +.if ${:!echo hello | tr 'l' '\0'!} != "he" +.warning unexpected +.endif + +# end mod-shell
CVS commit: src/sys/arch/aarch64/aarch64
Module Name:src Committed By: skrll Date: Sun Aug 9 09:11:41 UTC 2020 Modified Files: src/sys/arch/aarch64/aarch64: pmap.c Log Message: Fix another UVMHIST so it doesn't use %s To generate a diff of this commit: cvs rdiff -u -r1.84 -r1.85 src/sys/arch/aarch64/aarch64/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/arch/aarch64/aarch64/pmap.c diff -u src/sys/arch/aarch64/aarch64/pmap.c:1.84 src/sys/arch/aarch64/aarch64/pmap.c:1.85 --- src/sys/arch/aarch64/aarch64/pmap.c:1.84 Thu Jul 16 11:36:35 2020 +++ src/sys/arch/aarch64/aarch64/pmap.c Sun Aug 9 09:11:41 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.84 2020/07/16 11:36:35 skrll Exp $ */ +/* $NetBSD: pmap.c,v 1.85 2020/08/09 09:11:41 skrll Exp $ */ /* * Copyright (c) 2017 Ryo Shimizu @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.84 2020/07/16 11:36:35 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.85 2020/08/09 09:11:41 skrll Exp $"); #include "opt_arm_debug.h" #include "opt_ddb.h" @@ -2236,7 +2236,6 @@ pmap_fault_fixup(struct pmap *pm, vaddr_ UVMHIST_LOG(pmaphist, "pm=%p, va=%016lx, accessprot=%08x", pm, va, accessprot, 0); - #if 0 KASSERT_PM_ADDR(pm, va); #else @@ -2246,8 +2245,8 @@ pmap_fault_fixup(struct pmap *pm, vaddr_ !(IN_RANGE(va, VM_MIN_ADDRESS, VM_MAX_ADDRESS { UVMHIST_LOG(pmaphist, - "pmap space and va mismatch: pm=%s, va=%016lx", - (pm == pmap_kernel()) ? "kernel" : "user", va, 0, 0); + "pmap space and va mismatch: kernel=%jd, va=%016lx", + pm == pmap_kernel(), va, 0, 0); return false; } #endif
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sun Aug 9 09:07:54 UTC 2020 Modified Files: src/usr.bin/make: main.c Log Message: make(1): remove redundant assignment from Cmd_Exec A Buffer is always null-terminated. To generate a diff of this commit: cvs rdiff -u -r1.298 -r1.299 src/usr.bin/make/main.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/main.c diff -u src/usr.bin/make/main.c:1.298 src/usr.bin/make/main.c:1.299 --- src/usr.bin/make/main.c:1.298 Sun Aug 9 09:01:29 2020 +++ src/usr.bin/make/main.c Sun Aug 9 09:07:54 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.298 2020/08/09 09:01:29 rillig Exp $ */ +/* $NetBSD: main.c,v 1.299 2020/08/09 09:07:54 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,7 +69,7 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: main.c,v 1.298 2020/08/09 09:01:29 rillig Exp $"; +static char rcsid[] = "$NetBSD: main.c,v 1.299 2020/08/09 09:07:54 rillig Exp $"; #else #include #ifndef lint @@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19 #if 0 static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: main.c,v 1.298 2020/08/09 09:01:29 rillig Exp $"); +__RCSID("$NetBSD: main.c,v 1.299 2020/08/09 09:07:54 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -1698,20 +1698,13 @@ Cmd_Exec(const char *cmd, const char **e else if (WEXITSTATUS(status) != 0) *errfmt = "\"%s\" returned non-zero status"; - /* Null-terminate the result and convert newlines to spaces. */ - res[res_len] = '\0'; + /* Convert newlines to spaces. A final newline is just stripped */ cp = [res_len]; - - if (res_len > 0 && *--cp == '\n') { - /* - * A final newline is just stripped - */ + if (res_len > 0 && *--cp == '\n') *cp-- = '\0'; - } while (cp >= res) { - if (*cp == '\n') { + if (*cp == '\n') *cp = ' '; - } cp--; } break;
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sun Aug 9 09:01:29 UTC 2020 Modified Files: src/usr.bin/make: main.c Log Message: make(1): split local variable in Cmd_Exec into two This avoids a mismatch between signed and unsigned types. To generate a diff of this commit: cvs rdiff -u -r1.297 -r1.298 src/usr.bin/make/main.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/main.c diff -u src/usr.bin/make/main.c:1.297 src/usr.bin/make/main.c:1.298 --- src/usr.bin/make/main.c:1.297 Sat Aug 8 18:54:04 2020 +++ src/usr.bin/make/main.c Sun Aug 9 09:01:29 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.297 2020/08/08 18:54:04 rillig Exp $ */ +/* $NetBSD: main.c,v 1.298 2020/08/09 09:01:29 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,7 +69,7 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: main.c,v 1.297 2020/08/08 18:54:04 rillig Exp $"; +static char rcsid[] = "$NetBSD: main.c,v 1.298 2020/08/09 09:01:29 rillig Exp $"; #else #include #ifndef lint @@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19 #if 0 static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: main.c,v 1.297 2020/08/08 18:54:04 rillig Exp $"); +__RCSID("$NetBSD: main.c,v 1.298 2020/08/09 09:01:29 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -1599,12 +1599,13 @@ Cmd_Exec(const char *cmd, const char **e int fds[2]; /* Pipe streams */ int cpid; /* Child PID */ int pid; /* PID from wait() */ -char *res; /* result */ int status; /* command exit status */ Buffer buf; /* buffer to store the result */ +ssize_t bytes_read; +char *res; /* result */ +size_t res_len; char *cp; int savederr; /* saved errno */ -ssize_t cc; /* bytes read, or -1 */ *errfmt = NULL; @@ -1666,12 +1667,12 @@ Cmd_Exec(const char *cmd, const char **e /* XXX: split variable cc into 2 */ do { char result[BUFSIZ]; - cc = read(fds[0], result, sizeof(result)); - if (cc > 0) - Buf_AddBytes(, result, (size_t)cc); + bytes_read = read(fds[0], result, sizeof(result)); + if (bytes_read > 0) + Buf_AddBytes(, result, (size_t)bytes_read); } - while (cc > 0 || (cc == -1 && errno == EINTR)); - if (cc == -1) + while (bytes_read > 0 || (bytes_read == -1 && errno == EINTR)); + if (bytes_read == -1) savederr = errno; /* @@ -1686,7 +1687,7 @@ Cmd_Exec(const char *cmd, const char **e JobReapChild(pid, status, FALSE); continue; } - cc = (/* XXX */ssize_t)Buf_Size(); + res_len = Buf_Size(); res = Buf_Destroy(, FALSE); if (savederr != 0) @@ -1697,14 +1698,11 @@ Cmd_Exec(const char *cmd, const char **e else if (WEXITSTATUS(status) != 0) *errfmt = "\"%s\" returned non-zero status"; - /* - * Null-terminate the result, convert newlines to spaces and - * install it in the variable. - */ - res[cc] = '\0'; - cp = [cc]; + /* Null-terminate the result and convert newlines to spaces. */ + res[res_len] = '\0'; + cp = [res_len]; - if (cc > 0 && *--cp == '\n') { + if (res_len > 0 && *--cp == '\n') { /* * A final newline is just stripped */
CVS commit: src/sys/arch/mips/conf
Module Name:src Committed By: skrll Date: Sun Aug 9 08:49:00 UTC 2020 Modified Files: src/sys/arch/mips/conf: files.mips Log Message: More whitespace To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/sys/arch/mips/conf/files.mips 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/conf/files.mips diff -u src/sys/arch/mips/conf/files.mips:1.77 src/sys/arch/mips/conf/files.mips:1.78 --- src/sys/arch/mips/conf/files.mips:1.77 Sun Aug 9 08:48:25 2020 +++ src/sys/arch/mips/conf/files.mips Sun Aug 9 08:49:00 2020 @@ -1,4 +1,4 @@ -# $NetBSD: files.mips,v 1.77 2020/08/09 08:48:25 skrll Exp $ +# $NetBSD: files.mips,v 1.78 2020/08/09 08:49:00 skrll Exp $ # defflag opt_cputype.h NOFPU FPEMUL @@ -19,7 +19,7 @@ defflag opt_cputype.h MIPS64_XLP MIPS64 defflag opt_mips_cache.h MIPS3_NO_PV_UNCACHED defflag opt_mips_cache.h ENABLE_MIPS4_CACHE_R10K -defflag opt_mips3_wired.h ENABLE_MIPS3_WIRED_MAP +defflag opt_mips3_wired.h ENABLE_MIPS3_WIRED_MAP defflag opt_ddb.h DDB_TRACE
CVS commit: src/sys/arch/mips/conf
Module Name:src Committed By: skrll Date: Sun Aug 9 08:48:25 UTC 2020 Modified Files: src/sys/arch/mips/conf: files.mips Log Message: defflag foo on each line to make searching easier. sort some lines and fix some indentation while I'm here. To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/sys/arch/mips/conf/files.mips 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/conf/files.mips diff -u src/sys/arch/mips/conf/files.mips:1.76 src/sys/arch/mips/conf/files.mips:1.77 --- src/sys/arch/mips/conf/files.mips:1.76 Sun Jan 27 02:08:38 2019 +++ src/sys/arch/mips/conf/files.mips Sun Aug 9 08:48:25 2020 @@ -1,12 +1,12 @@ -# $NetBSD: files.mips,v 1.76 2019/01/27 02:08:38 pgoyette Exp $ +# $NetBSD: files.mips,v 1.77 2020/08/09 08:48:25 skrll Exp $ # defflag opt_cputype.h NOFPU FPEMUL -MIPS64_SB1 -ENABLE_MIPS_16KB_PAGE -ENABLE_MIPS_8KB_PAGE -MIPS64_XLP MIPS64_XLR MIPS64_XLS -MIPS64_OCTEON +defflag opt_cputype.h ENABLE_MIPS_16KB_PAGE +defflag opt_cputype.h ENABLE_MIPS_8KB_PAGE +defflag opt_cputype.h MIPS64_OCTEON +defflag opt_cputype.h MIPS64_SB1 +defflag opt_cputype.h MIPS64_XLP MIPS64_XLR MIPS64_XLS # and the rest... # MIPS1 MIPS2 MIPS3 MIPS4 MIPS5 # MIPS3_LOONGSON2 @@ -16,9 +16,10 @@ defflag opt_cputype.h NOFPU FPEMUL # ENABLE_MIPS_TX3900 # ENABLE_MIPS_R4700 # ENABLE_MIPS_R3NKK -defflag opt_mips_cache.h MIPS3_NO_PV_UNCACHED - ENABLE_MIPS4_CACHE_R10K -defflag opt_mips3_wired.h ENABLE_MIPS3_WIRED_MAP +defflag opt_mips_cache.h MIPS3_NO_PV_UNCACHED +defflag opt_mips_cache.h ENABLE_MIPS4_CACHE_R10K + +defflag opt_mips3_wired.h ENABLE_MIPS3_WIRED_MAP defflag opt_ddb.h DDB_TRACE
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: skrll Date: Sun Aug 9 08:33:52 UTC 2020 Modified Files: src/sys/arch/mips/mips: lock_stubs_llsc.S Log Message: This file is only ever used when MULTIPROCESSOR so unifdef MULTIPROCESSOR To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/mips/mips/lock_stubs_llsc.S 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/mips/lock_stubs_llsc.S diff -u src/sys/arch/mips/mips/lock_stubs_llsc.S:1.11 src/sys/arch/mips/mips/lock_stubs_llsc.S:1.12 --- src/sys/arch/mips/mips/lock_stubs_llsc.S:1.11 Thu Aug 6 10:00:21 2020 +++ src/sys/arch/mips/mips/lock_stubs_llsc.S Sun Aug 9 08:33:52 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: lock_stubs_llsc.S,v 1.11 2020/08/06 10:00:21 skrll Exp $ */ +/* $NetBSD: lock_stubs_llsc.S,v 1.12 2020/08/09 08:33:52 skrll Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -31,20 +31,15 @@ #include "opt_cputype.h" #include "opt_lockdebug.h" -#include "opt_multiprocessor.h" #include #include -RCSID("$NetBSD: lock_stubs_llsc.S,v 1.11 2020/08/06 10:00:21 skrll Exp $") +RCSID("$NetBSD: lock_stubs_llsc.S,v 1.12 2020/08/09 08:33:52 skrll Exp $") #include "assym.h" -#if defined(DIAGNOSTIC) || defined(MULTIPROCESSOR) -#define FULL -#endif - /* * Set ISA level for the assembler. * XXX Clean up with a macro? Same code fragment is in mipsX_subr.S too. @@ -259,7 +254,7 @@ STATIC_NESTED(llsc_mutex_spin_enter, CAL 12: bnez v0, 12b # loop forever if any are true nop #endif /* PARANOIA */ -#if defined(FULL) + LLSCSYNC INT_LL t3, MTX_LOCK(t0) 3: @@ -273,10 +268,6 @@ STATIC_NESTED(llsc_mutex_spin_enter, CAL 4: j _C_LABEL(mutex_spin_retry) move a0, t0 -#else - j ra - nop -#endif /* FULL */ END(llsc_mutex_spin_enter) /*
CVS commit: src/sys/arch/mips/include
Module Name:src Committed By: skrll Date: Sun Aug 9 08:13:09 UTC 2020 Modified Files: src/sys/arch/mips/include: asm.h Log Message: Use compiler defines to determine which LLSCSYNC, et al to provide. This should fix mips builds. To generate a diff of this commit: cvs rdiff -u -r1.58 -r1.59 src/sys/arch/mips/include/asm.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/asm.h diff -u src/sys/arch/mips/include/asm.h:1.58 src/sys/arch/mips/include/asm.h:1.59 --- src/sys/arch/mips/include/asm.h:1.58 Thu Aug 6 10:00:20 2020 +++ src/sys/arch/mips/include/asm.h Sun Aug 9 08:13:09 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: asm.h,v 1.58 2020/08/06 10:00:20 skrll Exp $ */ +/* $NetBSD: asm.h,v 1.59 2020/08/09 08:13:09 skrll Exp $ */ /* * Copyright (c) 1992, 1993 @@ -54,10 +54,6 @@ #ifndef _MIPS_ASM_H #define _MIPS_ASM_H -#include "opt_cputype.h" -#include "opt_lockdebug.h" -#include "opt_multiprocessor.h" - #include /* for API selection */ #include @@ -517,23 +513,17 @@ _C_LABEL(x): #define NOP_L /* nothing */ #endif -#if defined(MULTIPROCESSOR) -#if defined(MIPS64_OCTEON) +/* compiler define */ +#if defined(__OCTEON__) /* early cnMIPS have erratum which means 2 */ #define LLSCSYNC sync 4; sync 4 #define SYNC sync 4 /* sync 4 == syncw - sync all writes */ #define BDSYNC sync 4 /* sync 4 == syncw - sync all writes */ #else -#define LLSCSYNC /* nothing (something?) */ +#define LLSCSYNC sync #define SYNC sync #define BDSYNC sync #endif -#else -#define LLSCSYNC /* nothing */ -#define SYNC /* nothing */ -#define BDSYNC nop -#endif /* defined(MULTIPROCESSOR) */ - /* CPU dependent hook for cp0 load delays */ #if defined(MIPS1) || defined(MIPS2) || defined(MIPS3)
CVS commit: src/usr.bin/make/unit-tests
Module Name:src Committed By: rillig Date: Sun Aug 9 08:03:32 UTC 2020 Modified Files: src/usr.bin/make/unit-tests: modmisc.exp modmisc.mk Log Message: make(1): add test that demonstrates possible delimiters for :S To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/usr.bin/make/unit-tests/modmisc.exp cvs rdiff -u -r1.38 -r1.39 src/usr.bin/make/unit-tests/modmisc.mk 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/unit-tests/modmisc.exp diff -u src/usr.bin/make/unit-tests/modmisc.exp:1.40 src/usr.bin/make/unit-tests/modmisc.exp:1.41 --- src/usr.bin/make/unit-tests/modmisc.exp:1.40 Sun Aug 9 07:41:14 2020 +++ src/usr.bin/make/unit-tests/modmisc.exp Sun Aug 9 08:03:31 2020 @@ -25,6 +25,33 @@ mod-subst: :a c: :x__ 3 x__ 3: 12345 +mod-subst-delimiter: +1 two 3 horizontal tabulator +1 two 3 space +1 two 3 exclamation mark +1 two 3 double quotes +1 two 3 hash +1 two 3 dollar +1 two 3 percent +1 two 3 apostrophe +1 two 3 opening parenthesis +1 two 3 closing parenthesis +1 two 3 digit +1 two 3 colon +1 two 3 less than sign +1 two 3 equal sign +1 two 3 greater than sign +1 two 3 question mark +1 two 3 at +1 two 3 letter +1 two 3 opening bracket +1 two 3 backslash +1 two 3 closing bracket +1 two 3 caret +1 two 3 opening brace +1 two 3 vertical line +1 two 3 closing brace +1 two 3 tilde mod-subst-chain: A B c. make: Unknown modifier 'i' Index: src/usr.bin/make/unit-tests/modmisc.mk diff -u src/usr.bin/make/unit-tests/modmisc.mk:1.38 src/usr.bin/make/unit-tests/modmisc.mk:1.39 --- src/usr.bin/make/unit-tests/modmisc.mk:1.38 Sun Aug 9 07:41:14 2020 +++ src/usr.bin/make/unit-tests/modmisc.mk Sun Aug 9 08:03:31 2020 @@ -1,4 +1,4 @@ -# $Id: modmisc.mk,v 1.38 2020/08/09 07:41:14 rillig Exp $ +# $Id: modmisc.mk,v 1.39 2020/08/09 08:03:31 rillig Exp $ # # miscellaneous modifier tests @@ -17,6 +17,7 @@ MOD_SEP=S,:, ,g all: modvar modvarloop modsysv mod-HTE emptyvar undefvar all: mod-subst +all: mod-subst-delimiter all: mod-subst-chain all: mod-regex all: mod-loop-varname mod-loop-resolve mod-loop-varname-dollar @@ -138,6 +139,40 @@ mod-subst: @echo :${:U1 2 3 1 2 3:S,1 2,___,Wg:S,_,x,:Q}: @echo ${:U12345:S,,sep,g:Q} +# The :S and :C modifiers accept an arbitrary character as the delimiter, +# including characters that are otherwise used as escape characters or +# interpreted in a special way. This can be used to confuse humans. +mod-subst-delimiter: + @echo $@: + @echo ${:U1 2 3:S 2 two :Q} horizontal tabulator + @echo ${:U1 2 3:S 2 two :Q} space + @echo ${:U1 2 3:S!2!two!:Q} exclamation mark + @echo ${:U1 2 3:S"2"two":Q} double quotes + # In shell command lines, the hash does not need to be escaped. + # It needs to be escaped in variable assignment lines though. + @echo ${:U1 2 3:S#2#two#:Q} hash + @echo ${:U1 2 3:S$2$two$:Q} dollar + @echo ${:U1 2 3:S%2%two%:Q} percent + @echo ${:U1 2 3:S'2'two':Q} apostrophe + @echo ${:U1 2 3:S(2(two(:Q} opening parenthesis + @echo ${:U1 2 3:S)2)two):Q} closing parenthesis + @echo ${:U1 2 3:S121two1:Q} digit + @echo ${:U1 2 3:S:2:two::Q} colon + @echo ${:U1 2 3:S<22>two>:Q} greater than sign + @echo ${:U1 2 3:S?2?two?:Q} question mark + @echo ${:U1 2 3:S@2@two@:Q} at + @echo ${:U1 2 3:Sa2atwoa:Q} letter + @echo ${:U1 2 3:S[2[two[:Q} opening bracket + @echo ${:U1 2 3:S\2\two\:Q} backslash + @echo ${:U1 2 3:S]2]two]:Q} closing bracket + @echo ${:U1 2 3:S^2^two^:Q} caret + @echo ${:U1 2 3:S{2{two{:Q} opening brace + @echo ${:U1 2 3:S|2|two|:Q} vertical line + @echo ${:U1 2 3:S}2}two}:Q} closing brace + @echo ${:U1 2 3:S~2~two~:Q} tilde + # The :S and :C modifiers can be chained without a separating ':'. # This is not documented in the manual page. # It works because ApplyModifier_Subst scans for the known modifiers g1W
CVS commit: src/usr.bin/make/unit-tests
Module Name:src Committed By: rillig Date: Sun Aug 9 07:41:14 UTC 2020 Modified Files: src/usr.bin/make/unit-tests: modmisc.exp modmisc.mk Log Message: make(1): explain the mod-subst-dollar test To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/usr.bin/make/unit-tests/modmisc.exp cvs rdiff -u -r1.37 -r1.38 src/usr.bin/make/unit-tests/modmisc.mk 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/unit-tests/modmisc.exp diff -u src/usr.bin/make/unit-tests/modmisc.exp:1.39 src/usr.bin/make/unit-tests/modmisc.exp:1.40 --- src/usr.bin/make/unit-tests/modmisc.exp:1.39 Sun Aug 9 07:18:03 2020 +++ src/usr.bin/make/unit-tests/modmisc.exp Sun Aug 9 07:41:14 2020 @@ -57,6 +57,7 @@ mod-subst-dollar:$8: mod-subst-dollar:$40: mod-subst-dollar:U8: mod-subst-dollar:: +mod-subst-dollar:$$$good3 mod-loop-dollar:1: mod-loop-dollar:${word}$: mod-loop-dollar:$3$: Index: src/usr.bin/make/unit-tests/modmisc.mk diff -u src/usr.bin/make/unit-tests/modmisc.mk:1.37 src/usr.bin/make/unit-tests/modmisc.mk:1.38 --- src/usr.bin/make/unit-tests/modmisc.mk:1.37 Sun Aug 9 07:18:03 2020 +++ src/usr.bin/make/unit-tests/modmisc.mk Sun Aug 9 07:41:14 2020 @@ -1,4 +1,4 @@ -# $Id: modmisc.mk,v 1.37 2020/08/09 07:18:03 rillig Exp $ +# $Id: modmisc.mk,v 1.38 2020/08/09 07:41:14 rillig Exp $ # # miscellaneous modifier tests @@ -207,6 +207,16 @@ mod-loop-varname-dollar: # No matter how many dollar characters there are, they all get merged # into a single dollar by the :S modifier. +# +# As of 2020-08-09, this is because ParseModifierPart sees a '$' and +# calls Var_Parse to expand the variable. In all other places, the "$$" +# is handled outside of Var_Parse. Var_Parse therefore considers "$$" +# one of the "really stupid names", skips the first dollar, and parsing +# continues with the next character. This repeats for the other dollar +# signs, except the one before the delimiter. That one is handled by +# the code that optionally interprets the '$' as the end-anchor in the +# first part of the :S modifier. That code doesn't call Var_Parse but +# simply copies the dollar to the result. mod-subst-dollar: @echo $@:${:U1:S,^,$,:Q}: @echo $@:${:U2:S,^,$$,:Q}: @@ -222,6 +232,9 @@ mod-subst-dollar: # Here is an alternative way to generate dollar characters. # It's unexpectedly complicated though. @echo $@:${:U:range=5:ts\x24:C,[0-9],,g:Q}: +# In modifiers, dollars are escaped using the backslash, not using another +# dollar sign. Therefore, creating a dollar sign is pretty simple: + @echo $@:${:Ugood3:S,^,\$\$\$,:Q} # Demonstrate that it is possible to generate dollar characters using the # :@ modifier.
CVS commit: xsrc/external/mit/xorg-server/dist/hw/sun
Module Name:xsrc Committed By: tsutsui Date: Sun Aug 9 07:35:42 UTC 2020 Modified Files: xsrc/external/mit/xorg-server/dist/hw/sun: sun.h sunCfb.c sunInit.c sunIo.c Log Message: Remove redundant command option arg checks. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 xsrc/external/mit/xorg-server/dist/hw/sun/sun.h \ xsrc/external/mit/xorg-server/dist/hw/sun/sunCfb.c cvs rdiff -u -r1.6 -r1.7 xsrc/external/mit/xorg-server/dist/hw/sun/sunInit.c cvs rdiff -u -r1.2 -r1.3 xsrc/external/mit/xorg-server/dist/hw/sun/sunIo.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xorg-server/dist/hw/sun/sun.h diff -u xsrc/external/mit/xorg-server/dist/hw/sun/sun.h:1.5 xsrc/external/mit/xorg-server/dist/hw/sun/sun.h:1.6 --- xsrc/external/mit/xorg-server/dist/hw/sun/sun.h:1.5 Sun Aug 9 07:29:32 2020 +++ xsrc/external/mit/xorg-server/dist/hw/sun/sun.h Sun Aug 9 07:35:42 2020 @@ -296,6 +296,8 @@ typedef struct { extern sunFbDataRec sunFbData[]; extern fbFd sunFbs[]; extern Bool sunSwapLkeys; +extern Bool sunForceMono; +extern Bool sunDebug; extern Bool sunFlipPixels; extern Bool sunFbInfo; extern Bool sunCG4Frob; Index: xsrc/external/mit/xorg-server/dist/hw/sun/sunCfb.c diff -u xsrc/external/mit/xorg-server/dist/hw/sun/sunCfb.c:1.5 xsrc/external/mit/xorg-server/dist/hw/sun/sunCfb.c:1.6 --- xsrc/external/mit/xorg-server/dist/hw/sun/sunCfb.c:1.5 Sun Jul 26 07:20:50 2020 +++ xsrc/external/mit/xorg-server/dist/hw/sun/sunCfb.c Sun Aug 9 07:35:42 2020 @@ -98,7 +98,7 @@ static void CGSaveColormap(ScreenPtr); static void CGRestoreColormap(ScreenPtr); static void CGScreenInitCommon(ScreenPtr); static void CGScreenInit(ScreenPtr); -static void checkMono(int, char **); +static void checkMono(void); #ifdef INCLUDE_CG2_HEADER static void CG2UpdateColormap(ScreenPtr, int, int, u_char *, u_char *, u_char *); static void CG2GetColormap(ScreenPtr, int, int, u_char *, u_char *, u_char *); @@ -308,13 +308,11 @@ CGScreenInit(ScreenPtr pScreen) } static void -checkMono(int argc, char** argv) +checkMono(void) { -int i; -for (i = 1; i < argc; i++) - if (strcmp (argv[i], "-mono") == 0) - ErrorF ("-mono not appropriate for CG3/CG4/CG6\n"); +if (sunForceMono) + ErrorF("-mono not appropriate for CG3/CG4/CG6\n"); } /* @@ -336,7 +334,7 @@ sunCG3Init( { int screen = pScreen->myNum; -checkMono (argc, argv); +checkMono(); sunFbs[screen].EnterLeave = (void (*)(ScreenPtr, int))NoopDDA; return sunInitCommon (screen, pScreen, (off_t) CG3_MMAP_OFFSET, sunCfbScreenInit, CGScreenInit, @@ -352,7 +350,7 @@ sunTCXInit( { int screen = pScreen->myNum; -checkMono (argc, argv); +checkMono(); sunFbs[screen].EnterLeave = (void (*)(ScreenPtr, int))NoopDDA; return sunInitCommon (screen, pScreen, (off_t) 0, sunCfbScreenInit, CGScreenInit, @@ -457,18 +455,12 @@ sunCG2Init( ) { int screen = pScreen->myNum; -int i; Bool ret; -Bool mono = FALSE; - -for (i = 1; i < argc; i++) - if (strcmp (argv[i], "-mono") == 0) - mono = TRUE; sunFbs[screen].EnterLeave = (void (*)(ScreenPtr, int))NoopDDA; pScreen->SaveScreen = CG2SaveScreen; #ifndef LOWMEMFTPT -if (mono) { +if (sunForceMono) { pScreen->whitePixel = 0; pScreen->blackPixel = 1; sunFbs[screen].info.fb_depth = 1; @@ -518,7 +510,7 @@ sunCG4Init( { int screen = pScreen->myNum; -checkMono (argc, argv); +checkMono(); if (sunCG4Frob) sunFbs[screen].EnterLeave = (void (*)(ScreenPtr, int))NoopDDA; else @@ -543,7 +535,7 @@ sunCG6Init( void *fb; int screen = pScreen->myNum; -checkMono (argc, argv); +checkMono(); if (!sunScreenAllocate (pScreen)) return FALSE; if (!sunFbs[screen].fb) { Index: xsrc/external/mit/xorg-server/dist/hw/sun/sunInit.c diff -u xsrc/external/mit/xorg-server/dist/hw/sun/sunInit.c:1.6 xsrc/external/mit/xorg-server/dist/hw/sun/sunInit.c:1.7 --- xsrc/external/mit/xorg-server/dist/hw/sun/sunInit.c:1.6 Sun Aug 9 07:29:32 2020 +++ xsrc/external/mit/xorg-server/dist/hw/sun/sunInit.c Sun Aug 9 07:35:42 2020 @@ -130,6 +130,8 @@ static void sunCfbGetImage(DrawablePtr, static Bool sunDevsInited = FALSE; Bool sunSwapLkeys = FALSE; +Bool sunDebug = FALSE; +Bool sunForceMono = FALSE; Bool sunFlipPixels = FALSE; Bool sunFbInfo = FALSE; Bool sunCG4Frob = FALSE; @@ -589,10 +591,8 @@ InitOutput(ScreenInfo *pScreenInfo, int monitorResolution = 90; if (RunFromSigStopParent) nonBlockConsole = 1; -for (i = 1; i < argc; i++) { - if (!strcmp(argv[i],"-debug")) - nonBlockConsole = 0; -} +if (sunDebug) + nonBlockConsole = 0; /* * Writes to /dev/console can block - causing an Index: xsrc/external/mit/xorg-server/dist/hw/sun/sunIo.c diff -u xsrc/external/mit/xorg-server/dist/hw/sun/sunIo.c:1.2
CVS commit: xsrc/external/mit/xorg-server/dist/hw/sun
Module Name:xsrc Committed By: tsutsui Date: Sun Aug 9 07:29:32 UTC 2020 Modified Files: xsrc/external/mit/xorg-server/dist/hw/sun: sun.h sunInit.c Log Message: Remove a leftover variable for non-XKB autorepeat. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 xsrc/external/mit/xorg-server/dist/hw/sun/sun.h cvs rdiff -u -r1.5 -r1.6 xsrc/external/mit/xorg-server/dist/hw/sun/sunInit.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xorg-server/dist/hw/sun/sun.h diff -u xsrc/external/mit/xorg-server/dist/hw/sun/sun.h:1.4 xsrc/external/mit/xorg-server/dist/hw/sun/sun.h:1.5 --- xsrc/external/mit/xorg-server/dist/hw/sun/sun.h:1.4 Thu Jul 30 14:32:52 2020 +++ xsrc/external/mit/xorg-server/dist/hw/sun/sun.h Sun Aug 9 07:29:32 2020 @@ -293,7 +293,6 @@ typedef struct { } sunFbDataRec; /* sunInit.c */ -extern Bool sunAutoRepeatHandlersInstalled; extern sunFbDataRec sunFbData[]; extern fbFd sunFbs[]; extern Bool sunSwapLkeys; Index: xsrc/external/mit/xorg-server/dist/hw/sun/sunInit.c diff -u xsrc/external/mit/xorg-server/dist/hw/sun/sunInit.c:1.5 xsrc/external/mit/xorg-server/dist/hw/sun/sunInit.c:1.6 --- xsrc/external/mit/xorg-server/dist/hw/sun/sunInit.c:1.5 Sun Aug 9 06:30:46 2020 +++ xsrc/external/mit/xorg-server/dist/hw/sun/sunInit.c Sun Aug 9 07:29:32 2020 @@ -129,7 +129,6 @@ static void sunCfbGetImage(DrawablePtr, static Bool sunDevsInited = FALSE; -Bool sunAutoRepeatHandlersInstalled; /* FALSE each time InitOutput called */ Bool sunSwapLkeys = FALSE; Bool sunFlipPixels = FALSE; Bool sunFbInfo = FALSE;
CVS commit: src/sys/arch/aarch64/aarch64
Module Name:src Committed By: skrll Date: Sun Aug 9 07:26:20 UTC 2020 Modified Files: src/sys/arch/aarch64/aarch64: fault.c Log Message: Don't use %s in UVMHIST_PRINT. Remove an unnecessary #ifdef UVMHIST while I'm here To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/aarch64/aarch64/fault.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/aarch64/aarch64/fault.c diff -u src/sys/arch/aarch64/aarch64/fault.c:1.18 src/sys/arch/aarch64/aarch64/fault.c:1.19 --- src/sys/arch/aarch64/aarch64/fault.c:1.18 Thu Aug 6 06:50:39 2020 +++ src/sys/arch/aarch64/aarch64/fault.c Sun Aug 9 07:26:20 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: fault.c,v 1.18 2020/08/06 06:50:39 ryo Exp $ */ +/* $NetBSD: fault.c,v 1.19 2020/08/09 07:26:20 skrll Exp $ */ /* * Copyright (c) 2017 Ryo Shimizu @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.18 2020/08/06 06:50:39 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.19 2020/08/09 07:26:20 skrll Exp $"); #include "opt_compat_netbsd32.h" #include "opt_ddb.h" @@ -181,16 +181,13 @@ data_abort_handler(struct trapframe *tf, else ftype = (rw == 0) ? VM_PROT_READ : VM_PROT_WRITE; -#ifdef UVMHIST if (ftype & VM_PROT_EXECUTE) { - UVMHIST_LOG(pmaphist, "pagefault %016lx %016lx in %s EXEC", - tf->tf_far, va, user ? "user" : "kernel", 0); + UVMHIST_LOG(pmaphist, "pagefault %016jx %016jx user=%jd EXEC", + tf->tf_far, va, user, 0); } else { - UVMHIST_LOG(pmaphist, "pagefault %016lx %016lx in %s %s", - tf->tf_far, va, user ? "user" : "kernel", - (rw == 0) ? "read" : "write"); + UVMHIST_LOG(pmaphist, "pagefault %016lx %016lx user=%jd " + "write=%jd", tf->tf_far, va, user, rw); } -#endif if (__predict_false(!user && (map != kernel_map) && (tf->tf_spsr & SPSR_PAN))) {
CVS commit: src/usr.bin/make/unit-tests
Module Name:src Committed By: rillig Date: Sun Aug 9 07:18:03 UTC 2020 Modified Files: src/usr.bin/make/unit-tests: modmisc.exp modmisc.mk Log Message: make(1): add another test case for mod-subst-dollar Having only 8 dollar signs does not prove anything. It might still be the result of 3 substitutions in a row. Having 5 substitutions in a row is less likely though. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/usr.bin/make/unit-tests/modmisc.exp cvs rdiff -u -r1.36 -r1.37 src/usr.bin/make/unit-tests/modmisc.mk 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/unit-tests/modmisc.exp diff -u src/usr.bin/make/unit-tests/modmisc.exp:1.38 src/usr.bin/make/unit-tests/modmisc.exp:1.39 --- src/usr.bin/make/unit-tests/modmisc.exp:1.38 Sat Aug 8 13:09:55 2020 +++ src/usr.bin/make/unit-tests/modmisc.exp Sun Aug 9 07:18:03 2020 @@ -54,6 +54,7 @@ mod-subst-dollar:$5: mod-subst-dollar:$6: mod-subst-dollar:$7: mod-subst-dollar:$8: +mod-subst-dollar:$40: mod-subst-dollar:U8: mod-subst-dollar:: mod-loop-dollar:1: Index: src/usr.bin/make/unit-tests/modmisc.mk diff -u src/usr.bin/make/unit-tests/modmisc.mk:1.36 src/usr.bin/make/unit-tests/modmisc.mk:1.37 --- src/usr.bin/make/unit-tests/modmisc.mk:1.36 Sat Aug 8 13:09:55 2020 +++ src/usr.bin/make/unit-tests/modmisc.mk Sun Aug 9 07:18:03 2020 @@ -1,4 +1,4 @@ -# $Id: modmisc.mk,v 1.36 2020/08/08 13:09:55 rillig Exp $ +# $Id: modmisc.mk,v 1.37 2020/08/09 07:18:03 rillig Exp $ # # miscellaneous modifier tests @@ -216,6 +216,7 @@ mod-subst-dollar: @echo $@:${:U6:S,^,$$,:Q}: @echo $@:${:U7:S,^,$$$,:Q}: @echo $@:${:U8:S,^,,:Q}: + @echo $@:${:U40:S,^,,:Q}: # This generates no dollar at all: @echo $@:${:UU8:S,^,${:U},:Q}: # Here is an alternative way to generate dollar characters.
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sun Aug 9 07:09:57 UTC 2020 Modified Files: src/usr.bin/make: var.c Log Message: make(1): restrict the type of startc and endc to char To generate a diff of this commit: cvs rdiff -u -r1.436 -r1.437 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/var.c diff -u src/usr.bin/make/var.c:1.436 src/usr.bin/make/var.c:1.437 --- src/usr.bin/make/var.c:1.436 Sun Aug 9 07:03:06 2020 +++ src/usr.bin/make/var.c Sun Aug 9 07:09:57 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: var.c,v 1.436 2020/08/09 07:03:06 rillig Exp $ */ +/* $NetBSD: var.c,v 1.437 2020/08/09 07:09:57 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: var.c,v 1.436 2020/08/09 07:03:06 rillig Exp $"; +static char rcsid[] = "$NetBSD: var.c,v 1.437 2020/08/09 07:09:57 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: var.c,v 1.436 2020/08/09 07:03:06 rillig Exp $"); +__RCSID("$NetBSD: var.c,v 1.437 2020/08/09 07:09:57 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -1909,8 +1909,8 @@ VarStrftime(const char *fmt, Boolean zul */ typedef struct { -const int startc; /* '\0' or '{' or '(' */ -const int endc; +const char startc; /* '\0' or '{' or '(' */ +const char endc; /* '\0' or '}' or ')' */ Var * const v; GNode * const ctxt; const VarEvalFlags eflags; @@ -2984,8 +2984,8 @@ static char * ApplyModifiers( const char **pp, /* the parsing position, updated upon return */ char *val, /* the current value of the variable */ -int const startc, /* '(' or '{' or '\0' */ -int const endc, /* ')' or '}' or '\0' */ +char const startc, /* '(' or '{' or '\0' */ +char const endc, /* ')' or '}' or '\0' */ Var * const v, /* the variable may have its flags changed */ GNode * const ctxt, /* for looking up and modifying variables */ VarEvalFlags const eflags,
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: skrll Date: Sun Aug 9 07:09:35 UTC 2020 Modified Files: src/sys/arch/mips/mips: vm_machdep.c Log Message: Add a comment To generate a diff of this commit: cvs rdiff -u -r1.160 -r1.161 src/sys/arch/mips/mips/vm_machdep.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/mips/mips/vm_machdep.c diff -u src/sys/arch/mips/mips/vm_machdep.c:1.160 src/sys/arch/mips/mips/vm_machdep.c:1.161 --- src/sys/arch/mips/mips/vm_machdep.c:1.160 Wed Nov 20 19:37:52 2019 +++ src/sys/arch/mips/mips/vm_machdep.c Sun Aug 9 07:09:35 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: vm_machdep.c,v 1.160 2019/11/20 19:37:52 pgoyette Exp $ */ +/* $NetBSD: vm_machdep.c,v 1.161 2020/08/09 07:09:35 skrll Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.160 2019/11/20 19:37:52 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.161 2020/08/09 07:09:35 skrll Exp $"); #include "opt_ddb.h" #include "opt_cputype.h" @@ -120,6 +120,10 @@ cpu_lwp_fork(struct lwp *l1, struct lwp l2->l_md.md_upte[i] = 0; } if (!pmap_md_direct_mapped_vaddr_p(ua2)) { + /* + * UPAGES has to be 2 for 4KB PAGE_SIZE + * UPAGES has to be 1 for >= 8KB PAGE_SIZE + */ CTASSERT((PGSHIFT == 12) == (UPAGES == 2)); pt_entry_t * const pte = pmap_pte_lookup(pmap_kernel(), ua2); const uint32_t x = MIPS_HAS_R4K_MMU
CVS commit: src/sys/arch/mips/ingenic
Module Name:src Committed By: skrll Date: Sun Aug 9 07:08:29 UTC 2020 Modified Files: src/sys/arch/mips/ingenic: ingenic_regs.h Log Message: Type consistency To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/mips/ingenic/ingenic_regs.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/ingenic/ingenic_regs.h diff -u src/sys/arch/mips/ingenic/ingenic_regs.h:1.25 src/sys/arch/mips/ingenic/ingenic_regs.h:1.26 --- src/sys/arch/mips/ingenic/ingenic_regs.h:1.25 Sun May 21 06:49:13 2017 +++ src/sys/arch/mips/ingenic/ingenic_regs.h Sun Aug 9 07:08:29 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ingenic_regs.h,v 1.25 2017/05/21 06:49:13 skrll Exp $ */ +/* $NetBSD: ingenic_regs.h,v 1.26 2020/08/09 07:08:29 skrll Exp $ */ /*- * Copyright (c) 2014 Michael Lorenz @@ -118,7 +118,7 @@ static inline void writereg(uint32_t reg, uint32_t val) { - *(volatile int32_t *)MIPS_PHYS_TO_KSEG1(reg) = val; + *(volatile uint32_t *)MIPS_PHYS_TO_KSEG1(reg) = val; wbflush(); } @@ -126,7 +126,7 @@ static inline uint32_t readreg(uint32_t reg) { wbflush(); - return *(volatile int32_t *)MIPS_PHYS_TO_KSEG1(reg); + return *(volatile uint32_t *)MIPS_PHYS_TO_KSEG1(reg); }
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sun Aug 9 07:03:06 UTC 2020 Modified Files: src/usr.bin/make: enum.h var.c Log Message: make(1): use fixed-size arrays for Enum_ToString Declaring the ToStringSize as "static const size_t" made it an ordinary integer expression. To avoid variable length arrays, the commonly accepted way is to declare the length as an enum constant, as that is considered an integer constant expression, which in turn makes the declaration a fixed-size array. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/enum.h cvs rdiff -u -r1.435 -r1.436 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/enum.h diff -u src/usr.bin/make/enum.h:1.3 src/usr.bin/make/enum.h:1.4 --- src/usr.bin/make/enum.h:1.3 Sun Aug 9 02:53:21 2020 +++ src/usr.bin/make/enum.h Sun Aug 9 07:03:06 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: enum.h,v 1.3 2020/08/09 02:53:21 christos Exp $ */ +/* $NetBSD: enum.h,v 1.4 2020/08/09 07:03:06 rillig Exp $ */ /* Copyright (c) 2020 Roland Illig @@ -59,10 +59,8 @@ const char *Enum_ToString(char *, size_t #v1 ENUM__SEP ENUM__JOIN_6(v2, v3, v4, v5, v6, v7) #define ENUM__RTTI(typnam, specs, joined) \ - static const EnumToStringSpec typnam ## _ ## ToStringSpecs[] = specs; -#if 0 - static const size_t typnam ## _ ## ToStringSize = sizeof joined -#endif + static const EnumToStringSpec typnam ## _ ## ToStringSpecs[] = specs; \ + enum { typnam ## _ ## ToStringSize = sizeof joined } #define ENUM__SPEC(v) { v, #v } Index: src/usr.bin/make/var.c diff -u src/usr.bin/make/var.c:1.435 src/usr.bin/make/var.c:1.436 --- src/usr.bin/make/var.c:1.435 Sun Aug 9 02:53:21 2020 +++ src/usr.bin/make/var.c Sun Aug 9 07:03:06 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: var.c,v 1.435 2020/08/09 02:53:21 christos Exp $ */ +/* $NetBSD: var.c,v 1.436 2020/08/09 07:03:06 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: var.c,v 1.435 2020/08/09 02:53:21 christos Exp $"; +static char rcsid[] = "$NetBSD: var.c,v 1.436 2020/08/09 07:03:06 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: var.c,v 1.435 2020/08/09 02:53:21 christos Exp $"); +__RCSID("$NetBSD: var.c,v 1.436 2020/08/09 07:03:06 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -3064,8 +3064,8 @@ ApplyModifiers( mod = p; if (DEBUG(VAR)) { - char vflags_str[2048]; - char eflags_str[2048]; + char eflags_str[VarEvalFlags_ToStringSize]; + char vflags_str[VarFlags_ToStringSize]; Boolean is_single_char = mod[0] != '\0' && (mod[1] == endc || mod[1] == ':'); @@ -3211,8 +3211,8 @@ ApplyModifiers( goto bad_modifier; if (DEBUG(VAR)) { - char eflags_str[2048]; - char vflags_str[2048]; + char eflags_str[VarEvalFlags_ToStringSize]; + char vflags_str[VarFlags_ToStringSize]; const char *q = st.newVal == var_Error ? "" : "\""; const char *newVal = st.newVal == var_Error ? "error" : st.newVal; @@ -3348,7 +3348,7 @@ Var_Parse(const char * const str, GNode const char *extramodifiers; Var *v; char *nstr; -char eflags_str[2048]; +char eflags_str[VarEvalFlags_ToStringSize]; VAR_DEBUG("%s: %s with %s\n", __func__, str, Enum_ToString(eflags_str, sizeof eflags_str, eflags,
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: skrll Date: Sun Aug 9 06:43:29 UTC 2020 Modified Files: src/sys/arch/mips/mips: syscall.c Log Message: KNF To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50 src/sys/arch/mips/mips/syscall.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/mips/mips/syscall.c diff -u src/sys/arch/mips/mips/syscall.c:1.49 src/sys/arch/mips/mips/syscall.c:1.50 --- src/sys/arch/mips/mips/syscall.c:1.49 Sun Jul 31 07:06:24 2016 +++ src/sys/arch/mips/mips/syscall.c Sun Aug 9 06:43:29 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: syscall.c,v 1.49 2016/07/31 07:06:24 skrll Exp $ */ +/* $NetBSD: syscall.c,v 1.50 2020/08/09 06:43:29 skrll Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.49 2016/07/31 07:06:24 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.50 2020/08/09 06:43:29 skrll Exp $"); #include #include @@ -196,7 +196,7 @@ EMULNAME(syscall)(struct lwp *l, u_int s * Start copying args skipping the register slots * slots on the stack. */ - usp = reg->r_regs[_R_SP] + nsaved*sizeof(register_t); + usp = reg->r_regs[_R_SP] + nsaved * sizeof(register_t); error = copyin((register_t *)usp, [nregs], (nargs - nregs) * sizeof(copyargs[0])); if (error) @@ -236,7 +236,7 @@ EMULNAME(syscall)(struct lwp *l, u_int s * after skipping the slots for the 4 register passed * arguments. */ - usp = reg->r_regs[_R_SP] + 4*sizeof(int32_t); + usp = reg->r_regs[_R_SP] + 4 * sizeof(int32_t); error = copyin((int32_t *)usp, copy32args, (nargs + narg64 - nregs) * sizeof(copy32args[0])); if (error)
CVS commit: xsrc/external/mit/xorg-server/dist/hw/sun
Module Name:xsrc Committed By: tsutsui Date: Sun Aug 9 06:30:46 UTC 2020 Modified Files: xsrc/external/mit/xorg-server/dist/hw/sun: sunInit.c Log Message: Inform detected keyboard type and layout via LogMessage(). To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 xsrc/external/mit/xorg-server/dist/hw/sun/sunInit.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xorg-server/dist/hw/sun/sunInit.c diff -u xsrc/external/mit/xorg-server/dist/hw/sun/sunInit.c:1.4 xsrc/external/mit/xorg-server/dist/hw/sun/sunInit.c:1.5 --- xsrc/external/mit/xorg-server/dist/hw/sun/sunInit.c:1.4 Tue Aug 4 14:31:04 2020 +++ xsrc/external/mit/xorg-server/dist/hw/sun/sunInit.c Sun Aug 9 06:30:46 2020 @@ -526,7 +526,13 @@ OsVendorInit(void) if (sunPtrPriv.fd < 0) FatalError ("Cannot open /dev/mouse, error %d\n", errno); getKbdType (); - if (sunKbdPriv.type == KB_SUN4) { + switch (sunKbdPriv.type) { + case KB_SUN2: + case KB_SUN3: + LogMessage(X_INFO, "Sun type %d Keyboard\n", sunKbdPriv.type); + break; + case KB_SUN4: +#define LAYOUT_US5 33 (void) ioctl (sunKbdPriv.fd, KIOCLAYOUT, ); if (sunKbdPriv.layout < 0 || sunKbdPriv.layout > sunMaxLayout || @@ -534,6 +540,12 @@ OsVendorInit(void) FatalError ("Unsupported keyboard type 4 layout %d\n", sunKbdPriv.layout); sunKeySyms[KB_SUN4].map = sunType4KeyMaps[sunKbdPriv.layout]; + LogMessage(X_INFO, "Sun type %d Keyboard, layout %d\n", + sunKbdPriv.layout >= LAYOUT_US5 ? 5 : 4, sunKbdPriv.layout); + break; + default: + LogMessage(X_INFO, "Unknown keyboard type\n"); + break; } inited = 1; }
CVS commit: src/sys
Module Name:src Committed By: skrll Date: Sun Aug 9 06:26:49 UTC 2020 Modified Files: src/sys/arch/mips/include: cpu.h src/sys/arch/mips/mips: cpu_subr.c src/sys/uvm/pmap: pmap_tlb.c Log Message: Don't kcpuset_clone every pmap_tlb_shootdown_bystanders. Instead allocate a kcpuset_t per cpu_info and use that. To generate a diff of this commit: cvs rdiff -u -r1.129 -r1.130 src/sys/arch/mips/include/cpu.h cvs rdiff -u -r1.56 -r1.57 src/sys/arch/mips/mips/cpu_subr.c cvs rdiff -u -r1.33 -r1.34 src/sys/uvm/pmap/pmap_tlb.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/mips/include/cpu.h diff -u src/sys/arch/mips/include/cpu.h:1.129 src/sys/arch/mips/include/cpu.h:1.130 --- src/sys/arch/mips/include/cpu.h:1.129 Sun Jul 26 08:08:41 2020 +++ src/sys/arch/mips/include/cpu.h Sun Aug 9 06:26:49 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.129 2020/07/26 08:08:41 simonb Exp $ */ +/* $NetBSD: cpu.h,v 1.130 2020/08/09 06:26:49 skrll Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -151,6 +151,7 @@ struct cpu_info { #define CPUF_RUNNING 0x04 /* CPU is running */ #define CPUF_PAUSED 0x08 /* CPU is paused */ #define CPUF_USERPMAP 0x20 /* CPU has a user pmap activated */ + kcpuset_t *ci_shootdowncpus; kcpuset_t *ci_multicastcpus; kcpuset_t *ci_watchcpus; kcpuset_t *ci_ddbcpus; Index: src/sys/arch/mips/mips/cpu_subr.c diff -u src/sys/arch/mips/mips/cpu_subr.c:1.56 src/sys/arch/mips/mips/cpu_subr.c:1.57 --- src/sys/arch/mips/mips/cpu_subr.c:1.56 Tue Jul 21 06:01:10 2020 +++ src/sys/arch/mips/mips/cpu_subr.c Sun Aug 9 06:26:49 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu_subr.c,v 1.56 2020/07/21 06:01:10 simonb Exp $ */ +/* $NetBSD: cpu_subr.c,v 1.57 2020/08/09 06:26:49 skrll Exp $ */ /*- * Copyright (c) 2010, 2019 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.56 2020/07/21 06:01:10 simonb Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.57 2020/08/09 06:26:49 skrll Exp $"); #include "opt_cputype.h" #include "opt_ddb.h" @@ -291,6 +291,7 @@ cpu_attach_common(device_t self, struct */ ipi_init(ci); + kcpuset_create(>ci_shootdowncpus, true); kcpuset_create(>ci_multicastcpus, true); kcpuset_create(>ci_watchcpus, true); kcpuset_create(>ci_ddbcpus, true); Index: src/sys/uvm/pmap/pmap_tlb.c diff -u src/sys/uvm/pmap/pmap_tlb.c:1.33 src/sys/uvm/pmap/pmap_tlb.c:1.34 --- src/sys/uvm/pmap/pmap_tlb.c:1.33 Tue Apr 14 05:43:57 2020 +++ src/sys/uvm/pmap/pmap_tlb.c Sun Aug 9 06:26:49 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_tlb.c,v 1.33 2020/04/14 05:43:57 skrll Exp $ */ +/* $NetBSD: pmap_tlb.c,v 1.34 2020/08/09 06:26:49 skrll Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.33 2020/04/14 05:43:57 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.34 2020/08/09 06:26:49 skrll Exp $"); /* * Manages address spaces in a TLB. @@ -643,8 +643,9 @@ pmap_tlb_shootdown_bystanders(pmap_t pm) UVMHIST_FUNC(__func__); UVMHIST_CALLARGS(maphist, "pm %#jx", (uintptr_t)pm, 0, 0, 0); - kcpuset_t *pm_active; - kcpuset_clone(_active, pm->pm_active); + const struct cpu_info * const ci = curcpu(); + kcpuset_t *pm_active = ci->ci_shootdowncpus; + kcpuset_copy(pm_active, pm->pm_active); kcpuset_remove(pm_active, cpu_tlb_info(curcpu())->ti_kcpuset); const bool kernel_p = (pm == pmap_kernel()); bool ipi_sent = false; @@ -719,8 +720,6 @@ pmap_tlb_shootdown_bystanders(pmap_t pm) TLBINFO_UNLOCK(ti); } - kcpuset_destroy(pm_active); - UVMHIST_LOG(maphist, " <-- done (ipi_sent=%jd)", ipi_sent, 0, 0, 0); return ipi_sent;