CVS commit: src/sys/dev
Module Name:src Committed By: nat Date: Sun Jun 4 05:37:56 UTC 2017 Modified Files: src/sys/dev: audiobell.c Log Message: Fix volume botch. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/dev/audiobell.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/audiobell.c diff -u src/sys/dev/audiobell.c:1.19 src/sys/dev/audiobell.c:1.20 --- src/sys/dev/audiobell.c:1.19 Sun May 28 21:15:58 2017 +++ src/sys/dev/audiobell.c Sun Jun 4 05:37:56 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: audiobell.c,v 1.19 2017/05/28 21:15:58 nat Exp $ */ +/* $NetBSD: audiobell.c,v 1.20 2017/06/04 05:37:56 nat Exp $ */ /* @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: audiobell.c,v 1.19 2017/05/28 21:15:58 nat Exp $"); +__KERNEL_RCSID(0, "$NetBSD: audiobell.c,v 1.20 2017/06/04 05:37:56 nat Exp $"); #include #include @@ -125,7 +125,7 @@ audiobell(void *v, u_int pitch, u_int pe ai.play.sample_rate = BELL_SAMPLE_RATE; ai.play.precision = 16; - ai.play.gain = 255 * 100 / volume; + ai.play.gain = 255 * volume / 100; #if BYTE_ORDER == LITTLE_ENDIAN ai.play.encoding = AUDIO_ENCODING_SLINEAR_LE;
CVS commit: src/bin/sh
Module Name:src Committed By: kre Date: Sat Jun 3 21:52:05 UTC 2017 Modified Files: src/bin/sh: expand.c Log Message: DEBUG mode only change. Convert old trace style to new, and add some more. NFC for any non-DEBUG shell. To generate a diff of this commit: cvs rdiff -u -r1.109 -r1.110 src/bin/sh/expand.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/sh/expand.c diff -u src/bin/sh/expand.c:1.109 src/bin/sh/expand.c:1.110 --- src/bin/sh/expand.c:1.109 Sat Jun 3 20:55:53 2017 +++ src/bin/sh/expand.c Sat Jun 3 21:52:05 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: expand.c,v 1.109 2017/06/03 20:55:53 kre Exp $ */ +/* $NetBSD: expand.c,v 1.110 2017/06/03 21:52:05 kre Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)expand.c 8.5 (Berkeley) 5/15/95"; #else -__RCSID("$NetBSD: expand.c,v 1.109 2017/06/03 20:55:53 kre Exp $"); +__RCSID("$NetBSD: expand.c,v 1.110 2017/06/03 21:52:05 kre Exp $"); #endif #endif /* not lint */ @@ -225,7 +225,7 @@ argstr(const char *p, int flag) if (flag & EXP_IFS_SPLIT) ifs = ifsval(); - VTRACE(DBG_EXPAND, ("argstr(\"%s\", %#x) quotes=%#x\n", p,flag,quotes)); + CTRACE(DBG_EXPAND, ("argstr(\"%s\", %#x) quotes=%#x\n", p,flag,quotes)); if (*p == '~' && (flag & (EXP_TILDE | EXP_VARTILDE))) p = exptilde(p, flag); @@ -343,6 +343,8 @@ exptilde(const char *p, int flag) } done: STACKSTRNUL(user); + + CTRACE(DBG_EXPAND, ("exptilde, found \"~%s\" :", expdest)); if (*expdest == '\0') home = lookupvar("HOME"); else if ((pw = getpwnam(expdest)) == NULL) @@ -358,6 +360,8 @@ exptilde(const char *p, int flag) STPUTC(CTLESC, expdest); STPUTC(c, expdest); } + CTRACE(DBG_EXPAND, ("returning \"%s\"\n", p)); + return (p); } @@ -513,6 +517,7 @@ expbackq(union node *cmd, int quoted, in int quotes = flag & (EXP_GLOB | EXP_CASE); int nnl; + VTRACE(DBG_EXPAND, ("expbackq( ..., q=%d flag=%#x)\n", quoted, flag)); INTOFF; saveifs = ifsfirst; savelastp = ifslastp; @@ -536,7 +541,7 @@ expbackq(union node *cmd, int quoted, in break; while ((i = read(in.fd, buf, sizeof buf)) < 0 && errno == EINTR) continue; - TRACE(("expbackq: read returns %d\n", i)); + VTRACE(DBG_EXPAND, ("expbackq: read returns %d\n", i)); if (i <= 0) break; p = buf; @@ -567,7 +572,7 @@ expbackq(union node *cmd, int quoted, in back_exitstatus = waitforjob(in.jp); if (quoted == 0) recordregion(startloc, dest - stackblock(), 0); - TRACE(("evalbackq: size=%d: \"%.*s\"\n", + CTRACE(DBG_EXPAND, ("evalbackq: size=%d: \"%.*s\"\n", (int)((dest - stackblock()) - startloc), (int)((dest - stackblock()) - startloc), stackblock() + startloc)); @@ -640,6 +645,11 @@ subevalvar_trim(const char *p, int strlo abort(); break; } + + VTRACE(DBG_EXPAND, + ("subevalvar_trim(\"%.9s\", STR@%d, SUBT=%d, start@%d, vf=%x, q=%x)\n", + p, strloc, subtype, startloc, varflags, quotes)); + argstr(p, (varflags & (VSQUOTE|VSPATQ)) == VSQUOTE ? 0 : EXP_CASE); STACKSTRNUL(expdest); herefd = saveherefd; @@ -753,6 +763,10 @@ evalvar(const char *p, int flag) special = !is_name(*p); p = strchr(p, '=') + 1; + CTRACE(DBG_EXPAND, + ("evalvar \"%.*s\", flag=%#X quotes=%#X vf=%#X subtype=%X\n", + p - var - 1, var, flag, quotes, varflags, subtype)); + again: /* jump here after setting a variable with ${var=text} */ if (varflags & VSLINENO) { set = 1; @@ -1133,8 +1147,10 @@ ifsbreakup(char *string, struct arglist start = string; + VTRACE(DBG_EXPAND, ("ifsbreakup(\"%s\")", string)); /* misses \0's */ if (ifslastp == NULL) { /* Return entire argument, IFS doesn't apply to any of it */ + VTRACE(DBG_EXPAND, ("no regions\n", string)); sp = stalloc(sizeof(*sp)); sp->text = start; *arglist->lastp = sp; @@ -1146,6 +1162,8 @@ ifsbreakup(char *string, struct arglist for (ifsp = ifsp != NULL; ifsp = ifsp->next) { p = string + ifsp->begoff; + VTRACE(DBG_EXPAND, (" !%.*s!(%d)", ifsp->endoff-ifsp->begoff, + p, ifsp->endoff-ifsp->begoff)); while (p < string + ifsp->endoff) { had_param_ch = 1; q = p; @@ -1158,6 +1176,7 @@ ifsbreakup(char *string, struct arglist continue; } ifsspc = NULL; +VTRACE(DBG_EXPAND, (" \\0 nxt:\"%s\" ", p)); } else { if (!strchr(ifs, *p)) { p++; @@ -1176,6 +1195,7 @@ ifsbreakup(char *string, struct arglist /* Save this argument... */ *q = '\0'; + VTRACE(DBG_EXPAND, ("<%s>", start)); sp = stalloc(sizeof(*sp)); sp->text = start; *arglist->lastp = sp; @@ -1210,11 +1230,13 @@ ifsbreakup(char *string, struct arglist * should only generate one */ if (had_param_ch || *start != 0) { + VTRACE(DBG_EXPAND, (" T<%s>", start)); sp = stalloc(sizeof(*sp)); sp->text = start; *arglist->lastp = sp; arglist->lastp = >next; } + VTRACE(DBG_EXPAND, ("\n")); } STATIC
CVS commit: src/sys/arch/sparc64/dev
Module Name:src Committed By: mrg Date: Sat Jun 3 21:32:43 UTC 2017 Modified Files: src/sys/arch/sparc64/dev: schizo.c Log Message: add __func__ to some panic strings. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/arch/sparc64/dev/schizo.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/sparc64/dev/schizo.c diff -u src/sys/arch/sparc64/dev/schizo.c:1.38 src/sys/arch/sparc64/dev/schizo.c:1.39 --- src/sys/arch/sparc64/dev/schizo.c:1.38 Sun Mar 26 18:38:33 2017 +++ src/sys/arch/sparc64/dev/schizo.c Sat Jun 3 21:32:43 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: schizo.c,v 1.38 2017/03/26 18:38:33 martin Exp $ */ +/* $NetBSD: schizo.c,v 1.39 2017/06/03 21:32:43 mrg Exp $ */ /* $OpenBSD: schizo.c,v 1.55 2008/08/18 20:29:37 brad Exp $ */ /* @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: schizo.c,v 1.38 2017/03/26 18:38:33 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: schizo.c,v 1.39 2017/06/03 21:32:43 mrg Exp $"); #include #include @@ -439,7 +439,7 @@ schizo_pci_error(void *vpbm) } } - panic("%s: fatal", device_xname(sc->sc_dev)); + panic("%s: %s: fatal", __func__, device_xname(sc->sc_dev)); clear_error: schizo_cfg_write(sp, PCI_COMMAND_STATUS_REG, csr); @@ -461,7 +461,7 @@ schizo_safari_error(void *vsc) printf("CE_AFSR=%" PRIx64 "\n", schizo_read(sc, SCZ_CE_AFSR)); printf("CE_AFAR=%" PRIx64 "\n", schizo_read(sc, SCZ_CE_AFAR)); - panic("%s: fatal", device_xname(sc->sc_dev)); + panic("%s: %s: fatal", __func__, device_xname(sc->sc_dev)); return (1); }
CVS commit: src/usr.bin/midirecord
Module Name:src Committed By: mrg Date: Sat Jun 3 21:31:14 UTC 2017 Modified Files: src/usr.bin/midirecord: midirecord.c Log Message: avoid assert() and simply return errors. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/usr.bin/midirecord/midirecord.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/midirecord/midirecord.c diff -u src/usr.bin/midirecord/midirecord.c:1.11 src/usr.bin/midirecord/midirecord.c:1.12 --- src/usr.bin/midirecord/midirecord.c:1.11 Sun Dec 11 08:40:10 2016 +++ src/usr.bin/midirecord/midirecord.c Sat Jun 3 21:31:14 2017 @@ -1,7 +1,7 @@ -/* $NetBSD: midirecord.c,v 1.11 2016/12/11 08:40:10 mrg Exp $ */ +/* $NetBSD: midirecord.c,v 1.12 2017/06/03 21:31:14 mrg Exp $ */ /* - * Copyright (c) 2014, 2015 Matthew R. Green + * Copyright (c) 2014, 2015, 2017 Matthew R. Green * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -33,7 +33,7 @@ #include #ifndef lint -__RCSID("$NetBSD: midirecord.c,v 1.11 2016/12/11 08:40:10 mrg Exp $"); +__RCSID("$NetBSD: midirecord.c,v 1.12 2017/06/03 21:31:14 mrg Exp $"); #endif #include @@ -53,7 +53,6 @@ __RCSID("$NetBSD: midirecord.c,v 1.11 20 #include #include #include -#include #include #include "libaudio.h" @@ -327,6 +326,11 @@ midi_event_timer_wait_abs_to_output( unsigned val = 0, xdiv; int vallen = 0, i; + if (bufsize < 4) { + warnx("too small bufsize: %zu", bufsize); + return 0; + } + if (prev_div == 0 && !oflag) prev_div = e.t_WAIT_ABS.divisions; cur_div = e.t_WAIT_ABS.divisions; @@ -415,9 +419,18 @@ midi_event_chn_common_to_output(seq_even { size_t size = 0; - assert(e.common.channel < 16); LOG("SEQ_CHN_COMMON"); + if (bufsize < 3) { + warnx("too small bufsize: %zu", bufsize); + return 0; + } + + if (e.common.channel >= 16) { + warnx("invalid channel: %u", e.common.channel); + return 0; + } + if (filter_devchan(e.common.device, e.common.channel)) return 0; @@ -474,9 +487,18 @@ midi_event_chn_voice_to_output(seq_event { size_t size = 0; - assert(e.common.channel < 16); LOG("SEQ_CHN_VOICE"); + if (bufsize < 3) { + warnx("too small bufsize: %zu", bufsize); + return 0; + } + + if (e.common.channel >= 16) { + warnx("invalid channel: %u", e.common.channel); + return 0; + } + if (filter_devchan(e.voice.device, e.voice.channel)) return 0; @@ -554,9 +576,6 @@ midi_event_to_output(seq_event_t e, u_ch { size_t size = 0; - /* XXX so far we only process 4 byte returns */ - assert(bufsize >= 4); - LOG("event: %02x:%02x:%02x:%02x %02x:%02x:%02x:%02x", e.tag, e.unknown.byte[0], e.unknown.byte[1], e.unknown.byte[2], e.unknown.byte[3], @@ -716,8 +735,10 @@ cleanup(int signo) err(1, "failed to stop midi timer"); } - close(outfd); - close(midifd); + if (close(outfd) != 0) + warn("couldn't close output"); + if (close(midifd) != 0) + warn("couldn't close midi device"); if (signo != 0) (void)raise_default_signal(signo);
CVS commit: src/usr.bin/gzip
Module Name:src Committed By: mrg Date: Sat Jun 3 21:28:48 UTC 2017 Modified Files: src/usr.bin/gzip: gzip.1 gzip.c Log Message: update copyright strings. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/usr.bin/gzip/gzip.1 cvs rdiff -u -r1.109 -r1.110 src/usr.bin/gzip/gzip.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/gzip/gzip.1 diff -u src/usr.bin/gzip/gzip.1:1.27 src/usr.bin/gzip/gzip.1:1.28 --- src/usr.bin/gzip/gzip.1:1.27 Sun Jan 8 14:18:31 2017 +++ src/usr.bin/gzip/gzip.1 Sat Jun 3 21:28:48 2017 @@ -1,6 +1,6 @@ -.\" $NetBSD: gzip.1,v 1.27 2017/01/08 14:18:31 wiz Exp $ +.\" $NetBSD: gzip.1,v 1.28 2017/06/03 21:28:48 mrg Exp $ .\" -.\" Copyright (c) 1997, 2003, 2004 Matthew R. Green +.\" Copyright (c) 1997, 2003, 2004, 2008, 2009, 2015 Matthew R. Green .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without Index: src/usr.bin/gzip/gzip.c diff -u src/usr.bin/gzip/gzip.c:1.109 src/usr.bin/gzip/gzip.c:1.110 --- src/usr.bin/gzip/gzip.c:1.109 Tue Oct 27 07:36:18 2015 +++ src/usr.bin/gzip/gzip.c Sat Jun 3 21:28:48 2017 @@ -1,7 +1,8 @@ -/* $NetBSD: gzip.c,v 1.109 2015/10/27 07:36:18 mrg Exp $ */ +/* $NetBSD: gzip.c,v 1.110 2017/06/03 21:28:48 mrg Exp $ */ /* - * Copyright (c) 1997, 1998, 2003, 2004, 2006 Matthew R. Green + * Copyright (c) 1997, 1998, 2003, 2004, 2006, 2008, 2009, 2010, 2011, 2015 + *Matthew R. Green * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -28,9 +29,9 @@ #include #ifndef lint -__COPYRIGHT("@(#) Copyright (c) 1997, 1998, 2003, 2004, 2006\ - Matthew R. Green. All rights reserved."); -__RCSID("$NetBSD: gzip.c,v 1.109 2015/10/27 07:36:18 mrg Exp $"); +__COPYRIGHT("@(#) Copyright (c) 1997, 1998, 2003, 2004, 2006, 2008,\ + 2009, 2010, 2011, 2015 Matthew R. Green. All rights reserved."); +__RCSID("$NetBSD: gzip.c,v 1.110 2017/06/03 21:28:48 mrg Exp $"); #endif /* not lint */ /*
CVS commit: src/bin/sh
Module Name:src Committed By: kre Date: Sat Jun 3 20:55:53 UTC 2017 Modified Files: src/bin/sh: expand.c Log Message: NFC: Code style only. Rather than being perverse and adding the negative of a negative number, just add a positive number instead... (the previous version came about purely as an accident of the way the relevant piece of code was added and debugged that's my story anyway!) To generate a diff of this commit: cvs rdiff -u -r1.108 -r1.109 src/bin/sh/expand.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/sh/expand.c diff -u src/bin/sh/expand.c:1.108 src/bin/sh/expand.c:1.109 --- src/bin/sh/expand.c:1.108 Sat Jun 3 18:37:37 2017 +++ src/bin/sh/expand.c Sat Jun 3 20:55:53 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: expand.c,v 1.108 2017/06/03 18:37:37 kre Exp $ */ +/* $NetBSD: expand.c,v 1.109 2017/06/03 20:55:53 kre Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)expand.c 8.5 (Berkeley) 5/15/95"; #else -__RCSID("$NetBSD: expand.c,v 1.108 2017/06/03 18:37:37 kre Exp $"); +__RCSID("$NetBSD: expand.c,v 1.109 2017/06/03 20:55:53 kre Exp $"); #endif #endif /* not lint */ @@ -482,10 +482,10 @@ expari(const char *p, int flag) if (quoted == 0) /* allow weird splitting */ recordregion(begoff, begoff + q - 1 - start, 0); - adjustment = expdest - q + 1; - STADJUST(-adjustment, expdest); + adjustment = q - expdest - 1; + STADJUST(adjustment, expdest); VTRACE(DBG_EXPAND, ("expari: adding %d ed \"%.*s\", " - "expdest \"%s\" returning \"%.5s...\"\n", -adjustment, expdest-ed, + "expdest \"%s\" returning \"%.5s...\"\n", adjustment, expdest - ed, ed, expdest, p)); return p;
CVS commit: src/lib/libc/sys
Module Name:src Committed By: abhinav Date: Sat Jun 3 19:41:14 UTC 2017 Modified Files: src/lib/libc/sys: ptrace.2 Log Message: Fix typo: s/interrput/interrupt/ To generate a diff of this commit: cvs rdiff -u -r1.66 -r1.67 src/lib/libc/sys/ptrace.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/sys/ptrace.2 diff -u src/lib/libc/sys/ptrace.2:1.66 src/lib/libc/sys/ptrace.2:1.67 --- src/lib/libc/sys/ptrace.2:1.66 Sat Apr 8 00:58:35 2017 +++ src/lib/libc/sys/ptrace.2 Sat Jun 3 19:41:14 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: ptrace.2,v 1.66 2017/04/08 00:58:35 kamil Exp $ +.\" $NetBSD: ptrace.2,v 1.67 2017/06/03 19:41:14 abhinav Exp $ .\" .\" This file is in the public domain. .Dd April 7, 2017 @@ -70,7 +70,7 @@ and the .Dv si_code value set to .Dv TRAP_BKPT . -These breakpoints are machine specific instructions that interrput the process. +These breakpoints are machine specific instructions that interrupt the process. In order to put a trap by a tracer into the tracee's program, debugger must violate the .Dv PaX MPROTECT @@ -79,7 +79,7 @@ For details check the .Dv security.pax.mprotect.ptrace option described in .Xr sysctl 7 . -When a tracee is interrputed by a trap, +When a tracee is interrupted by a trap, the trap is not removed by the kernel and it must be handled by a debugger. .Pp If a program is traced with single steps
CVS commit: src/bin/sh
Module Name:src Committed By: kre Date: Sat Jun 3 18:37:37 UTC 2017 Modified Files: src/bin/sh: expand.c Log Message: The correct usage of recordregion() is (begin, end) not (begin, length). Fixing this fixes a regression introduced earlier today (UTC) where arithmetic expressions would be split correctly when the arithmetic started at the beginning of a word: echo $(( expression )) where "begin" is 0, and so (begin, length) is the same as (begin, begin+length) (aka: (begin,end) - and yes, "end" means 1 after last to consider). but did not work correctly when the usage was echo XXX$( expression )) (begin !+ 0) and would only split (some part of) the result of the expression. This regression was also foung by the new t_fsplit:split_arith test case added earlier to the ATF tests for sh. To generate a diff of this commit: cvs rdiff -u -r1.107 -r1.108 src/bin/sh/expand.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/sh/expand.c diff -u src/bin/sh/expand.c:1.107 src/bin/sh/expand.c:1.108 --- src/bin/sh/expand.c:1.107 Sat Jun 3 10:31:16 2017 +++ src/bin/sh/expand.c Sat Jun 3 18:37:37 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: expand.c,v 1.107 2017/06/03 10:31:16 kre Exp $ */ +/* $NetBSD: expand.c,v 1.108 2017/06/03 18:37:37 kre Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)expand.c 8.5 (Berkeley) 5/15/95"; #else -__RCSID("$NetBSD: expand.c,v 1.107 2017/06/03 10:31:16 kre Exp $"); +__RCSID("$NetBSD: expand.c,v 1.108 2017/06/03 18:37:37 kre Exp $"); #endif #endif /* not lint */ @@ -481,7 +481,7 @@ expari(const char *p, int flag) ; if (quoted == 0) /* allow weird splitting */ - recordregion(begoff, q - 1 - start, 0); + recordregion(begoff, begoff + q - 1 - start, 0); adjustment = expdest - q + 1; STADJUST(-adjustment, expdest); VTRACE(DBG_EXPAND, ("expari: adding %d ed \"%.*s\", "
CVS commit: src/bin/sh
Module Name:src Committed By: kre Date: Sat Jun 3 18:31:35 UTC 2017 Modified Files: src/bin/sh: parser.c Log Message: When we record an arithmetic expression ($(( ))) as being quoted, what matters is the quoting state just before we switch into arithmetic syntax parsing mode, not the state after... This fixes the regiression introduced earlier today (UTC) where quoted arithmetic expressions were being subjected to word splitting. To generate a diff of this commit: cvs rdiff -u -r1.131 -r1.132 src/bin/sh/parser.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/sh/parser.c diff -u src/bin/sh/parser.c:1.131 src/bin/sh/parser.c:1.132 --- src/bin/sh/parser.c:1.131 Sat Jun 3 10:31:16 2017 +++ src/bin/sh/parser.c Sat Jun 3 18:31:35 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: parser.c,v 1.131 2017/06/03 10:31:16 kre Exp $ */ +/* $NetBSD: parser.c,v 1.132 2017/06/03 18:31:35 kre Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)parser.c 8.7 (Berkeley) 5/16/95"; #else -__RCSID("$NetBSD: parser.c,v 1.131 2017/06/03 10:31:16 kre Exp $"); +__RCSID("$NetBSD: parser.c,v 1.132 2017/06/03 18:31:35 kre Exp $"); #endif #endif /* not lint */ @@ -1919,17 +1919,16 @@ parsearith: { } else #endif { - TS_PUSH(); - syntax = ARISYNTAX; - arinest = 1; - varnest = 0; - USTPUTC(CTLARI, out); if (ISDBLQUOTE()) USTPUTC('"',out); else USTPUTC(' ',out); + TS_PUSH(); + syntax = ARISYNTAX; + arinest = 1; + varnest = 0; } goto parsearith_return; }
CVS commit: [netbsd-7-1] src/doc
Module Name:src Committed By: snj Date: Sat Jun 3 17:54:16 UTC 2017 Modified Files: src/doc [netbsd-7-1]: CHANGES-7.1.1 Log Message: 1425, 1426 To generate a diff of this commit: cvs rdiff -u -r1.1.2.8 -r1.1.2.9 src/doc/CHANGES-7.1.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-7.1.1 diff -u src/doc/CHANGES-7.1.1:1.1.2.8 src/doc/CHANGES-7.1.1:1.1.2.9 --- src/doc/CHANGES-7.1.1:1.1.2.8 Fri May 12 05:55:07 2017 +++ src/doc/CHANGES-7.1.1 Sat Jun 3 17:54:16 2017 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.1.1,v 1.1.2.8 2017/05/12 05:55:07 snj Exp $ +# $NetBSD: CHANGES-7.1.1,v 1.1.2.9 2017/06/03 17:54:16 snj Exp $ A complete list of changes from the NetBSD 7.1 release to the NetBSD 7.1.1 release: @@ -582,3 +582,14 @@ sbin/ping/ping.c1.116 Fix cksum calculation for clearing the cached route. [ryo, ticket #1390] +sys/arch/i386/stand/misc/rawr32.exe.uue 1.7 + + Update to rawrite32 1.0.5 (new signatures to avoid scary + windows warnings) + [matin, ticket #1426] + +sys/kern/kern_descrip.c1.230 + + Explicitly set the flags instead of masking set values in. + [riastradh, ticket #1425] +
CVS commit: [netbsd-7-0] src/doc
Module Name:src Committed By: snj Date: Sat Jun 3 17:53:59 UTC 2017 Modified Files: src/doc [netbsd-7-0]: CHANGES-7.0.3 Log Message: 1425, 1426 To generate a diff of this commit: cvs rdiff -u -r1.1.2.41 -r1.1.2.42 src/doc/CHANGES-7.0.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-7.0.3 diff -u src/doc/CHANGES-7.0.3:1.1.2.41 src/doc/CHANGES-7.0.3:1.1.2.42 --- src/doc/CHANGES-7.0.3:1.1.2.41 Fri May 12 05:50:20 2017 +++ src/doc/CHANGES-7.0.3 Sat Jun 3 17:53:59 2017 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.0.3,v 1.1.2.41 2017/05/12 05:50:20 snj Exp $ +# $NetBSD: CHANGES-7.0.3,v 1.1.2.42 2017/06/03 17:53:59 snj Exp $ A complete list of changes from the NetBSD 7.0.2 release to the NetBSD 7.0.3 release: @@ -1889,3 +1889,14 @@ sbin/ping/ping.c1.116 Fix cksum calculation for clearing the cached route. [ryo, ticket #1390] +sys/arch/i386/stand/misc/rawr32.exe.uue 1.7 + + Update to rawrite32 1.0.5 (new signatures to avoid scary + windows warnings) + [matin, ticket #1426] + +sys/kern/kern_descrip.c1.230 + + Explicitly set the flags instead of masking set values in. + [riastradh, ticket #1425] +
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: snj Date: Sat Jun 3 17:53:39 UTC 2017 Modified Files: src/doc [netbsd-7]: CHANGES-7.2 Log Message: 1416, 1421, 1424-1426 To generate a diff of this commit: cvs rdiff -u -r1.1.2.19 -r1.1.2.20 src/doc/CHANGES-7.2 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-7.2 diff -u src/doc/CHANGES-7.2:1.1.2.19 src/doc/CHANGES-7.2:1.1.2.20 --- src/doc/CHANGES-7.2:1.1.2.19 Mon May 22 18:57:05 2017 +++ src/doc/CHANGES-7.2 Sat Jun 3 17:53:38 2017 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.2,v 1.1.2.19 2017/05/22 18:57:05 martin Exp $ +# $NetBSD: CHANGES-7.2,v 1.1.2.20 2017/06/03 17:53:38 snj Exp $ A complete list of changes from the NetBSD 7.1 release to the NetBSD 7.2 release: @@ -1301,3 +1301,33 @@ sys/arch/amd64/conf/XEN3_DOM0 1.135 vi Add ixg(4) to XEN3_DOM0. PR#52180. [msaitoh, ticket #1408] +sys/arch/i386/stand/misc/rawr32.exe.uue 1.7 + + Update to rawrite32 1.0.5 (new signatures to avoid scary + windows warnings) + [matin, ticket #1426] + +sys/kern/kern_descrip.c1.230 + + Explicitly set the flags instead of masking set values in. + [riastradh, ticket #1425] + +sys/arch/arm/arm32/pmap.c 1.345 + + Perform icache syncs for ARM_MMU_EXTENDED as well. This helps + the PT_STEP code in PR/52119 and probably other things. + [skrll, ticket #1424] + +sys/dev/usb/files.usb1.144 + + Fix the USBVERBOSE stuff so it does not get included in the + build if there are no USB devices or controllers. + [pgoyette, ticket #1421] + +lib/lua/sqlite/sqlite.c1.9 + + Guard against double freeing of objects (explicit by the Lua + program, then later by the garbage collector). + This fixes PR bin/52218. + [mbalmer, ticket #1416] +
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: snj Date: Sat Jun 3 17:26:55 UTC 2017 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: fix 1422 To generate a diff of this commit: cvs rdiff -u -r1.1.2.284 -r1.1.2.285 src/doc/CHANGES-6.2 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-6.2 diff -u src/doc/CHANGES-6.2:1.1.2.284 src/doc/CHANGES-6.2:1.1.2.285 --- src/doc/CHANGES-6.2:1.1.2.284 Sat Jun 3 17:22:38 2017 +++ src/doc/CHANGES-6.2 Sat Jun 3 17:26:55 2017 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.2,v 1.1.2.284 2017/06/03 17:22:38 snj Exp $ +# $NetBSD: CHANGES-6.2,v 1.1.2.285 2017/06/03 17:26:55 snj Exp $ A complete list of changes from the 6.1 release until the 6.2 release: @@ -17778,7 +17778,7 @@ sys/arch/i386/stand/misc/rawr32.exe.uue warnings) [martin, ticket #1454] -crypto/external/bsd/openssh/dist/moduli 1.4 +crypto/external/bsd/openssh/dist/moduli up to 1.8 Update moduli file. [aymeric/christos, ticket #1422]
CVS commit: [netbsd-6-1] src/doc
Module Name:src Committed By: snj Date: Sat Jun 3 17:26:42 UTC 2017 Modified Files: src/doc [netbsd-6-1]: CHANGES-6.1.6 Log Message: fix 1422 To generate a diff of this commit: cvs rdiff -u -r1.1.2.91 -r1.1.2.92 src/doc/CHANGES-6.1.6 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-6.1.6 diff -u src/doc/CHANGES-6.1.6:1.1.2.91 src/doc/CHANGES-6.1.6:1.1.2.92 --- src/doc/CHANGES-6.1.6:1.1.2.91 Sat Jun 3 17:23:17 2017 +++ src/doc/CHANGES-6.1.6 Sat Jun 3 17:26:42 2017 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.1.6,v 1.1.2.91 2017/06/03 17:23:17 snj Exp $ +# $NetBSD: CHANGES-6.1.6,v 1.1.2.92 2017/06/03 17:26:42 snj Exp $ A complete list of changes from the NetBSD 6.1.5 release to the NetBSD 6.1.6 release: @@ -11825,7 +11825,7 @@ sys/arch/i386/stand/misc/rawr32.exe.uue warnings) [martin, ticket #1454] -crypto/external/bsd/openssh/dist/moduli 1.4 +crypto/external/bsd/openssh/dist/moduli up to 1.8 Update moduli file. [aymeric/christos, ticket #1422]
CVS commit: [netbsd-6-0] src/doc
Module Name:src Committed By: snj Date: Sat Jun 3 17:26:28 UTC 2017 Modified Files: src/doc [netbsd-6-0]: CHANGES-6.0.7 Log Message: fix 1422 To generate a diff of this commit: cvs rdiff -u -r1.1.2.93 -r1.1.2.94 src/doc/CHANGES-6.0.7 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-6.0.7 diff -u src/doc/CHANGES-6.0.7:1.1.2.93 src/doc/CHANGES-6.0.7:1.1.2.94 --- src/doc/CHANGES-6.0.7:1.1.2.93 Sat Jun 3 17:24:23 2017 +++ src/doc/CHANGES-6.0.7 Sat Jun 3 17:26:27 2017 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.0.7,v 1.1.2.93 2017/06/03 17:24:23 snj Exp $ +# $NetBSD: CHANGES-6.0.7,v 1.1.2.94 2017/06/03 17:26:27 snj Exp $ A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7 release: @@ -12126,7 +12126,7 @@ sys/arch/i386/stand/misc/rawr32.exe.uue warnings) [martin, ticket #1454] -crypto/external/bsd/openssh/dist/moduli 1.4 +crypto/external/bsd/openssh/dist/moduli up to 1.8 Update moduli file. [aymeric/christos, ticket #1422]
CVS commit: [netbsd-6-0] src/doc
Module Name:src Committed By: snj Date: Sat Jun 3 17:24:23 UTC 2017 Modified Files: src/doc [netbsd-6-0]: CHANGES-6.0.7 Log Message: 1422 To generate a diff of this commit: cvs rdiff -u -r1.1.2.92 -r1.1.2.93 src/doc/CHANGES-6.0.7 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-6.0.7 diff -u src/doc/CHANGES-6.0.7:1.1.2.92 src/doc/CHANGES-6.0.7:1.1.2.93 --- src/doc/CHANGES-6.0.7:1.1.2.92 Sat Jun 3 16:47:51 2017 +++ src/doc/CHANGES-6.0.7 Sat Jun 3 17:24:23 2017 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.0.7,v 1.1.2.92 2017/06/03 16:47:51 snj Exp $ +# $NetBSD: CHANGES-6.0.7,v 1.1.2.93 2017/06/03 17:24:23 snj Exp $ A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7 release: @@ -12126,3 +12126,8 @@ sys/arch/i386/stand/misc/rawr32.exe.uue warnings) [martin, ticket #1454] +crypto/external/bsd/openssh/dist/moduli 1.4 + + Update moduli file. + [aymeric/christos, ticket #1422] +
CVS commit: [netbsd-6-1] src/doc
Module Name:src Committed By: snj Date: Sat Jun 3 17:23:17 UTC 2017 Modified Files: src/doc [netbsd-6-1]: CHANGES-6.1.6 Log Message: 1422 To generate a diff of this commit: cvs rdiff -u -r1.1.2.90 -r1.1.2.91 src/doc/CHANGES-6.1.6 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-6.1.6 diff -u src/doc/CHANGES-6.1.6:1.1.2.90 src/doc/CHANGES-6.1.6:1.1.2.91 --- src/doc/CHANGES-6.1.6:1.1.2.90 Sat Jun 3 16:48:41 2017 +++ src/doc/CHANGES-6.1.6 Sat Jun 3 17:23:17 2017 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.1.6,v 1.1.2.90 2017/06/03 16:48:41 snj Exp $ +# $NetBSD: CHANGES-6.1.6,v 1.1.2.91 2017/06/03 17:23:17 snj Exp $ A complete list of changes from the NetBSD 6.1.5 release to the NetBSD 6.1.6 release: @@ -11825,3 +11825,8 @@ sys/arch/i386/stand/misc/rawr32.exe.uue warnings) [martin, ticket #1454] +crypto/external/bsd/openssh/dist/moduli 1.4 + + Update moduli file. + [aymeric/christos, ticket #1422] +
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: snj Date: Sat Jun 3 17:22:39 UTC 2017 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: 1422 To generate a diff of this commit: cvs rdiff -u -r1.1.2.283 -r1.1.2.284 src/doc/CHANGES-6.2 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-6.2 diff -u src/doc/CHANGES-6.2:1.1.2.283 src/doc/CHANGES-6.2:1.1.2.284 --- src/doc/CHANGES-6.2:1.1.2.283 Sat Jun 3 17:04:48 2017 +++ src/doc/CHANGES-6.2 Sat Jun 3 17:22:38 2017 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.2,v 1.1.2.283 2017/06/03 17:04:48 snj Exp $ +# $NetBSD: CHANGES-6.2,v 1.1.2.284 2017/06/03 17:22:38 snj Exp $ A complete list of changes from the 6.1 release until the 6.2 release: @@ -17778,3 +17778,8 @@ sys/arch/i386/stand/misc/rawr32.exe.uue warnings) [martin, ticket #1454] +crypto/external/bsd/openssh/dist/moduli 1.4 + + Update moduli file. + [aymeric/christos, ticket #1422] +
CVS commit: [netbsd-7] src/lib/lua/sqlite
Module Name:src Committed By: snj Date: Sat Jun 3 17:11:51 UTC 2017 Modified Files: src/lib/lua/sqlite [netbsd-7]: sqlite.c Log Message: Pull up following revision(s) (requested by mbalmer in ticket #1416): lib/lua/sqlite/sqlite.c: revision 1.9 Guard against double freeing of objects (explicit by the Lua program, then later by the garbage collector). This fixes PR bin/52218. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.7.2.1 src/lib/lua/sqlite/sqlite.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/lua/sqlite/sqlite.c diff -u src/lib/lua/sqlite/sqlite.c:1.7 src/lib/lua/sqlite/sqlite.c:1.7.2.1 --- src/lib/lua/sqlite/sqlite.c:1.7 Sat Jul 19 18:38:34 2014 +++ src/lib/lua/sqlite/sqlite.c Sat Jun 3 17:11:51 2017 @@ -1,7 +1,7 @@ -/* $NetBSD: sqlite.c,v 1.7 2014/07/19 18:38:34 lneto Exp $ */ +/* $NetBSD: sqlite.c,v 1.7.2.1 2017/06/03 17:11:51 snj Exp $ */ /* - * Copyright (c) 2011, 2013 Marc Balmer+ * Copyright (c) 2011, 2013, 2016, 2017 Marc Balmer * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -120,7 +120,11 @@ db_close(lua_State *L) sqlite3 **db; db = luaL_checkudata(L, 1, SQLITE_DB_METATABLE); - lua_pushinteger(L, sqlite3_close(*db)); + if (*db) { + lua_pushinteger(L, sqlite3_close(*db)); + *db = NULL; + } else + lua_pushnil(L); return 1; } @@ -342,7 +346,10 @@ stmt_finalize(lua_State *L) sqlite3_stmt **stmt; stmt = luaL_checkudata(L, 1, SQLITE_STMT_METATABLE); - sqlite3_finalize(*stmt); + if (*stmt) { + sqlite3_finalize(*stmt); + *stmt = NULL; + } return 0; }
CVS commit: src/sys/arch
Module Name:src Committed By: jmcneill Date: Sat Jun 3 17:05:23 UTC 2017 Modified Files: src/sys/arch/arm/fdt: files.fdt src/sys/arch/evbarm/conf: VEXPRESS_A15 Added Files: src/sys/arch/arm/fdt: plkmi_fdt.c Log Message: Add and enable FDT glue for ARM PrimeCell PL050 (KMI) PS2 keyboard/mouse interface. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/fdt/files.fdt cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/fdt/plkmi_fdt.c cvs rdiff -u -r1.11 -r1.12 src/sys/arch/evbarm/conf/VEXPRESS_A15 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/fdt/files.fdt diff -u src/sys/arch/arm/fdt/files.fdt:1.8 src/sys/arch/arm/fdt/files.fdt:1.9 --- src/sys/arch/arm/fdt/files.fdt:1.8 Sat Jun 3 14:50:39 2017 +++ src/sys/arch/arm/fdt/files.fdt Sat Jun 3 17:05:23 2017 @@ -1,4 +1,6 @@ -# $NetBSD: files.fdt,v 1.8 2017/06/03 14:50:39 jmcneill Exp $ +# $NetBSD: files.fdt,v 1.9 2017/06/03 17:05:23 jmcneill Exp $ + +include "dev/pckbport/files.pckbport" device armfdt { }: bus_space_generic, fdtbus attach armfdt at root with arm_fdt @@ -21,6 +23,9 @@ file arch/arm/fdt/plcom_fdt.c plcom_fdt attach genfb at fdt with plfb_fdt: fdt_display_timing file arch/arm/fdt/plfb_fdt.c plfb_fdt +attach plkmi at fdt with plkmi_fdt +file arch/arm/fdt/plkmi_fdt.c plkmi_fdt + attach plmmc at fdt with plmmc_fdt file arch/arm/fdt/plmmc_fdt.c plmmc_fdt Index: src/sys/arch/evbarm/conf/VEXPRESS_A15 diff -u src/sys/arch/evbarm/conf/VEXPRESS_A15:1.11 src/sys/arch/evbarm/conf/VEXPRESS_A15:1.12 --- src/sys/arch/evbarm/conf/VEXPRESS_A15:1.11 Sat Jun 3 14:51:15 2017 +++ src/sys/arch/evbarm/conf/VEXPRESS_A15 Sat Jun 3 17:05:23 2017 @@ -1,5 +1,5 @@ # -# $NetBSD: VEXPRESS_A15,v 1.11 2017/06/03 14:51:15 jmcneill Exp $ +# $NetBSD: VEXPRESS_A15,v 1.12 2017/06/03 17:05:23 jmcneill Exp $ # # ARM Versatile Express A15 # @@ -77,7 +77,16 @@ options WSDISPLAY_COMPAT_SYSCONS options WSDISPLAY_COMPAT_USL options WSDISPLAY_COMPAT_RAWKBD options WSDISPLAY_DEFAULTSCREENS=4 -pseudo-device wsmux + +# PS/2 keyboard and mouse support +plkmi* at fdt? +pckbd* at pckbport? +wskbd* at pckbd? console ? +pms* at pckbport? +wsmouse* at pms? mux 0 + +# wscons pseudo-devices pseudo-device wsfont +pseudo-device wsmux cinclude "arch/evbarm/conf/VEXPRESS_A15.local" Added files: Index: src/sys/arch/arm/fdt/plkmi_fdt.c diff -u /dev/null src/sys/arch/arm/fdt/plkmi_fdt.c:1.1 --- /dev/null Sat Jun 3 17:05:23 2017 +++ src/sys/arch/arm/fdt/plkmi_fdt.c Sat Jun 3 17:05:23 2017 @@ -0,0 +1,105 @@ +/* $NetBSD: plkmi_fdt.c,v 1.1 2017/06/03 17:05:23 jmcneill Exp $ */ + +/*- + * Copyright (c) 2017 Jared McNeill+ * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__KERNEL_RCSID(0, "$NetBSD: plkmi_fdt.c,v 1.1 2017/06/03 17:05:23 jmcneill Exp $"); + +#include +#include +#include +#include +#include + +#include + +#include + +static int plkmi_fdt_match(device_t, cfdata_t, void *); +static void plkmi_fdt_attach(device_t, device_t, void *); + +static const char * const compatible[] = { + "arm,pl050", + NULL +}; + +CFATTACH_DECL_NEW(plkmi_fdt, sizeof(struct plkmi_softc), + plkmi_fdt_match, plkmi_fdt_attach, NULL, NULL); + +static int +plkmi_fdt_match(device_t parent, cfdata_t cf, void *aux) +{ + struct fdt_attach_args * const faa = aux; + + return of_compatible(faa->faa_phandle, compatible) >= 0; +} + +static void +plkmi_fdt_attach(device_t parent, device_t self, void *aux) +{ + struct plkmi_softc * const sc = device_private(self); + struct fdt_attach_args * const faa = aux; + const int phandle = faa->faa_phandle; + char
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: snj Date: Sat Jun 3 17:04:48 UTC 2017 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: 1454 To generate a diff of this commit: cvs rdiff -u -r1.1.2.282 -r1.1.2.283 src/doc/CHANGES-6.2 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-6.2 diff -u src/doc/CHANGES-6.2:1.1.2.282 src/doc/CHANGES-6.2:1.1.2.283 --- src/doc/CHANGES-6.2:1.1.2.282 Thu May 4 06:05:05 2017 +++ src/doc/CHANGES-6.2 Sat Jun 3 17:04:48 2017 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.2,v 1.1.2.282 2017/05/04 06:05:05 snj Exp $ +# $NetBSD: CHANGES-6.2,v 1.1.2.283 2017/06/03 17:04:48 snj Exp $ A complete list of changes from the 6.1 release until the 6.2 release: @@ -17772,3 +17772,9 @@ external/bsd/ntp/scripts/mkver Update ntp to 4.2.8p10. [spz, ticket #1448] +sys/arch/i386/stand/misc/rawr32.exe.uue 1.7 + + Update to rawrite32 1.0.5 (new signatures to avoid scary windows + warnings) + [martin, ticket #1454] +
CVS commit: src/sys
Module Name:src Committed By: jmcneill Date: Sat Jun 3 17:03:36 UTC 2017 Modified Files: src/sys/conf: files Added Files: src/sys/dev/ic: pl050.c pl050var.h Log Message: Add driver for ARM PrimeCell PL050 (KMI) PS2 keyboard/mouse interface To generate a diff of this commit: cvs rdiff -u -r1.1172 -r1.1173 src/sys/conf/files cvs rdiff -u -r0 -r1.1 src/sys/dev/ic/pl050.c src/sys/dev/ic/pl050var.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/conf/files diff -u src/sys/conf/files:1.1172 src/sys/conf/files:1.1173 --- src/sys/conf/files:1.1172 Sat May 27 21:02:56 2017 +++ src/sys/conf/files Sat Jun 3 17:03:36 2017 @@ -1,4 +1,4 @@ -# $NetBSD: files,v 1.1172 2017/05/27 21:02:56 bouyer Exp $ +# $NetBSD: files,v 1.1173 2017/06/03 17:03:36 jmcneill Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 version 20150846 @@ -1315,6 +1315,10 @@ defflag opt_dwc_mmc.h DWC_MMC_DEBUG device dwcmmc: sdmmcbus file dev/ic/dwc_mmc.c dwcmmc +# ARM PrimeCell PL050 (KMI) PS2 keyboard/mouse interface +device plkmi: pckbport +file dev/ic/pl050.c plkmi + # ARM PrimeCell PL181 (MMCI) host controller device plmmc: sdmmcbus file dev/ic/pl181.c plmmc Added files: Index: src/sys/dev/ic/pl050.c diff -u /dev/null src/sys/dev/ic/pl050.c:1.1 --- /dev/null Sat Jun 3 17:03:36 2017 +++ src/sys/dev/ic/pl050.c Sat Jun 3 17:03:36 2017 @@ -0,0 +1,186 @@ +/* $NetBSD: pl050.c,v 1.1 2017/06/03 17:03:36 jmcneill Exp $ */ + +/*- + * Copyright (c) 2017 Jared McNeill+ * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__KERNEL_RCSID(0, "$NetBSD: pl050.c,v 1.1 2017/06/03 17:03:36 jmcneill Exp $"); + +#include +#include +#include +#include +#include + +#include + +#include + +#define KMICR 0x00 +#define KMIRXINTREN __BIT(4) +#define KMIEN __BIT(2) +#define KMISTAT 0x04 +#define TXEMPTY __BIT(6) +#define RXFULL __BIT(4) +#define KMIDATA 0x08 +#define KMICLKDIV 0x0c +#define KMIIR 0x10 +#define KMIRXINTR __BIT(0) + +#define PLKMI_READ(sc, reg) \ + bus_space_read_4((sc)->sc_bst, (sc)->sc_bsh, (reg)) +#define PLKMI_WRITE(sc, reg, val) \ + bus_space_write_4((sc)->sc_bst, (sc)->sc_bsh, (reg), (val)) + +static int +plkmi_wait(struct plkmi_softc *sc, uint32_t mask, bool set) +{ + int timeout = 1000; + + const uint32_t val = (set ? mask : 0); + + while (timeout-- > 0) { + const uint32_t stat = PLKMI_READ(sc, KMISTAT); + if ((stat & mask) == val) + return 0; + delay(10); + } + + return ETIMEDOUT; +} + +static int +plkmi_xt_translation(void *priv, pckbport_slot_t port, int on) +{ + if (on) + return 0; + return 1; +} + +static int +plkmi_send_devcmd(void *priv, pckbport_slot_t slot, u_char byte) +{ + struct plkmi_softc * const sc = priv; + + if (plkmi_wait(sc, TXEMPTY, true)) + return 0; + + PLKMI_WRITE(sc, KMIDATA, byte & 0xff); + + return 1; +} + +static int +plkmi_poll_data1(void *priv, pckbport_slot_t slot) +{ + struct plkmi_softc * const sc = priv; + + if (plkmi_wait(sc, RXFULL, true)) + return -1; + + return PLKMI_READ(sc, KMIDATA) & 0xff; +} + +static void +plkmi_slot_enable(void *priv, pckbport_slot_t slot, int on) +{ + struct plkmi_softc * const sc = priv; + uint32_t cr; + + cr = PLKMI_READ(sc, KMICR); + if (on) + cr |= KMIEN; + else + cr &= ~KMIEN; + PLKMI_WRITE(sc, KMICR, cr); +} + +static void +plkmi_set_poll(void *priv, pckbport_slot_t slot, int on) +{ + struct plkmi_softc * const sc = priv; + uint32_t cr; + + cr = PLKMI_READ(sc, KMICR); + if (on) + cr &= ~KMIRXINTREN; + else + cr |= KMIRXINTREN; + PLKMI_WRITE(sc, KMICR, cr); +} + +static void +plkmi_intr_establish(void *priv, pckbport_slot_t slot) +{ + /* XXX
CVS commit: [netbsd-7] src/sys/dev/usb
Module Name:src Committed By: snj Date: Sat Jun 3 17:03:02 UTC 2017 Modified Files: src/sys/dev/usb [netbsd-7]: files.usb Log Message: Pull up following revision(s) (requested by pgoyette in ticket #1421): sys/dev/usb/files.usb: revision 1.144 Fix the USBVERBOSE stuff so it does not get included in the build if there are no USB devices or controllers. Without this change, a kernel with no USB devices but with USBVERBOSE defined in the configuration file will include the usb_verbose.c file, but will fail to link due to undefined symbols. To generate a diff of this commit: cvs rdiff -u -r1.132.2.2 -r1.132.2.3 src/sys/dev/usb/files.usb Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/files.usb diff -u src/sys/dev/usb/files.usb:1.132.2.2 src/sys/dev/usb/files.usb:1.132.2.3 --- src/sys/dev/usb/files.usb:1.132.2.2 Wed Apr 5 19:54:19 2017 +++ src/sys/dev/usb/files.usb Sat Jun 3 17:03:02 2017 @@ -1,4 +1,4 @@ -# $NetBSD: files.usb,v 1.132.2.2 2017/04/05 19:54:19 snj Exp $ +# $NetBSD: files.usb,v 1.132.2.3 2017/06/03 17:03:02 snj Exp $ # # Config file and device description for machine-independent USB code. # Included by ports that need it. Ports that use it must provide @@ -103,8 +103,7 @@ file dev/usb/usb_quirks.c usb define usb_dma: usb file dev/usb/usb_mem.c usb_dma needs-flag -define usbverbose: usb -file dev/usb/usb_verbose.c usbverbose +file dev/usb/usb_verbose.c usbverbose & usb # Hub driver device uhub: usbdevif, usbifif
CVS commit: [netbsd-7] src/sys/arch/arm/arm32
Module Name:src Committed By: snj Date: Sat Jun 3 17:01:31 UTC 2017 Modified Files: src/sys/arch/arm/arm32 [netbsd-7]: pmap.c Log Message: Pull up following revision(s) (requested by skrll in ticket #1424): sys/arch/arm/arm32/pmap.c: revision 1.345 Perform icache syncs for ARM_MMU_EXTENDED as well. This helps the PT_STEP code in pr/52119 and probably other things. To generate a diff of this commit: cvs rdiff -u -r1.295.2.10 -r1.295.2.11 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.295.2.10 src/sys/arch/arm/arm32/pmap.c:1.295.2.11 --- src/sys/arch/arm/arm32/pmap.c:1.295.2.10 Sat Mar 11 16:03:54 2017 +++ src/sys/arch/arm/arm32/pmap.c Sat Jun 3 17:01:30 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.295.2.10 2017/03/11 16:03:54 snj Exp $ */ +/* $NetBSD: pmap.c,v 1.295.2.11 2017/06/03 17:01:30 snj Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -217,7 +217,7 @@ #include //#include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.295.2.10 2017/03/11 16:03:54 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.295.2.11 2017/06/03 17:01:30 snj Exp $"); //#define PMAP_DEBUG #ifdef PMAP_DEBUG @@ -424,13 +424,13 @@ static struct evcnt pmap_ev_exec_synced PMAP_EVCNT_INITIALIZER("exec pages synced"); static struct evcnt pmap_ev_exec_synced_map = PMAP_EVCNT_INITIALIZER("exec pages synced (MP)"); -#ifndef ARM_MMU_EXTENDED static struct evcnt pmap_ev_exec_synced_unmap = PMAP_EVCNT_INITIALIZER("exec pages synced (UM)"); static struct evcnt pmap_ev_exec_synced_remap = PMAP_EVCNT_INITIALIZER("exec pages synced (RM)"); static struct evcnt pmap_ev_exec_synced_clearbit = PMAP_EVCNT_INITIALIZER("exec pages synced (DG)"); +#ifndef ARM_MMU_EXTENDED static struct evcnt pmap_ev_exec_synced_kremove = PMAP_EVCNT_INITIALIZER("exec pages synced (KU)"); #endif @@ -1066,12 +1066,10 @@ pmap_enter_pv(struct vm_page_md *md, pad * for this page, make sure to sync the I-cache. */ if (PV_IS_EXEC_P(flags)) { -#ifndef ARM_MMU_EXTENDED if (!PV_IS_EXEC_P(md->pvh_attrs)) { pmap_syncicache_page(md, pa); PMAPCOUNT(exec_synced_map); } -#endif PMAPCOUNT(exec_mappings); } #endif @@ -1145,26 +1143,19 @@ pmap_remove_pv(struct vm_page_md *md, pa PMAPCOUNT(unmappings); #ifdef PMAP_CACHE_VIPT - if (!(pv->pv_flags & PVF_WRITE)) -break; /* * If this page has had an exec mapping, then if * this was the last mapping, discard the contents, * otherwise sync the i-cache for this page. */ if (PV_IS_EXEC_P(md->pvh_attrs)) { -#ifdef ARM_MMU_EXTENDED -md->pvh_attrs &= ~PVF_EXEC; -PMAPCOUNT(exec_discarded_unmap); -#else if (SLIST_EMPTY(>pvh_list)) { md->pvh_attrs &= ~PVF_EXEC; PMAPCOUNT(exec_discarded_unmap); -} else { +} else if (pv->pv_flags & PVF_WRITE) { pmap_syncicache_page(md, pa); PMAPCOUNT(exec_synced_unmap); } -#endif /* ARM_MMU_EXTENDED */ } #endif /* PMAP_CACHE_VIPT */ break; @@ -1276,7 +1267,6 @@ pmap_modify_pv(struct vm_page_md *md, pa md->pvh_attrs |= PVF_WRITE; } } -#ifndef ARM_MMU_EXTENDED /* * We have two cases here: the first is from enter_pv (new exec * page), the second is a combined pmap_remove_pv/pmap_enter_pv. @@ -1289,6 +1279,7 @@ pmap_modify_pv(struct vm_page_md *md, pa pmap_syncicache_page(md, pa); PMAPCOUNT(exec_synced_remap); } +#ifndef ARM_MMU_EXTENDED KASSERT((md->pvh_attrs & PVF_DMOD) == 0 || (md->pvh_attrs & (PVF_DIRTY|PVF_NC))); #endif /* !ARM_MMU_EXTENDED */ #endif /* PMAP_CACHE_VIPT */ @@ -2338,12 +2329,12 @@ pmap_clearbit(struct vm_page_md *md, pad struct pv_entry *pv; #ifdef PMAP_CACHE_VIPT const bool want_syncicache = PV_IS_EXEC_P(md->pvh_attrs); + bool need_syncicache = false; #ifdef ARM_MMU_EXTENDED const u_int execbits = (maskbits & PVF_EXEC) ? L2_XS_XN : 0; #else const u_int execbits = 0; bool need_vac_me_harder = false; - bool need_syncicache = false; #endif #else const u_int execbits = 0; @@ -2359,12 +2350,9 @@ pmap_clearbit(struct vm_page_md *md, pad * then we know we definitely need to sync or discard it. */ if (want_syncicache) { -#ifdef ARM_MMU_EXTENDED - if (md->pvh_attrs & PVF_MOD) - md->pvh_attrs &= ~PVF_EXEC; -#else - need_syncicache = md->pvh_attrs & PVF_MOD; -#endif + if (md->pvh_attrs & PVF_MOD) { + need_syncicache = true; + } } #endif KASSERT(pmap_page_locked_p(md)); @@ -2375,7 +2363,7 @@ pmap_clearbit(struct vm_page_md *md, pad md->pvh_attrs &= ~(maskbits & (PVF_MOD | PVF_REF)); if (SLIST_EMPTY(>pvh_list)) { -#if defined(PMAP_CACHE_VIPT) && !defined(ARM_MMU_EXTENDED) +#if defined(PMAP_CACHE_VIPT) if (need_syncicache) { /* * No one has it mapped, so just discard it. The next @@ -2484,9 +2472,9 @@ pmap_clearbit(struct vm_page_md *md, pad
CVS commit: [netbsd-7] src/sys/kern
Module Name:src Committed By: snj Date: Sat Jun 3 16:58:01 UTC 2017 Modified Files: src/sys/kern [netbsd-7]: kern_descrip.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1425): sys/kern/kern_descrip.c: revision 1.230 Explicitly set the flags instead of masking set values in. This fixes FNONBLOCK weirdness seen in audio.c OK christos@ and martin@. To generate a diff of this commit: cvs rdiff -u -r1.225.2.1 -r1.225.2.2 src/sys/kern/kern_descrip.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_descrip.c diff -u src/sys/kern/kern_descrip.c:1.225.2.1 src/sys/kern/kern_descrip.c:1.225.2.2 --- src/sys/kern/kern_descrip.c:1.225.2.1 Tue Aug 4 17:24:59 2015 +++ src/sys/kern/kern_descrip.c Sat Jun 3 16:58:01 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_descrip.c,v 1.225.2.1 2015/08/04 17:24:59 snj Exp $ */ +/* $NetBSD: kern_descrip.c,v 1.225.2.2 2017/06/03 16:58:01 snj Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_descrip.c,v 1.225.2.1 2015/08/04 17:24:59 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_descrip.c,v 1.225.2.2 2017/06/03 16:58:01 snj Exp $"); #include #include @@ -1864,7 +1864,7 @@ fd_clone(file_t *fp, unsigned fd, int fl fdfile_t *ff; filedesc_t *fdp; - fp->f_flag |= flag & FMASK; + fp->f_flag = flag & FMASK; fdp = curproc->p_fd; ff = fdp->fd_dt->dt_ff[fd]; KASSERT(ff != NULL);
CVS commit: [netbsd-7-1] src/sys/kern
Module Name:src Committed By: snj Date: Sat Jun 3 16:57:17 UTC 2017 Modified Files: src/sys/kern [netbsd-7-1]: kern_descrip.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1425): sys/kern/kern_descrip.c: revision 1.230 Explicitly set the flags instead of masking set values in. This fixes FNONBLOCK weirdness seen in audio.c OK christos@ and martin@. To generate a diff of this commit: cvs rdiff -u -r1.225.2.1 -r1.225.2.1.6.1 src/sys/kern/kern_descrip.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_descrip.c diff -u src/sys/kern/kern_descrip.c:1.225.2.1 src/sys/kern/kern_descrip.c:1.225.2.1.6.1 --- src/sys/kern/kern_descrip.c:1.225.2.1 Tue Aug 4 17:24:59 2015 +++ src/sys/kern/kern_descrip.c Sat Jun 3 16:57:16 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_descrip.c,v 1.225.2.1 2015/08/04 17:24:59 snj Exp $ */ +/* $NetBSD: kern_descrip.c,v 1.225.2.1.6.1 2017/06/03 16:57:16 snj Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_descrip.c,v 1.225.2.1 2015/08/04 17:24:59 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_descrip.c,v 1.225.2.1.6.1 2017/06/03 16:57:16 snj Exp $"); #include #include @@ -1864,7 +1864,7 @@ fd_clone(file_t *fp, unsigned fd, int fl fdfile_t *ff; filedesc_t *fdp; - fp->f_flag |= flag & FMASK; + fp->f_flag = flag & FMASK; fdp = curproc->p_fd; ff = fdp->fd_dt->dt_ff[fd]; KASSERT(ff != NULL);
CVS commit: [netbsd-7-0] src/sys/kern
Module Name:src Committed By: snj Date: Sat Jun 3 16:56:32 UTC 2017 Modified Files: src/sys/kern [netbsd-7-0]: kern_descrip.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1425): sys/kern/kern_descrip.c: revision 1.230 Explicitly set the flags instead of masking set values in. This fixes FNONBLOCK weirdness seen in audio.c OK christos@ and martin@. To generate a diff of this commit: cvs rdiff -u -r1.225.2.1 -r1.225.2.1.2.1 src/sys/kern/kern_descrip.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_descrip.c diff -u src/sys/kern/kern_descrip.c:1.225.2.1 src/sys/kern/kern_descrip.c:1.225.2.1.2.1 --- src/sys/kern/kern_descrip.c:1.225.2.1 Tue Aug 4 17:24:59 2015 +++ src/sys/kern/kern_descrip.c Sat Jun 3 16:56:32 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_descrip.c,v 1.225.2.1 2015/08/04 17:24:59 snj Exp $ */ +/* $NetBSD: kern_descrip.c,v 1.225.2.1.2.1 2017/06/03 16:56:32 snj Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_descrip.c,v 1.225.2.1 2015/08/04 17:24:59 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_descrip.c,v 1.225.2.1.2.1 2017/06/03 16:56:32 snj Exp $"); #include #include @@ -1864,7 +1864,7 @@ fd_clone(file_t *fp, unsigned fd, int fl fdfile_t *ff; filedesc_t *fdp; - fp->f_flag |= flag & FMASK; + fp->f_flag = flag & FMASK; fdp = curproc->p_fd; ff = fdp->fd_dt->dt_ff[fd]; KASSERT(ff != NULL);
CVS commit: [netbsd-7] src/sys/arch/i386/stand/misc
Module Name:src Committed By: snj Date: Sat Jun 3 16:55:07 UTC 2017 Modified Files: src/sys/arch/i386/stand/misc [netbsd-7]: rawr32.exe.uue Log Message: Pull up following revision(s) (requested by matin in ticket #1426): sys/arch/i386/stand/misc/rawr32.exe.uue: revision 1.7 Update to rawrite32 1.0.5 (new signatures to avoid scary windows warnings) To generate a diff of this commit: cvs rdiff -u -r1.4.24.1 -r1.4.24.2 \ src/sys/arch/i386/stand/misc/rawr32.exe.uue Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. diffs are larger than 1MB and have been omitted
CVS commit: [netbsd-7-1] src/sys/arch/i386/stand/misc
Module Name:src Committed By: snj Date: Sat Jun 3 16:54:26 UTC 2017 Modified Files: src/sys/arch/i386/stand/misc [netbsd-7-1]: rawr32.exe.uue Log Message: Pull up following revision(s) (requested by matin in ticket #1426): sys/arch/i386/stand/misc/rawr32.exe.uue: revision 1.7 Update to rawrite32 1.0.5 (new signatures to avoid scary windows warnings) To generate a diff of this commit: cvs rdiff -u -r1.4.24.1 -r1.4.24.1.4.1 \ src/sys/arch/i386/stand/misc/rawr32.exe.uue Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. diffs are larger than 1MB and have been omitted
CVS commit: [netbsd-7-0] src/sys/arch/i386/stand/misc
Module Name:src Committed By: snj Date: Sat Jun 3 16:52:48 UTC 2017 Modified Files: src/sys/arch/i386/stand/misc [netbsd-7-0]: rawr32.exe.uue Log Message: Pull up following revision(s) (requested by matin in ticket #1426): sys/arch/i386/stand/misc/rawr32.exe.uue: revision 1.7 Update to rawrite32 1.0.5 (new signatures to avoid scary windows warnings) To generate a diff of this commit: cvs rdiff -u -r1.4.28.1 -r1.4.28.2 \ src/sys/arch/i386/stand/misc/rawr32.exe.uue Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. diffs are larger than 1MB and have been omitted
CVS commit: [netbsd-6] src/sys/arch/i386/stand/misc
Module Name:src Committed By: snj Date: Sat Jun 3 16:49:29 UTC 2017 Modified Files: src/sys/arch/i386/stand/misc [netbsd-6]: rawr32.exe.uue Log Message: Pull up following revision(s) (requested by martin in ticket #1454): sys/arch/i386/stand/misc/rawr32.exe.uue: revision 1.7 Update to rawrite32 1.0.5 (new signatures to avoid scary windows warnings) To generate a diff of this commit: cvs rdiff -u -r1.4.4.1 -r1.4.4.2 src/sys/arch/i386/stand/misc/rawr32.exe.uue Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. diffs are larger than 1MB and have been omitted
CVS commit: [netbsd-6-1] src/doc
Module Name:src Committed By: snj Date: Sat Jun 3 16:48:41 UTC 2017 Modified Files: src/doc [netbsd-6-1]: CHANGES-6.1.6 Log Message: 1454 To generate a diff of this commit: cvs rdiff -u -r1.1.2.89 -r1.1.2.90 src/doc/CHANGES-6.1.6 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-6.1.6 diff -u src/doc/CHANGES-6.1.6:1.1.2.89 src/doc/CHANGES-6.1.6:1.1.2.90 --- src/doc/CHANGES-6.1.6:1.1.2.89 Thu May 4 06:01:51 2017 +++ src/doc/CHANGES-6.1.6 Sat Jun 3 16:48:41 2017 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.1.6,v 1.1.2.89 2017/05/04 06:01:51 snj Exp $ +# $NetBSD: CHANGES-6.1.6,v 1.1.2.90 2017/06/03 16:48:41 snj Exp $ A complete list of changes from the NetBSD 6.1.5 release to the NetBSD 6.1.6 release: @@ -11819,3 +11819,9 @@ external/bsd/ntp/scripts/mkver Update ntp to 4.2.8p10. [spz, ticket #1448] +sys/arch/i386/stand/misc/rawr32.exe.uue 1.7 + + Update to rawrite32 1.0.5 (new signatures to avoid scary windows + warnings) + [martin, ticket #1454] +
CVS commit: [netbsd-6-1] src/sys/arch/i386/stand/misc
Module Name:src Committed By: snj Date: Sat Jun 3 16:48:20 UTC 2017 Modified Files: src/sys/arch/i386/stand/misc [netbsd-6-1]: rawr32.exe.uue Log Message: Pull up following revision(s) (requested by martin in ticket #1454): sys/arch/i386/stand/misc/rawr32.exe.uue: revision 1.7 Update to rawrite32 1.0.5 (new signatures to avoid scary windows warnings) To generate a diff of this commit: cvs rdiff -u -r1.4.18.1 -r1.4.18.2 \ src/sys/arch/i386/stand/misc/rawr32.exe.uue Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. diffs are larger than 1MB and have been omitted
CVS commit: [netbsd-6-0] src/doc
Module Name:src Committed By: snj Date: Sat Jun 3 16:47:51 UTC 2017 Modified Files: src/doc [netbsd-6-0]: CHANGES-6.0.7 Log Message: 1454 To generate a diff of this commit: cvs rdiff -u -r1.1.2.91 -r1.1.2.92 src/doc/CHANGES-6.0.7 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-6.0.7 diff -u src/doc/CHANGES-6.0.7:1.1.2.91 src/doc/CHANGES-6.0.7:1.1.2.92 --- src/doc/CHANGES-6.0.7:1.1.2.91 Thu May 4 05:56:25 2017 +++ src/doc/CHANGES-6.0.7 Sat Jun 3 16:47:51 2017 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.0.7,v 1.1.2.91 2017/05/04 05:56:25 snj Exp $ +# $NetBSD: CHANGES-6.0.7,v 1.1.2.92 2017/06/03 16:47:51 snj Exp $ A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7 release: @@ -12120,3 +12120,9 @@ external/bsd/ntp/scripts/mkver Update ntp to 4.2.8p10. [spz, ticket #1448] +sys/arch/i386/stand/misc/rawr32.exe.uue 1.7 + + Update to rawrite32 1.0.5 (new signatures to avoid scary windows + warnings) + [martin, ticket #1454] +
CVS commit: [netbsd-6-0] src/sys/arch/i386/stand/misc
Module Name:src Committed By: snj Date: Sat Jun 3 16:46:52 UTC 2017 Modified Files: src/sys/arch/i386/stand/misc [netbsd-6-0]: rawr32.exe.uue Log Message: Pull up following revision(s) (requested by martin in ticket #1454): sys/arch/i386/stand/misc/rawr32.exe.uue: revision 1.7 Update to rawrite32 1.0.5 (new signatures to avoid scary windows warnings) To generate a diff of this commit: cvs rdiff -u -r1.4.10.1 -r1.4.10.2 \ src/sys/arch/i386/stand/misc/rawr32.exe.uue Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. diffs are larger than 1MB and have been omitted
CVS commit: src/tests/bin/sh
Module Name:src Committed By: kre Date: Sat Jun 3 15:15:49 UTC 2017 Modified Files: src/tests/bin/sh: t_fsplit.sh Log Message: Paranoia: add a new test case testing that $(( )) results get split by IFS just the same as any other expansion (split when they should be, and not when they shouldn't). Good thing I did ... this discovered a regression in the new expand code (from an hour or three ago) where quoted arith expansions are being split, and shouldn't be. (on the other hand, when they should be split, they are being split correctly, so that's good...) No need to worry too much about this, in real life (as opposed to torture tests) no-one ever puts digits in IFS, and a $(( )) expansion only ever contains digits, so in practice, splitting never happens, whether because it is quoted, or just becaue there is nothing to split. The FreeBSD shell does it correctly (they do word splitting using a totally different mechanism than we do) - I will find where I missed testing for quoted expansions later tonight. Until that happens, expect a test failure from t_fsplit:split_arith While here add more comments in the other test casess (one had a comment already) that our shell parses incorrectly (this is a parsing problem, not an expansion problem, and the bug has existed forever .. and is shared by bash). That is, in an expression like "${var:-word}" the whole thing (including word) is quoted by the double quotes, and in "${var:-"word"}" the expansion is quoted, but 'word' is not, the 2nd " (the one before 'w') ends the opening quote, and the third (before }) turns quoting on again (it is required that there be an even number of unquoted quotes inside a ${} expression, so things like "${var:-"word} are simply invalid.) Another way of saying this, is that if the { is quoted (for which the only way is using " to get to this kind of expansion at all) the } must also be quoted (" quoted). There is no quote nesting here. This also means that in "${var:-'word'}" the single quotes are just characters, they are quoted by the "" that surround them, just as in "a 'string' containing quotes", but "${var:-"'word'"}} is valid and contains a single quoted word. Note that this is different than the patetrn-match/trim expansions ( ${var%pattern} etc) where any surrounding quotes do not affect the pattern, and all forms of quoting can be used in it - but it always parses as a pattern, and is never subject to filename expansion, so a '*' in it that is to mean "match any string" does not need special quoting to avoid it expanding to file names, regardless of whether the ${var%*} is quoted or not, but a * that is to be matched as a character literally does need to be quoted. I will probably file a PR about this bug sometime, but as it is very old, and doesn't every seem to bother anyone (and is shared by bash) there isn't any big hurry to open yet another verry messy can of excrement to fix it... This does mean that the FreeBSD shell "fails" some of our tests. (The test is wrong, their shell is correct.) To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/tests/bin/sh/t_fsplit.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/bin/sh/t_fsplit.sh diff -u src/tests/bin/sh/t_fsplit.sh:1.5 src/tests/bin/sh/t_fsplit.sh:1.6 --- src/tests/bin/sh/t_fsplit.sh:1.5 Sat Jun 3 10:27:05 2017 +++ src/tests/bin/sh/t_fsplit.sh Sat Jun 3 15:15:49 2017 @@ -1,4 +1,4 @@ -# $NetBSD: t_fsplit.sh,v 1.5 2017/06/03 10:27:05 kre Exp $ +# $NetBSD: t_fsplit.sh,v 1.6 2017/06/03 15:15:49 kre Exp $ # # Copyright (c) 2007-2016 The NetBSD Foundation, Inc. # All rights reserved. @@ -33,7 +33,7 @@ # the "${x-" and "}" were absent from the input line. # # So: sh -c 'set ${x-a b c}; echo $#' should give 3. -# and: sh -c 'set -- ${x-}' echo $#' shold give 0 +# and: sh -c 'set -- ${x-}' echo $#' should give 0 # # the implementation of "sh" to test @@ -79,6 +79,8 @@ check() then atf_fail "TEST ${TEST} '$1' failed ($STATUS)" fi + + return 0 } atf_test_case for @@ -209,8 +211,11 @@ replacement_val_body() { 'za bz zcz' check 'x=BOGUS; for i in ${x+"a ${x+b c}" d}; do echo "z${i}z"; done'\ 'za b cz zdz' + + # also incorrect: qq uuu q uuu check 'x=BOGUS; for i in ${x+"a ${x+"b c"}" d}; do echo "z${i}z"; done'\ 'za b cz zdz' + check 'x=BOGUS; for i in ${x+a ${x+"b c"} d}; do echo "z${i}z"; done'\ 'zaz zb cz zdz' check 'x=BOGUS; for i in ${x+a ${x+b c} d}; do echo "z${i}z"; done'\ @@ -234,8 +239,12 @@ ifs_alpha_body() { 'zaqbz zcz' check 'IFS=q; for i in ${x-"aq${x-bqc}"qd}; do echo "z${i}z"; done' \ 'zaqbqcz zdz' + + # this is another almost certainly incorrect expectation + #uu qq uuu q uu (quoted/unquoted) check 'IFS=q; for i in ${x-"aq${x-"bqc"}"qd}; do echo "z${i}z"; done' \ 'zaqbqcz zdz' + check 'IFS=q; for i in
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Sat Jun 3 14:51:16 UTC 2017 Modified Files: src/sys/arch/evbarm/conf: VEXPRESS_A15 Log Message: Add framebuffer support. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/evbarm/conf/VEXPRESS_A15 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/evbarm/conf/VEXPRESS_A15 diff -u src/sys/arch/evbarm/conf/VEXPRESS_A15:1.10 src/sys/arch/evbarm/conf/VEXPRESS_A15:1.11 --- src/sys/arch/evbarm/conf/VEXPRESS_A15:1.10 Fri Jun 2 21:16:42 2017 +++ src/sys/arch/evbarm/conf/VEXPRESS_A15 Sat Jun 3 14:51:15 2017 @@ -1,5 +1,5 @@ # -# $NetBSD: VEXPRESS_A15,v 1.10 2017/06/02 21:16:42 jmcneill Exp $ +# $NetBSD: VEXPRESS_A15,v 1.11 2017/06/03 14:51:15 jmcneill Exp $ # # ARM Versatile Express A15 # @@ -63,4 +63,21 @@ ld2 at sdmmc2 ld3 at sdmmc3 ld* at sdmmc? +# Framebuffer +genfb* at fdt? +wsdisplay* at genfb? +options VCONS_DRAW_INTR +options WSEMUL_VT100 +options WS_DEFAULT_FB=WSCOL_WHITE +options WS_DEFAULT_BG=WSCOL_BLACK +options WS_KERNEL_FB=WSCOL_GREEN +options WS_KERNEL_BG=WSCOL_BLACK +options WSDISPLAY_COMPAT_PCVT +options WSDISPLAY_COMPAT_SYSCONS +options WSDISPLAY_COMPAT_USL +options WSDISPLAY_COMPAT_RAWKBD +options WSDISPLAY_DEFAULTSCREENS=4 +pseudo-device wsmux +pseudo-device wsfont + cinclude "arch/evbarm/conf/VEXPRESS_A15.local"
CVS commit: src/sys/arch/arm/fdt
Module Name:src Committed By: jmcneill Date: Sat Jun 3 14:50:39 UTC 2017 Modified Files: src/sys/arch/arm/fdt: files.fdt Added Files: src/sys/arch/arm/fdt: plfb_fdt.c Log Message: Add driver for ARM PrimeCell Color LCD controller (PL111). To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/fdt/files.fdt cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/fdt/plfb_fdt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/fdt/files.fdt diff -u src/sys/arch/arm/fdt/files.fdt:1.7 src/sys/arch/arm/fdt/files.fdt:1.8 --- src/sys/arch/arm/fdt/files.fdt:1.7 Fri Jun 2 14:30:58 2017 +++ src/sys/arch/arm/fdt/files.fdt Sat Jun 3 14:50:39 2017 @@ -1,4 +1,4 @@ -# $NetBSD: files.fdt,v 1.7 2017/06/02 14:30:58 jmcneill Exp $ +# $NetBSD: files.fdt,v 1.8 2017/06/03 14:50:39 jmcneill Exp $ device armfdt { }: bus_space_generic, fdtbus attach armfdt at root with arm_fdt @@ -18,6 +18,9 @@ filearch/arm/fdt/gic_fdt.c attach plcom at fdt with plcom_fdt file arch/arm/fdt/plcom_fdt.c plcom_fdt +attach genfb at fdt with plfb_fdt: fdt_display_timing +file arch/arm/fdt/plfb_fdt.c plfb_fdt + attach plmmc at fdt with plmmc_fdt file arch/arm/fdt/plmmc_fdt.c plmmc_fdt Added files: Index: src/sys/arch/arm/fdt/plfb_fdt.c diff -u /dev/null src/sys/arch/arm/fdt/plfb_fdt.c:1.1 --- /dev/null Sat Jun 3 14:50:39 2017 +++ src/sys/arch/arm/fdt/plfb_fdt.c Sat Jun 3 14:50:39 2017 @@ -0,0 +1,296 @@ +/* $NetBSD: plfb_fdt.c,v 1.1 2017/06/03 14:50:39 jmcneill Exp $ */ + +/*- + * Copyright (c) 2017 Jared McNeill+ * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * ARM PrimeCell PL111 framebuffer console driver + */ + +#include +__KERNEL_RCSID(0, "$NetBSD: plfb_fdt.c,v 1.1 2017/06/03 14:50:39 jmcneill Exp $"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#define LCDTIMING0 0x000 +#define LCDTIMING0_HBP __BITS(31,24) +#define LCDTIMING0_HFP __BITS(23,16) +#define LCDTIMING0_HSW __BITS(15,8) +#define LCDTIMING0_PPL __BITS(7,2) +#define LCDTIMING1 0x004 +#define LCDTIMING1_VBP __BITS(31,24) +#define LCDTIMING1_VFP __BITS(23,16) +#define LCDTIMING1_VSW __BITS(15,10) +#define LCDTIMING1_LPP __BITS(9,0) +#define LCDUPBASE 0x010 +#define LCDLPBASE 0x014 +#define LCDCONTROL 0x018 +#define LCDCONTROL_PWR __BIT(11) +#define LCDCONTROL_BGR __BIT(8) +#define LCDCONTROL_BPP __BITS(3,1) +#define LCDCONTROL_BPP_24 __SHIFTIN(5, LCDCONTROL_BPP) +#define LCDCONTROL_EN __BIT(0) + +#define PLFB_BPP 32 + +struct plfb_softc { + struct genfb_softc sc_gen; + bus_space_tag_t sc_bst; + bus_space_handle_t sc_bsh; + int sc_phandle; + + bus_space_handle_t sc_vram_bsh; + bus_addr_t sc_vram_addr; + bus_size_t sc_vram_size; + uintptr_t sc_vram; + + uint32_t sc_wstype; +}; + +static int plfb_match(device_t, cfdata_t, void *); +static void plfb_attach(device_t, device_t, void *); + +static int plfb_ioctl(void *, void *, u_long, void *, int, lwp_t *); +static paddr_t plfb_mmap(void *, void *, off_t, int); +static bool plfb_shutdown(device_t, int); + +static void plfb_init(struct plfb_softc *); + +static const char * const compatible[] = { + "arm,pl111", + NULL +}; + +CFATTACH_DECL_NEW(plfb_fdt, sizeof(struct plfb_softc), +plfb_match, plfb_attach, NULL, NULL); + +#define FB_READ(sc, reg) \ + bus_space_read_4((sc)->sc_bst, (sc)->sc_bsh, (reg)) +#define FB_WRITE(sc, reg, val) \ + bus_space_write_4((sc)->sc_bst, (sc)->sc_bsh, (reg), (val)) + +static int
CVS commit: src/sys/dev/wscons
Module Name:src Committed By: jmcneill Date: Sat Jun 3 14:49:42 UTC 2017 Modified Files: src/sys/dev/wscons: wsconsio.h Log Message: Add type for ARM PrimeCell PL11x To generate a diff of this commit: cvs rdiff -u -r1.117 -r1.118 src/sys/dev/wscons/wsconsio.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/wscons/wsconsio.h diff -u src/sys/dev/wscons/wsconsio.h:1.117 src/sys/dev/wscons/wsconsio.h:1.118 --- src/sys/dev/wscons/wsconsio.h:1.117 Fri Mar 24 00:45:27 2017 +++ src/sys/dev/wscons/wsconsio.h Sat Jun 3 14:49:42 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: wsconsio.h,v 1.117 2017/03/24 00:45:27 macallan Exp $ */ +/* $NetBSD: wsconsio.h,v 1.118 2017/06/03 14:49:42 jmcneill Exp $ */ /* * Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved. @@ -340,6 +340,7 @@ struct wsmouse_repeat { #define WSDISPLAY_TYPE_MESON 62 /* Amlogic Meson ARM SoC */ #define WSDISPLAY_TYPE_TEGRA 63 /* NVIDIA Tegra ARM SoC */ #define WSDISPLAY_TYPE_PLATINUM 64 /* onboard fb in PowerMac 7200 */ +#define WSDISPLAY_TYPE_PLFB 65 /* ARM PrimeCell PL11x */ /* Basic display information. Not applicable to all display types. */ struct wsdisplay_fbinfo {
CVS commit: src/sys/dev/fdt
Module Name:src Committed By: jmcneill Date: Sat Jun 3 14:48:03 UTC 2017 Modified Files: src/sys/dev/fdt: files.fdt Added Files: src/sys/dev/fdt: display_timing.c display_timing.h Log Message: Add helper for parsing display timings. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/dev/fdt/display_timing.c \ src/sys/dev/fdt/display_timing.h cvs rdiff -u -r1.15 -r1.16 src/sys/dev/fdt/files.fdt 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/fdt/files.fdt diff -u src/sys/dev/fdt/files.fdt:1.15 src/sys/dev/fdt/files.fdt:1.16 --- src/sys/dev/fdt/files.fdt:1.15 Fri Jun 2 15:09:16 2017 +++ src/sys/dev/fdt/files.fdt Sat Jun 3 14:48:03 2017 @@ -1,4 +1,4 @@ -# $NetBSD: files.fdt,v 1.15 2017/06/02 15:09:16 jmcneill Exp $ +# $NetBSD: files.fdt,v 1.16 2017/06/03 14:48:03 jmcneill Exp $ include "external/bsd/libfdt/conf/files.libfdt" @@ -38,3 +38,6 @@ file dev/fdt/fdt_pinctrl.c fdtbus device cpus { } : fdtbus attach cpus at fdt file dev/fdt/cpus.ccpus + +define fdt_display_timing +file dev/fdt/display_timing.c fdt_display_timing Added files: Index: src/sys/dev/fdt/display_timing.c diff -u /dev/null src/sys/dev/fdt/display_timing.c:1.1 --- /dev/null Sat Jun 3 14:48:03 2017 +++ src/sys/dev/fdt/display_timing.c Sat Jun 3 14:48:02 2017 @@ -0,0 +1,59 @@ +/* $NetBSD: display_timing.c,v 1.1 2017/06/03 14:48:02 jmcneill Exp $ */ + +/*- + * Copyright (c) 2017 Jared McNeill+ * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__KERNEL_RCSID(0, "$NetBSD: display_timing.c,v 1.1 2017/06/03 14:48:02 jmcneill Exp $"); + +#include +#include +#include +#include +#include + +#include +#include + +#define GETPROP(n, v) \ + of_getprop_uint32(phandle, (n), (v)) + +int +display_timing_parse(int phandle, struct display_timing *timing) +{ + if (GETPROP("clock-frequency", >clock_freq) || + GETPROP("hactive", >hactive) || + GETPROP("vactive", >vactive) || + GETPROP("hfront-porch", >hfront_porch) || + GETPROP("hback-porch", >hback_porch) || + GETPROP("hsync-len", >hsync_len) || + GETPROP("vfront-porch", >vfront_porch) || + GETPROP("vback-porch", >vback_porch) || + GETPROP("vsync-len", >vsync_len)) + return EINVAL; + + return 0; +} Index: src/sys/dev/fdt/display_timing.h diff -u /dev/null src/sys/dev/fdt/display_timing.h:1.1 --- /dev/null Sat Jun 3 14:48:03 2017 +++ src/sys/dev/fdt/display_timing.h Sat Jun 3 14:48:02 2017 @@ -0,0 +1,47 @@ +/* $NetBSD: display_timing.h,v 1.1 2017/06/03 14:48:02 jmcneill Exp $ */ + +/*- + * Copyright (c) 2017 Jared McNeill + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE,
CVS commit: src/distrib/notes/common
Module Name:src Committed By: christos Date: Sat Jun 3 14:47:52 UTC 2017 Modified Files: src/distrib/notes/common: legal.common Log Message: remove me. To generate a diff of this commit: cvs rdiff -u -r1.97 -r1.98 src/distrib/notes/common/legal.common Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/notes/common/legal.common diff -u src/distrib/notes/common/legal.common:1.97 src/distrib/notes/common/legal.common:1.98 --- src/distrib/notes/common/legal.common:1.97 Sat Jun 3 05:00:35 2017 +++ src/distrib/notes/common/legal.common Sat Jun 3 10:47:52 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: legal.common,v 1.97 2017/06/03 09:00:35 mrg Exp $ +.\" $NetBSD: legal.common,v 1.98 2017/06/03 14:47:52 christos Exp $ .\" .\" Copyright (c) 1999-2004 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -144,8 +144,6 @@ for the NetBSD Project. .It This product includes software developed by Christopher G. Demetriou. .It -This product includes software developed by Christos Zoulas. -.It This product includes software developed by Chuck Silvers. .It This product includes software developed by Colin Wood
CVS commit: src/sys/arch/sgimips/gio
Module Name:src Committed By: christos Date: Sat Jun 3 14:46:51 UTC 2017 Modified Files: src/sys/arch/sgimips/gio: devlist2h.awk Log Message: remove my copyright To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/sgimips/gio/devlist2h.awk 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/sgimips/gio/devlist2h.awk diff -u src/sys/arch/sgimips/gio/devlist2h.awk:1.5 src/sys/arch/sgimips/gio/devlist2h.awk:1.6 --- src/sys/arch/sgimips/gio/devlist2h.awk:1.5 Fri May 2 14:11:05 2008 +++ src/sys/arch/sgimips/gio/devlist2h.awk Sat Jun 3 10:46:51 2017 @@ -1,5 +1,5 @@ #! /usr/bin/awk -f -# $NetBSD: devlist2h.awk,v 1.5 2008/05/02 18:11:05 martin Exp $ +# $NetBSD: devlist2h.awk,v 1.6 2017/06/03 14:46:51 christos Exp $ # # Copyright (c) 1998 The NetBSD Foundation, Inc. # All rights reserved. @@ -42,7 +42,6 @@ # 3. All advertising materials mentioning features or use of this software #must display the following acknowledgement: # This product includes software developed by Christopher G. Demetriou. -# This product includes software developed by Christos Zoulas # 4. The name of the author(s) may not be used to endorse or promote products #derived from this software without specific prior written permission #
CVS commit: src/external/bsd/tmux/dist/compat
Module Name:src Committed By: christos Date: Sat Jun 3 14:47:25 UTC 2017 Modified Files: src/external/bsd/tmux/dist/compat: fparseln.c Log Message: remove my copyright (and clauses 3/4) To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/tmux/dist/compat/fparseln.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tmux/dist/compat/fparseln.c diff -u src/external/bsd/tmux/dist/compat/fparseln.c:1.1.1.2 src/external/bsd/tmux/dist/compat/fparseln.c:1.2 --- src/external/bsd/tmux/dist/compat/fparseln.c:1.1.1.2 Sat Apr 22 20:21:38 2017 +++ src/external/bsd/tmux/dist/compat/fparseln.c Sat Jun 3 10:47:25 2017 @@ -12,11 +12,6 @@ * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in the *documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - *must display the following acknowledgement: - * This product includes software developed by Christos Zoulas. - * 4. The name of the author may not be used to endorse or promote products - *derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
CVS commit: src/sys/dev
Module Name:src Committed By: christos Date: Sat Jun 3 14:46:29 UTC 2017 Modified Files: src/sys/dev/isapnp: devlist2h.awk src/sys/dev/mii: devlist2h.awk src/sys/dev/pcmcia: devlist2h.awk src/sys/dev/sdmmc: devlist2h.awk Log Message: remove my copyright. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/dev/isapnp/devlist2h.awk cvs rdiff -u -r1.7 -r1.8 src/sys/dev/mii/devlist2h.awk cvs rdiff -u -r1.12 -r1.13 src/sys/dev/pcmcia/devlist2h.awk cvs rdiff -u -r1.1 -r1.2 src/sys/dev/sdmmc/devlist2h.awk 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/isapnp/devlist2h.awk diff -u src/sys/dev/isapnp/devlist2h.awk:1.9 src/sys/dev/isapnp/devlist2h.awk:1.10 --- src/sys/dev/isapnp/devlist2h.awk:1.9 Fri May 2 14:11:05 2008 +++ src/sys/dev/isapnp/devlist2h.awk Sat Jun 3 10:46:29 2017 @@ -1,5 +1,5 @@ #! /usr/bin/awk -f -# $NetBSD: devlist2h.awk,v 1.9 2008/05/02 18:11:05 martin Exp $ +# $NetBSD: devlist2h.awk,v 1.10 2017/06/03 14:46:29 christos Exp $ # # Copyright (c) 1998 The NetBSD Foundation, Inc. # All rights reserved. @@ -42,7 +42,6 @@ # 3. All advertising materials mentioning features or use of this software #must display the following acknowledgement: # This product includes software developed by Christopher G. Demetriou. -# This product includes software developed by Christos Zoulas # 4. The name of the author(s) may not be used to endorse or promote products #derived from this software without specific prior written permission # Index: src/sys/dev/mii/devlist2h.awk diff -u src/sys/dev/mii/devlist2h.awk:1.7 src/sys/dev/mii/devlist2h.awk:1.8 --- src/sys/dev/mii/devlist2h.awk:1.7 Fri May 2 14:11:05 2008 +++ src/sys/dev/mii/devlist2h.awk Sat Jun 3 10:46:29 2017 @@ -1,5 +1,5 @@ #! /usr/bin/awk -f -# $NetBSD: devlist2h.awk,v 1.7 2008/05/02 18:11:05 martin Exp $ +# $NetBSD: devlist2h.awk,v 1.8 2017/06/03 14:46:29 christos Exp $ # # Copyright (c) 1998 The NetBSD Foundation, Inc. # All rights reserved. @@ -42,7 +42,6 @@ # 3. All advertising materials mentioning features or use of this software #must display the following acknowledgement: # This model includes software developed by Christopher G. Demetriou. -# This model includes software developed by Christos Zoulas # 4. The name of the author(s) may not be used to endorse or promote models #derived from this software without specific prior written permission # Index: src/sys/dev/pcmcia/devlist2h.awk diff -u src/sys/dev/pcmcia/devlist2h.awk:1.12 src/sys/dev/pcmcia/devlist2h.awk:1.13 --- src/sys/dev/pcmcia/devlist2h.awk:1.12 Fri May 2 14:11:06 2008 +++ src/sys/dev/pcmcia/devlist2h.awk Sat Jun 3 10:46:29 2017 @@ -1,5 +1,5 @@ #! /usr/bin/awk -f -# $NetBSD: devlist2h.awk,v 1.12 2008/05/02 18:11:06 martin Exp $ +# $NetBSD: devlist2h.awk,v 1.13 2017/06/03 14:46:29 christos Exp $ # # Copyright (c) 1998, 2004 The NetBSD Foundation, Inc. # All rights reserved. @@ -42,7 +42,6 @@ # 3. All advertising materials mentioning features or use of this software #must display the following acknowledgement: # This product includes software developed by Christopher G. Demetriou. -# This product includes software developed by Christos Zoulas # 4. The name of the author(s) may not be used to endorse or promote products #derived from this software without specific prior written permission # Index: src/sys/dev/sdmmc/devlist2h.awk diff -u src/sys/dev/sdmmc/devlist2h.awk:1.1 src/sys/dev/sdmmc/devlist2h.awk:1.2 --- src/sys/dev/sdmmc/devlist2h.awk:1.1 Mon Apr 20 23:00:30 2009 +++ src/sys/dev/sdmmc/devlist2h.awk Sat Jun 3 10:46:29 2017 @@ -1,9 +1,8 @@ #! /usr/bin/awk -f -# $NetBSD: devlist2h.awk,v 1.1 2009/04/21 03:00:30 nonaka Exp $ +# $NetBSD: devlist2h.awk,v 1.2 2017/06/03 14:46:29 christos Exp $ # $OpenBSD: devlist2h.awk,v 1.2 2006/06/02 21:16:44 uwe Exp $ # NetBSD: devlist2h.awk,v 1.2 1998/07/22 11:47:13 christos Exp # -# Copyright (c) 1998, Christos Zoulas # Copyright (c) 1995, 1996 Christopher G. Demetriou # All rights reserved. # @@ -67,7 +66,7 @@ NR == 1 { VERSION = $0 gsub("\\$", "", VERSION) - printf("/*\t$NetBSD: devlist2h.awk,v 1.1 2009/04/21 03:00:30 nonaka Exp $\t*/\n\n") > hfile + printf("/*\t$NetBSD: devlist2h.awk,v 1.2 2017/06/03 14:46:29 christos Exp $\t*/\n\n") > hfile printf("/*\n") > hfile printf(" * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.\n") \ > hfile
CVS commit: src/tests/bin/sh
Module Name:src Committed By: kre Date: Sat Jun 3 14:45:59 UTC 2017 Modified Files: src/tests/bin/sh: t_expand.sh Log Message: Complete the special request by quoting chapter & verse from POSIX as to why ${011} is ${11} and not ${9} (that is, why we interpret it that way, the "why could it not be the other way?" is just "because that is not how it was ever implemented". To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/tests/bin/sh/t_expand.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/bin/sh/t_expand.sh diff -u src/tests/bin/sh/t_expand.sh:1.16 src/tests/bin/sh/t_expand.sh:1.17 --- src/tests/bin/sh/t_expand.sh:1.16 Sat Jun 3 11:23:01 2017 +++ src/tests/bin/sh/t_expand.sh Sat Jun 3 14:45:59 2017 @@ -1,4 +1,4 @@ -# $NetBSD: t_expand.sh,v 1.16 2017/06/03 11:23:01 kre Exp $ +# $NetBSD: t_expand.sh,v 1.17 2017/06/03 14:45:59 kre Exp $ # # Copyright (c) 2007, 2009 The NetBSD Foundation, Inc. # All rights reserved. @@ -424,6 +424,11 @@ shell_params_body() { '0=a 1=b 2=c' 0 # by special request, for PaulG... (${0...} is not octal!) + + # Posix XCU 2.5.1 (Issue 7 TC2 pg 2349 lines 74835..6): + # The digits denoting the positional parameters shall always + # be interpreted as a decimal value, even if there is a leading zero. + check \ 'set -- a b c d e f g h i j k l m; echo "$#: ${08} ${010} ${011}"' \ '13: h j k' 0
CVS commit: src/usr.sbin/rpc.statd
Module Name:src Committed By: christos Date: Sat Jun 3 14:44:12 UTC 2017 Modified Files: src/usr.sbin/rpc.statd: statd.c Log Message: remove my copyright. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/usr.sbin/rpc.statd/statd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/rpc.statd/statd.c diff -u src/usr.sbin/rpc.statd/statd.c:1.30 src/usr.sbin/rpc.statd/statd.c:1.31 --- src/usr.sbin/rpc.statd/statd.c:1.30 Fri Aug 21 11:41:38 2015 +++ src/usr.sbin/rpc.statd/statd.c Sat Jun 3 10:44:12 2017 @@ -1,7 +1,6 @@ -/* $NetBSD: statd.c,v 1.30 2015/08/21 15:41:38 christos Exp $ */ +/* $NetBSD: statd.c,v 1.31 2017/06/03 14:44:12 christos Exp $ */ /* - * Copyright (c) 1997 Christos Zoulas. All rights reserved. * Copyright (c) 1995 * A.R. Gordon (andrew.gor...@net-tel.co.uk). All rights reserved. * @@ -37,7 +36,7 @@ #include #ifndef lint -__RCSID("$NetBSD: statd.c,v 1.30 2015/08/21 15:41:38 christos Exp $"); +__RCSID("$NetBSD: statd.c,v 1.31 2017/06/03 14:44:12 christos Exp $"); #endif /* main() function for status monitor daemon. Some of the code in this */
CVS commit: src/sys/arch/arm/arm
Module Name:src Committed By: skrll Date: Sat Jun 3 11:51:59 UTC 2017 Modified Files: src/sys/arch/arm/arm: disassem.c Log Message: Adjust the output of {ldr,str}x instructions slightly and deal with the writeback bit. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/arch/arm/arm/disassem.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/arm/disassem.c diff -u src/sys/arch/arm/arm/disassem.c:1.38 src/sys/arch/arm/arm/disassem.c:1.39 --- src/sys/arch/arm/arm/disassem.c:1.38 Fri Jun 2 21:20:47 2017 +++ src/sys/arch/arm/arm/disassem.c Sat Jun 3 11:51:59 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: disassem.c,v 1.38 2017/06/02 21:20:47 skrll Exp $ */ +/* $NetBSD: disassem.c,v 1.39 2017/06/03 11:51:59 skrll Exp $ */ /* * Copyright (c) 1996 Mark Brinicombe. @@ -49,7 +49,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: disassem.c,v 1.38 2017/06/02 21:20:47 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: disassem.c,v 1.39 2017/06/03 11:51:59 skrll Exp $"); #include @@ -203,6 +203,7 @@ static const struct arm32_insn arm32_i[] /* A5.2 exceptions */ /* A5.2.7 Halfword multiply and multiply accumulate */ + /* A5.2.9 Extra load/store instructions, unprivileged */ { 0x0f3000f0, 0x002000b0, "strht", "de" }, @@ -898,15 +899,17 @@ disasm_insn_ldrxstrx(const disasm_interf di->di_printf("[r%d", (insn >> 16) & 0x0f); if ((insn & 0x01400f0f) != 0x0140) { di->di_printf("%s, ", (insn & (1 << 24)) ? "" : "]"); - if (!(insn & 0x0080)) -di->di_printf("-"); + char const *sign = (insn & 0x0080) ? "" : "-"; if (insn & (1 << 22)) -di->di_printf("#0x%02x", offset); +di->di_printf("#%s0x%02x", sign, offset); else -di->di_printf("r%d", (insn & 0x0f)); +di->di_printf("%sr%d", sign, (insn & 0x0f)); } - if (insn & (1 << 24)) + if (insn & (1 << 24)) { di->di_printf("]"); + if (__SHIFTOUT(insn, __BIT(21))) +di->di_printf("!"); + } } }
CVS commit: src/tests/bin/sh
Module Name:src Committed By: kre Date: Sat Jun 3 11:23:01 UTC 2017 Modified Files: src/tests/bin/sh: t_expand.sh Log Message: By special request, add a check that ${011} is ${11} not ${9} (etc) and that ${08} is not an error. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/tests/bin/sh/t_expand.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/bin/sh/t_expand.sh diff -u src/tests/bin/sh/t_expand.sh:1.15 src/tests/bin/sh/t_expand.sh:1.16 --- src/tests/bin/sh/t_expand.sh:1.15 Fri Jun 2 01:48:13 2017 +++ src/tests/bin/sh/t_expand.sh Sat Jun 3 11:23:01 2017 @@ -1,4 +1,4 @@ -# $NetBSD: t_expand.sh,v 1.15 2017/06/02 01:48:13 kre Exp $ +# $NetBSD: t_expand.sh,v 1.16 2017/06/03 11:23:01 kre Exp $ # # Copyright (c) 2007, 2009 The NetBSD Foundation, Inc. # All rights reserved. @@ -423,6 +423,11 @@ shell_params_body() { check "${TEST_SH} -c 'echo 0=\${00} 1=\${01} 2=\${02}' a b c" \ '0=a 1=b 2=c' 0 + # by special request, for PaulG... (${0...} is not octal!) + check \ + 'set -- a b c d e f g h i j k l m; echo "$#: ${08} ${010} ${011}"' \ + '13: h j k' 0 + results }
CVS commit: src/bin/sh
Module Name:src Committed By: kre Date: Sat Jun 3 10:31:16 UTC 2017 Modified Files: src/bin/sh: expand.c expand.h memalloc.h parser.c Log Message: Fixes to shell expand (that is, $ stuff) from FreeBSD (implemented differently...) In particular ${01} is now $1 not $0 (for ${0any-digits}) ${4294967297} is most probably now "" (unless you have a very large number of params) it is no longer an alias for $1 (4294967297 & 0x) == 1 $(( expr $(( more )) stuff )) is no longer the same as $(( expr (( more )) stuff )) which was sometimes OK, as in: $(( 3 + $(( 2 - 1 )) * 3 )) but not always as in: $(( 1$((1 + 1))1 )) which should be 121, but was an arith syntax error as 1((1 + 1))1 is meaningless. Probably some more. This also sprinkles a little const, splits a big func that had 2 (kind of unrelated) purposes into two simpler ones, and avoids some (semi-dubious) modifications (and restores) in the input string to insert \0's when they were needed. To generate a diff of this commit: cvs rdiff -u -r1.106 -r1.107 src/bin/sh/expand.c cvs rdiff -u -r1.21 -r1.22 src/bin/sh/expand.h cvs rdiff -u -r1.15 -r1.16 src/bin/sh/memalloc.h cvs rdiff -u -r1.130 -r1.131 src/bin/sh/parser.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/sh/expand.c diff -u src/bin/sh/expand.c:1.106 src/bin/sh/expand.c:1.107 --- src/bin/sh/expand.c:1.106 Sun May 28 00:38:01 2017 +++ src/bin/sh/expand.c Sat Jun 3 10:31:16 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: expand.c,v 1.106 2017/05/28 00:38:01 kre Exp $ */ +/* $NetBSD: expand.c,v 1.107 2017/06/03 10:31:16 kre Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)expand.c 8.5 (Berkeley) 5/15/95"; #else -__RCSID("$NetBSD: expand.c,v 1.106 2017/05/28 00:38:01 kre Exp $"); +__RCSID("$NetBSD: expand.c,v 1.107 2017/06/03 10:31:16 kre Exp $"); #endif #endif /* not lint */ @@ -97,13 +97,15 @@ struct ifsregion ifsfirst; /* first stru struct ifsregion *ifslastp; /* last struct in list */ struct arglist exparg; /* holds expanded arg list */ -STATIC void argstr(char *, int); -STATIC char *exptilde(char *, int); +STATIC const char *argstr(const char *, int); +STATIC const char *exptilde(const char *, int); STATIC void expbackq(union node *, int, int); -STATIC int subevalvar(char *, char *, int, int, int, int, int); -STATIC char *evalvar(char *, int); -STATIC int varisset(char *, int); -STATIC void varvalue(char *, int, int, int); +STATIC const char *expari(const char *, int); +STATIC int subevalvar(const char *, const char *, int, int, int); +STATIC int subevalvar_trim(const char *, int, int, int, int, int); +STATIC const char *evalvar(const char *, int); +STATIC int varisset(const char *, int); +STATIC void varvalue(const char *, int, int, int); STATIC void recordregion(int, int, int); STATIC void removerecordregions(int); STATIC void ifsbreakup(char *, struct arglist *); @@ -116,6 +118,7 @@ STATIC struct strlist *msort(struct strl STATIC int patmatch(const char *, const char *, int); STATIC char *cvtnum(int, char *); static int collate_range_cmp(wchar_t, wchar_t); +STATIC void add_args(struct strlist *); /* * Expand shell variables and backquotes inside a here document. @@ -156,12 +159,16 @@ expandarg(union node *arg, struct arglis struct strlist *sp; char *p; + if (fflag) /* no filename expandsion */ + flag &= ~EXP_GLOB; + argbackq = arg->narg.backquote; STARTSTACKSTR(expdest); ifsfirst.next = NULL; ifslastp = NULL; argstr(arg->narg.text, flag); if (arglist == NULL) { + STACKSTRNUL(expdest); return; /* here document expanded */ } STPUTC('\0', expdest); @@ -170,11 +177,14 @@ expandarg(union node *arg, struct arglis /* * TODO - EXP_REDIR */ - if (flag & EXP_FULL) { + if (flag & EXP_SPLIT) { ifsbreakup(p, ); *exparg.lastp = NULL; exparg.lastp = - expandmeta(exparg.list, flag); + if (flag & EXP_GLOB) + expandmeta(exparg.list, flag); + else + add_args(exparg.list); } else { if (flag & EXP_REDIR) /*XXX - for now, just remove escapes */ rmescapes(p); @@ -195,35 +205,50 @@ expandarg(union node *arg, struct arglis /* * Perform variable and command substitution. - * If EXP_FULL is set, output CTLESC characters to allow for further processing. + * If EXP_GLOB is set, output CTLESC characters to allow for further processing. + * If EXP_SPLIT is set, remember location of result for later, * Otherwise treat $@ like $* since no splitting will be performed. */ -STATIC void -argstr(char *p, int flag) +STATIC const char * +argstr(const char *p, int flag) { char c; - int quotes = flag & (EXP_FULL | EXP_CASE | EXP_REDIR); /* do CTLESC */ + int
CVS commit: src/tests/bin/sh
Module Name:src Committed By: kre Date: Sat Jun 3 10:27:05 UTC 2017 Modified Files: src/tests/bin/sh: t_fsplit.sh Log Message: Add some extra sub-tests checking splitting of ${#var} - just for my piece of mind (to verify I was not breaking anything here.) Also added some commentary better explaining why one of the tests of splitting quoted variable expansions is almost certainly incorrect (both the tests, and what sh does) ... though bash does the same as us, so all is not lost! To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/bin/sh/t_fsplit.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/bin/sh/t_fsplit.sh diff -u src/tests/bin/sh/t_fsplit.sh:1.4 src/tests/bin/sh/t_fsplit.sh:1.5 --- src/tests/bin/sh/t_fsplit.sh:1.4 Sun Mar 27 14:50:01 2016 +++ src/tests/bin/sh/t_fsplit.sh Sat Jun 3 10:27:05 2017 @@ -1,4 +1,4 @@ -# $NetBSD: t_fsplit.sh,v 1.4 2016/03/27 14:50:01 christos Exp $ +# $NetBSD: t_fsplit.sh,v 1.5 2017/06/03 10:27:05 kre Exp $ # # Copyright (c) 2007-2016 The NetBSD Foundation, Inc. # All rights reserved. @@ -137,11 +137,13 @@ default_val_body() { check 'for i in ${x-a ${x-b c} d}; do echo "z${i}z"; done' \ 'zaz zbz zcz zdz' - # I am not sure these two are correct, the rules on quoting word - # in ${var-word} are peculiar, and hard to fathom... - # They are what the NetBSD shell does, and bash, not the freebsd shell - # (as of Mar 1, 2016) + # I am not sure the first of these two is correct, the rules on + # quoting word in ${var-word} are peculiar, and hard to fathom... + # It is what the NetBSD shell does, and bash, not the freebsd shell + # and not ksh93 (as of Mar 1, 2016, and still in June 2017) + # The likely correct interp of the next one is 'za bz zcz zdz' + # should be: qq uuu q uuu (unquoted/quoted) no nesting. check 'for i in ${x-"a ${x-"b c"}" d}; do echo "z${i}z"; done' \ 'za b cz zdz' check 'for i in ${x-a ${x-"b c"} d}; do echo "z${i}z"; done' \ @@ -337,6 +339,7 @@ var_length_body() { long=12345678123456781234567812345678 long=$long$long$long$long export long + unset x # first test that the test method works... check 'set -u; : ${long}; echo ${#long}' '128' @@ -344,8 +347,13 @@ var_length_body() { # Check that we apply IFS to ${#var} check 'echo ${#long}; IFS=2; echo ${#long}; set 1 ${#long};echo $#' \ '128 1 8 3' - check 'IFS=2; set ${x-${#long}}; IFS=" "; echo $* $#' '1 8 2' - check 'IFS=2; set ${x-"${#long}"}; IFS=" "; echo $* $#' '128 1' + check 'IFS=2; set ${x-${#long}}; IFS=" "; echo $* $#' '1 8 2' + check 'IFS=2; set ${x-"${#long}"}; IFS=" "; echo $* $#' '128 1' + check 'IFS=2; set "${x-${#long}}"; IFS=" "; echo $* $#' '128 1' + check 'IFS=2; set ${x-${#long}}; : ; echo $* $#' '1 8 ' + check 'IFS=2; set ${x-${#long}}; : ; echo $* "$#"' '1 8 2' + check 'IFS=2; set ${x-${#long}}; : ; echo "$*" "$#"' '128 2' + check 'IFS=2; set ${x-${#long}}; : ; echo "$@" "$#"' '1 8 2' } atf_init_test_cases() {
CVS commit: src/distrib/notes/common
Module Name:src Committed By: mrg Date: Sat Jun 3 09:00:35 UTC 2017 Modified Files: src/distrib/notes/common: legal.common Log Message: there are no copyright/license statements from "Terrence R. Lambert" requiring attribution any in our tree any more. remove it from our list here. To generate a diff of this commit: cvs rdiff -u -r1.96 -r1.97 src/distrib/notes/common/legal.common Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/notes/common/legal.common diff -u src/distrib/notes/common/legal.common:1.96 src/distrib/notes/common/legal.common:1.97 --- src/distrib/notes/common/legal.common:1.96 Fri May 22 18:27:03 2015 +++ src/distrib/notes/common/legal.common Sat Jun 3 09:00:35 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: legal.common,v 1.96 2015/05/22 18:27:03 snj Exp $ +.\" $NetBSD: legal.common,v 1.97 2017/06/03 09:00:35 mrg Exp $ .\" .\" Copyright (c) 1999-2004 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -371,8 +371,6 @@ This product includes software developed This product includes software developed by Tatoku Ogaito for the NetBSD Project. .It -This product includes software developed by Terrence R. Lambert. -.It This product includes software developed by Texas A University and its contributors. .It
CVS commit: src/share/man/man9
Module Name:src Committed By: abhinav Date: Sat Jun 3 08:44:59 UTC 2017 Modified Files: src/share/man/man9: rwlock.9 Log Message: Fix typo: s/DIANOSTIC/DIAGNOSTIC To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/share/man/man9/rwlock.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/rwlock.9 diff -u src/share/man/man9/rwlock.9:1.15 src/share/man/man9/rwlock.9:1.16 --- src/share/man/man9/rwlock.9:1.15 Thu Dec 2 12:54:13 2010 +++ src/share/man/man9/rwlock.9 Sat Jun 3 08:44:59 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: rwlock.9,v 1.15 2010/12/02 12:54:13 wiz Exp $ +.\" $NetBSD: rwlock.9,v 1.16 2017/06/03 08:44:59 abhinav Exp $ .\" .\" Copyright (c) 2006, 2007, 2009 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -100,7 +100,7 @@ Note that these interfaces must not be u interrupt handler. .Sh OPTIONS AND MACROS .Bl -tag -width abcd -.It Cd "options DIANOSTIC" +.It Cd "options DIAGNOSTIC" .Pp Kernels compiled with the .Dv DIAGNOSTIC
CVS commit: src/share/dict
Module Name:src Committed By: abhinav Date: Sat Jun 3 07:30:50 UTC 2017 Modified Files: src/share/dict: web2 Log Message: Add `instantiate' To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/share/dict/web2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/dict/web2 diff -u src/share/dict/web2:1.27 src/share/dict/web2:1.28 --- src/share/dict/web2:1.27 Mon Apr 24 18:18:15 2017 +++ src/share/dict/web2 Sat Jun 3 07:30:50 2017 @@ -95228,6 +95228,7 @@ instantaneously instantaneousness instanter instantial +instantiate instantly instantness instar