CVS commit: src/lib/libcurses
Module Name:src Committed By: uwe Date: Sun Jan 6 04:27:53 UTC 2019 Modified Files: src/lib/libcurses: refresh.c Log Message: _wnoutrefresh - extend current position checks. Also verify that dwin->cury >= begy (ditto for x), i.e. for pads make sure that the current position is after the beginning of the displayed portion. While here refactor the checks for better readability. We should probably combine the y and x checks b/c if one of them is not in the range, the current position as a whole is not in the range and it doesn't make sense to pick and set just the y or just the x part of it. To generate a diff of this commit: cvs rdiff -u -r1.104 -r1.105 src/lib/libcurses/refresh.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/libcurses/refresh.c diff -u src/lib/libcurses/refresh.c:1.104 src/lib/libcurses/refresh.c:1.105 --- src/lib/libcurses/refresh.c:1.104 Sun Jan 6 03:59:17 2019 +++ src/lib/libcurses/refresh.c Sun Jan 6 04:27:53 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: refresh.c,v 1.104 2019/01/06 03:59:17 uwe Exp $ */ +/* $NetBSD: refresh.c,v 1.105 2019/01/06 04:27:53 uwe Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)refresh.c 8.7 (Berkeley) 8/13/94"; #else -__RCSID("$NetBSD: refresh.c,v 1.104 2019/01/06 03:59:17 uwe Exp $"); +__RCSID("$NetBSD: refresh.c,v 1.105 2019/01/06 04:27:53 uwe Exp $"); #endif #endif/* not lint */ @@ -165,6 +165,7 @@ _wnoutrefresh(WINDOW *win, int begy, int { SCREEN *screen = win->screen; short sy, wy, wx, y_off, x_off, mx, dy_off, dx_off, endy; + int newy, newx; __LINE *wlp, *vlp, *dwlp; WINDOW *sub_win, *orig, *swin, *dwin; @@ -217,12 +218,14 @@ _wnoutrefresh(WINDOW *win, int begy, int } /* Check that cursor position on "win" is valid for "__virtscr" */ - if (dwin->cury + wbegy - begy < screen->__virtscr->maxy && - dwin->cury + wbegy - begy >= 0 && dwin->cury < maxy) - screen->__virtscr->cury = dwin->cury + wbegy - begy; - if (dwin->curx + wbegx - begx < screen->__virtscr->maxx && - dwin->curx + wbegx - begx >= 0 && dwin->curx < maxx) - screen->__virtscr->curx = dwin->curx + wbegx - begx; + newy = wbegy + dwin->cury - begy; + newx = wbegx + dwin->curx - begx; + if (begy <= dwin->cury && dwin->cury < maxy + && 0 <= newy && newy < screen->__virtscr->maxy) + screen->__virtscr->cury = newy; + if (begx <= dwin->curx && dwin->curx < maxx + && 0 <= newx && newx < screen->__virtscr->maxx) + screen->__virtscr->curx = newx; /* Copy the window flags from "win" to "__virtscr" */ if (dwin->flags & __CLEAROK) {
CVS commit: src/lib/libcurses
Module Name:src Committed By: uwe Date: Sun Jan 6 03:59:17 UTC 2019 Modified Files: src/lib/libcurses: refresh.c Log Message: _wnoutrefresh - fix current position checks for pads maxy is an absolute value and should not be adjusted for begy when we check also absolute cury. Note that this change does not affect calculations for normal windows as for them we always pass zero for begy. Ditto for x. To generate a diff of this commit: cvs rdiff -u -r1.103 -r1.104 src/lib/libcurses/refresh.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/libcurses/refresh.c diff -u src/lib/libcurses/refresh.c:1.103 src/lib/libcurses/refresh.c:1.104 --- src/lib/libcurses/refresh.c:1.103 Sun Jan 6 03:46:11 2019 +++ src/lib/libcurses/refresh.c Sun Jan 6 03:59:17 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: refresh.c,v 1.103 2019/01/06 03:46:11 uwe Exp $ */ +/* $NetBSD: refresh.c,v 1.104 2019/01/06 03:59:17 uwe Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)refresh.c 8.7 (Berkeley) 8/13/94"; #else -__RCSID("$NetBSD: refresh.c,v 1.103 2019/01/06 03:46:11 uwe Exp $"); +__RCSID("$NetBSD: refresh.c,v 1.104 2019/01/06 03:59:17 uwe Exp $"); #endif #endif/* not lint */ @@ -218,10 +218,10 @@ _wnoutrefresh(WINDOW *win, int begy, int /* Check that cursor position on "win" is valid for "__virtscr" */ if (dwin->cury + wbegy - begy < screen->__virtscr->maxy && - dwin->cury + wbegy - begy >= 0 && dwin->cury < maxy - begy) + dwin->cury + wbegy - begy >= 0 && dwin->cury < maxy) screen->__virtscr->cury = dwin->cury + wbegy - begy; if (dwin->curx + wbegx - begx < screen->__virtscr->maxx && - dwin->curx + wbegx - begx >= 0 && dwin->curx < maxx - begx) + dwin->curx + wbegx - begx >= 0 && dwin->curx < maxx) screen->__virtscr->curx = dwin->curx + wbegx - begx; /* Copy the window flags from "win" to "__virtscr" */
CVS commit: src/lib/libcurses
Module Name:src Committed By: uwe Date: Sun Jan 6 03:46:11 UTC 2019 Modified Files: src/lib/libcurses: refresh.c Log Message: prefresh - fix current position calculations The code was copy-pasted from wrefresh(), but for pads we need to adjust for (pbegy, pbegx). PR lib/53801 To generate a diff of this commit: cvs rdiff -u -r1.102 -r1.103 src/lib/libcurses/refresh.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/libcurses/refresh.c diff -u src/lib/libcurses/refresh.c:1.102 src/lib/libcurses/refresh.c:1.103 --- src/lib/libcurses/refresh.c:1.102 Fri Nov 30 04:38:14 2018 +++ src/lib/libcurses/refresh.c Sun Jan 6 03:46:11 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: refresh.c,v 1.102 2018/11/30 04:38:14 roy Exp $ */ +/* $NetBSD: refresh.c,v 1.103 2019/01/06 03:46:11 uwe Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)refresh.c 8.7 (Berkeley) 8/13/94"; #else -__RCSID("$NetBSD: refresh.c,v 1.102 2018/11/30 04:38:14 roy Exp $"); +__RCSID("$NetBSD: refresh.c,v 1.103 2019/01/06 03:46:11 uwe Exp $"); #endif #endif/* not lint */ @@ -498,8 +498,8 @@ prefresh(WINDOW *pad, int pbegy, int pbe if (retval == OK) { retval = doupdate(); if (!(pad->flags & __LEAVEOK)) { - pad->cury = max(0, curscr->cury - pad->begy); - pad->curx = max(0, curscr->curx - pad->begx); + pad->cury = max(0, pbegy + (curscr->cury - sbegy)); + pad->curx = max(0, pbegx + (curscr->curx - sbegx)); } } return retval;
CVS commit: src/bin/csh
Module Name:src Committed By: christos Date: Sun Jan 6 01:22:50 UTC 2019 Modified Files: src/bin/csh: func.c Log Message: PR/53837: Michael Scholz: src/bin/csh/func.c from current has a superfluous fprintf To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/bin/csh/func.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/csh/func.c diff -u src/bin/csh/func.c:1.42 src/bin/csh/func.c:1.43 --- src/bin/csh/func.c:1.42 Sat Jan 5 11:54:00 2019 +++ src/bin/csh/func.c Sat Jan 5 20:22:50 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: func.c,v 1.42 2019/01/05 16:54:00 christos Exp $ */ +/* $NetBSD: func.c,v 1.43 2019/01/06 01:22:50 christos Exp $ */ /*- * Copyright (c) 1980, 1991, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)func.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: func.c,v 1.42 2019/01/05 16:54:00 christos Exp $"); +__RCSID("$NetBSD: func.c,v 1.43 2019/01/06 01:22:50 christos Exp $"); #endif #endif /* not lint */ @@ -619,7 +619,6 @@ search(int type, int level, Char *goal) if (lastchr(aword) == ':') aword[Strlen(aword) - 1] = 0; cp = strip(Dfix1(aword)); - fprintf(cshout, "%s\n", short2str(cp)); if (Gmatch(goal, cp)) level = -1; free(cp);
CVS commit: src/sys/dev/usb
Module Name:src Committed By: rin Date: Sun Jan 6 00:39:05 UTC 2019 Modified Files: src/sys/dev/usb: if_axe.c Log Message: Fix kernel panic on arm reported by @furandon_pig on Twitter. Hardware header is 2-byte aligned in RX buffer, not 4-byte. For some architectures, __builtin_memcpy() of GCC 6 attempts to copy 4-byte header at once, which results in alignment error. To generate a diff of this commit: cvs rdiff -u -r1.93 -r1.94 src/sys/dev/usb/if_axe.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/usb/if_axe.c diff -u src/sys/dev/usb/if_axe.c:1.93 src/sys/dev/usb/if_axe.c:1.94 --- src/sys/dev/usb/if_axe.c:1.93 Wed Sep 12 21:57:18 2018 +++ src/sys/dev/usb/if_axe.c Sun Jan 6 00:39:05 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_axe.c,v 1.93 2018/09/12 21:57:18 christos Exp $ */ +/* $NetBSD: if_axe.c,v 1.94 2019/01/06 00:39:05 rin Exp $ */ /* $OpenBSD: if_axe.c,v 1.137 2016/04/13 11:03:37 mpi Exp $ */ /* @@ -87,7 +87,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.93 2018/09/12 21:57:18 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.94 2019/01/06 00:39:05 rin Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -1271,7 +1271,18 @@ axe_rxeof(struct usbd_xfer *xfer, void * goto done; } +#if !defined(__NO_STRICT_ALIGNMENT) && __GNUC_PREREQ__(6, 1) + /* + * XXX hdr is 2-byte aligned in buf, not 4-byte. + * For some architectures, __builtin_memcpy() of + * GCC 6 attempts to copy sizeof(hdr) = 4 bytes + * at onece, which results in alignment error. + */ + hdr.len = *(uint16_t *)buf; + hdr.ilen = *(uint16_t *)(buf + sizeof(uint16_t)); +#else memcpy(&hdr, buf, sizeof(hdr)); +#endif DPRINTFN(20, "total_len %#jx len %jx ilen %#jx", total_len,
CVS commit: src/external/bsd/tmux/dist
Module Name:src Committed By: christos Date: Sun Jan 6 00:31:35 UTC 2019 Modified Files: src/external/bsd/tmux/dist: window-tree.c Log Message: don't cast pointers poorly. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/bsd/tmux/dist/window-tree.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/window-tree.c diff -u src/external/bsd/tmux/dist/window-tree.c:1.3 src/external/bsd/tmux/dist/window-tree.c:1.4 --- src/external/bsd/tmux/dist/window-tree.c:1.3 Sat Jan 5 16:44:40 2019 +++ src/external/bsd/tmux/dist/window-tree.c Sat Jan 5 19:31:35 2019 @@ -454,9 +454,9 @@ window_tree_build(void *modedata, u_int break; case WINDOW_TREE_PANE: if (window_count_panes(data->fs.wl->window) == 1) - *tag = (uint64_t)data->fs.wl; + *tag = (uintptr_t)data->fs.wl; else - *tag = (uint64_t)data->fs.wp; + *tag = (uintptr_t)data->fs.wp; break; } } @@ -1100,7 +1100,7 @@ window_tree_mouse(struct window_tree_mod loop++; } if (wl != NULL) - mode_tree_set_current(data->data, (uint64_t)wl); + mode_tree_set_current(data->data, (uintptr_t)wl); return ('\r'); } if (item->type == WINDOW_TREE_WINDOW) { @@ -1114,7 +1114,7 @@ window_tree_mouse(struct window_tree_mod loop++; } if (wp != NULL) - mode_tree_set_current(data->data, (uint64_t)wp); + mode_tree_set_current(data->data, (uintptr_t)wp); return ('\r'); } return (KEYC_NONE);
CVS commit: src/sys/external/bsd/drm2/linux
Module Name:src Committed By: tnn Date: Sat Jan 5 22:24:24 UTC 2019 Modified Files: src/sys/external/bsd/drm2/linux: linux_fence.c Log Message: fence_referenced_p(): mark as __diagused To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/external/bsd/drm2/linux/linux_fence.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/external/bsd/drm2/linux/linux_fence.c diff -u src/sys/external/bsd/drm2/linux/linux_fence.c:1.13 src/sys/external/bsd/drm2/linux/linux_fence.c:1.14 --- src/sys/external/bsd/drm2/linux/linux_fence.c:1.13 Sat Sep 1 22:28:04 2018 +++ src/sys/external/bsd/drm2/linux/linux_fence.c Sat Jan 5 22:24:24 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_fence.c,v 1.13 2018/09/01 22:28:04 riastradh Exp $ */ +/* $NetBSD: linux_fence.c,v 1.14 2019/01/05 22:24:24 tnn Exp $ */ /*- * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_fence.c,v 1.13 2018/09/01 22:28:04 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_fence.c,v 1.14 2019/01/05 22:24:24 tnn Exp $"); #include #include @@ -58,7 +58,7 @@ int linux_fence_trace = 0; * True if fence has a positive reference count. True after * fence_init; after the last fence_put, this becomes false. */ -static inline bool +static inline bool __diagused fence_referenced_p(struct fence *fence) {
CVS commit: src/sys/arch/amd64/stand/prekern
Module Name:src Committed By: maxv Date: Sat Jan 5 22:11:07 UTC 2019 Modified Files: src/sys/arch/amd64/stand/prekern: elf.c Log Message: Apply amd64/kobj_machdep.c::rev1.7 to the prekern too, to fix the relocation with updated binutils. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/amd64/stand/prekern/elf.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/amd64/stand/prekern/elf.c diff -u src/sys/arch/amd64/stand/prekern/elf.c:1.17 src/sys/arch/amd64/stand/prekern/elf.c:1.18 --- src/sys/arch/amd64/stand/prekern/elf.c:1.17 Tue Nov 21 07:56:05 2017 +++ src/sys/arch/amd64/stand/prekern/elf.c Sat Jan 5 22:11:07 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: elf.c,v 1.17 2017/11/21 07:56:05 maxv Exp $ */ +/* $NetBSD: elf.c,v 1.18 2019/01/05 22:11:07 maxv Exp $ */ /* * Copyright (c) 2017 The NetBSD Foundation, Inc. All rights reserved. @@ -196,6 +196,7 @@ elf_apply_reloc(uintptr_t relocbase, con break; case R_X86_64_PC32: /* S + A - P */ + case R_X86_64_PLT32: addr = elf_sym_lookup(symidx); where32 = (Elf32_Addr *)where; val32 = (Elf32_Addr)(addr + addend - (Elf64_Addr)where);
CVS commit: src/doc
Module Name:src Committed By: christos Date: Sat Jan 5 21:49:45 UTC 2019 Modified Files: src/doc: CHANGES Log Message: new tmux To generate a diff of this commit: cvs rdiff -u -r1.2483 -r1.2484 src/doc/CHANGES 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 diff -u src/doc/CHANGES:1.2483 src/doc/CHANGES:1.2484 --- src/doc/CHANGES:1.2483 Sat Jan 5 15:42:09 2019 +++ src/doc/CHANGES Sat Jan 5 16:49:45 2019 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2483 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2484 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -287,3 +287,4 @@ Changes from NetBSD 8.0 to NetBSD 9.0: [christos 20190103] wpa: Import wpa_supplicant and hostapd 2.7. [christos 20190104] acpi(4): Updated ACPICA to 20181213. [christos 20180104] + tmux(1): Imported 2.8. [christos 20190104]
CVS commit: src/doc
Module Name:src Committed By: christos Date: Sat Jan 5 21:49:11 UTC 2019 Modified Files: src/doc: 3RDPARTY Log Message: update tmux and other things that have moved. To generate a diff of this commit: cvs rdiff -u -r1.1586 -r1.1587 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1586 src/doc/3RDPARTY:1.1587 --- src/doc/3RDPARTY:1.1586 Sat Jan 5 15:42:09 2019 +++ src/doc/3RDPARTY Sat Jan 5 16:49:10 2019 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1586 2019/01/05 20:42:09 christos Exp $ +# $NetBSD: 3RDPARTY,v 1.1587 2019/01/05 21:49:10 christos Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -928,7 +928,7 @@ Package: nawk Version: 2012-12-20 Current Vers: 2012-12-20 Maintainer: Brian Kernighan -Archive Site: http://www.cs.princeton.edu/~bwk/btl.mirror/ +Archive Site: https://github.com/onetrueawk/awk Home Page: http://www.cs.princeton.edu/~bwk/btl.mirror/ Mailing List: Responsible: jdolecek @@ -1224,8 +1224,8 @@ Notes: Old versions are available from Purdue (ftp.cs.purdue.edu:/pub/RCS). Package: root.cache -Version: 2017102400 (October 24, 2017) -Current Vers: 2018070901 (July 09, 2018) +Version: 2018111402 (November 14, 2018) +Current Vers: 2018070901 (November 14, 2018) Maintainer: InterNIC Archive Site: ftp://ftp.internic.net/domain/named.root Home Page: ftp://ftp.internic.net/domain/named.root @@ -1241,8 +1241,8 @@ Package: routed Version: 2.32 Current Vers: 2.32 Maintainer: Vernon Schryver -Archive Site: ftp://ftp.rhyolite.com/src/ -Home Page: http://www.rhyolite.com/src/ +Archive Site: gone +Home Page: gone Mailing List: Responsible: christos License: BSD (4-clause) @@ -1372,8 +1372,8 @@ perhaps this implementation should be ke purposes. Package: tmux -Version: 2.6 -Current Vers: 2.7 +Version: 2.8 +Current Vers: 2.8 Maintainer: Nicholas Marriott Archive site: https://github.com/tmux/tmux Home page: http://tmux.github.io
CVS commit: src/etc/namedb
Module Name:src Committed By: christos Date: Sat Jan 5 21:47:41 UTC 2019 Modified Files: src/etc/namedb: root.cache Log Message: sync with most recent (no changes) To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/etc/namedb/root.cache Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/namedb/root.cache diff -u src/etc/namedb/root.cache:1.23 src/etc/namedb/root.cache:1.24 --- src/etc/namedb/root.cache:1.23 Wed Oct 25 03:41:35 2017 +++ src/etc/namedb/root.cache Sat Jan 5 16:47:40 2019 @@ -1,17 +1,17 @@ -; $NetBSD: root.cache,v 1.23 2017/10/25 07:41:35 taca Exp $ +; $NetBSD: root.cache,v 1.24 2019/01/05 21:47:40 christos Exp $ ; This file holds the information on root name servers needed to ; initialize cache of Internet domain name servers ; (e.g. reference this file in the "cache . " ; configuration file of BIND domain name servers). ; -; This file is made available by InterNIC +; This file is made available by InterNIC ; under anonymous FTP as ; file/domain/named.cache ; on server FTP.INTERNIC.NET ; -OR-RS.INTERNIC.NET ; -; last update:October 24, 2017 -; related version of root zone: 2017102400 +; last update: November 14, 2018 +; related version of root zone: 2018111402 ; ; FORMERLY NS.INTERNIC.NET ;
CVS import: src/external/bsd/tmux/dist
Module Name:src Committed By: christos Date: Sat Jan 5 21:32:50 UTC 2019 Update of /cvsroot/src/external/bsd/tmux/dist In directory ivanova.netbsd.org:/tmp/cvs-serv17813 Log Message: CHANGES FROM 2.7 to 2.8 * Make display-panes block the client until a pane is chosen or it times out. * Clear history on RIS like most other terminals do. * Add an "Any" key to run a command if a key is pressed that is not bound in the current key table. * Expand formats in load-buffer and save-buffer. * Add a rectangle_toggle format. * Add set-hook -R to run a hook immediately. * Add README.ja. * Add pane focus hooks. * Allow any punctuation as separator for s/x/y not only /. * Improve resizing with the mouse (fix resizing the wrong pane in some layouts, and allow resizing multiple panes at the same time). * Allow , and } to be escaped in formats as #, and #}. * Add KRB5CCNAME to update-environment. * Change meaning of -c to display-message so the client is used if it matches the session given to -t. * Fixes to : form of SGR. * Add x and X to choose-tree to kill sessions, windows or panes. CHANGES FROM 2.6 TO 2.7 * Remove EVENT_* variables from environment on platforms where tmux uses them so they do not pass on to panes. * Fixes for hooks at server exit. * Remove SGR 10 (was equivalent to SGR 0 but no other terminal seems to do this). * Expand formats in window and session names. * Add -Z flag to choose-tree, choose-client, choose-buffer to automatically zoom the pane when the mode is entered and unzoom when it exits, assuming the pane is not already zoomed. This is now part of the default key bindings. * Add C-g to exit modes with emacs keys. * Add exit-empty option to exit server if no sessions (defaults to on). * Show if a filter is present in choose modes. * Add pipe-pane -I to to connect stdin of the child process. * Performance improvements for reflow. * Use RGB terminfo(5) capability to detect RGB colour terminals (the existing Tc extension remains unchanged). * Support for ISO colon-separated SGR sequences. * Add select-layout -E to spread panes out evenly (bound to E key). * Support wide characters properly when reflowing. * Pass PWD to new panes as a hint to shells, as well as calling chdir(). * Performance improvements for the various choose modes. * Only show first member of session groups in tree mode (-G flag to choose-tree to show all). * Support %else in config files to match %if; from Brad Town in GitHub issue 1071. * Fix "kind" terminfo(5) capability to be S-Down not S-Up. * Add a box around the preview label in tree mode. * Show exit status and time in the remain-on-exit pane text; from Timo Boettcher in GitHub issue 1103. * Correctly use pane-base-index in tree mode. * Change the allow-rename option default to off. * Support for xterm(1) title stack escape sequences (GitHub issue 1075 from Brad Town). * Correctly remove padding cells to fix a UTF-8 display problem (GitHub issue 1090). Status: Vendor Tag: TMUX Release Tags: tmux-2-8 U src/external/bsd/tmux/dist/cmd-bind-key.c U src/external/bsd/tmux/dist/Makefile.am U src/external/bsd/tmux/dist/configure U src/external/bsd/tmux/dist/configure.ac U src/external/bsd/tmux/dist/aclocal.m4 U src/external/bsd/tmux/dist/Makefile.in U src/external/bsd/tmux/dist/COPYING U src/external/bsd/tmux/dist/README U src/external/bsd/tmux/dist/TODO U src/external/bsd/tmux/dist/alerts.c U src/external/bsd/tmux/dist/arguments.c U src/external/bsd/tmux/dist/attributes.c U src/external/bsd/tmux/dist/cfg.c C src/external/bsd/tmux/dist/client.c C src/external/bsd/tmux/dist/cmd-display-message.c C src/external/bsd/tmux/dist/cmd-attach-session.c U src/external/bsd/tmux/dist/cmd-break-pane.c U src/external/bsd/tmux/dist/cmd-capture-pane.c U src/external/bsd/tmux/dist/cmd-choose-tree.c U src/external/bsd/tmux/dist/cmd-command-prompt.c U src/external/bsd/tmux/dist/cmd-confirm-before.c U src/external/bsd/tmux/dist/cmd-copy-mode.c U src/external/bsd/tmux/dist/cmd-detach-client.c U src/external/bsd/tmux/dist/cmd-set-environment.c U src/external/bsd/tmux/dist/cmd-display-panes.c U src/external/bsd/tmux/dist/cmd-find-window.c U src/external/bsd/tmux/dist/cmd-find.c C src/external/bsd/tmux/dist/cmd-if-shell.c U src/external/bsd/tmux/dist/cmd-join-pane.c U src/external/bsd/tmux/dist/cmd-kill-pane.c U src/external/bsd/tmux/dist/cmd-kill-server.c U src/external/bsd/tmux/dist/cmd-kill-session.c U src/external/bsd/tmux/dist/cmd-kill-window.c U src/external/bsd/tmux/dist/cmd-list-buffers.c U src/external/bsd/tmux/dist/cmd-list-clients.c U src/external/bsd/tmux/dist/cmd-list-keys.c U src/external/bsd/tmux/dist/cmd-list-panes.c U src/external/bsd/tmux/dist/cmd-list-sessions.c U src/external/bsd/tmux/dist/cmd-list.c U src/external/bsd/tmux/dist/cmd-list-windows.c C src/external/bsd/tmux/dist/cmd-load-buffer.c U src/external/bsd/tmux/dist/cmd-lock-server.c U src/external/bsd/tmux/dist/cmd-m
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: christos Date: Sat Jan 5 20:40:26 UTC 2019 Modified Files: src/sys/dev/acpi: acpi_debug.c Log Message: add normal debug level To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/dev/acpi/acpi_debug.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/acpi/acpi_debug.c diff -u src/sys/dev/acpi/acpi_debug.c:1.5 src/sys/dev/acpi/acpi_debug.c:1.6 --- src/sys/dev/acpi/acpi_debug.c:1.5 Tue Feb 25 13:30:09 2014 +++ src/sys/dev/acpi/acpi_debug.c Sat Jan 5 15:40:26 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_debug.c,v 1.5 2014/02/25 18:30:09 pooka Exp $ */ +/* $NetBSD: acpi_debug.c,v 1.6 2019/01/05 20:40:26 christos Exp $ */ /*- * Copyright (c) 2010 Jukka Ruohonen @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi_debug.c,v 1.5 2014/02/25 18:30:09 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_debug.c,v 1.6 2019/01/05 20:40:26 christos Exp $"); #include #include @@ -219,6 +219,8 @@ acpi_debug_create(void) ACPI_DEBUG_ADD(acpi_debug_level_d, ACPI_LV_EVENTS); ACPI_DEBUG_ADD(acpi_debug_level_d, ACPI_LV_VERBOSE); + ACPI_DEBUG_ADD(acpi_debug_level_d, ACPI_NORMAL_DEFAULT); + /* * The default debug level. */
CVS commit: src/doc
Module Name:src Committed By: christos Date: Sat Jan 5 20:42:09 UTC 2019 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: new acpica To generate a diff of this commit: cvs rdiff -u -r1.1585 -r1.1586 src/doc/3RDPARTY cvs rdiff -u -r1.2482 -r1.2483 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1585 src/doc/3RDPARTY:1.1586 --- src/doc/3RDPARTY:1.1585 Fri Jan 4 16:23:30 2019 +++ src/doc/3RDPARTY Sat Jan 5 15:42:09 2019 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1585 2019/01/04 21:23:30 christos Exp $ +# $NetBSD: 3RDPARTY,v 1.1586 2019/01/05 20:42:09 christos Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -40,8 +40,8 @@ # Package: acpica -Version: 20180810 -Current Vers: 20180810 +Version: 20181213 +Current Vers: 20181213 Maintainer: Intel Archive Site: http://www.acpica.org/downloads/ Home Page: http://www.acpica.org/ Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2482 src/doc/CHANGES:1.2483 --- src/doc/CHANGES:1.2482 Fri Jan 4 16:27:04 2019 +++ src/doc/CHANGES Sat Jan 5 15:42:09 2019 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2482 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2483 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -286,3 +286,4 @@ Changes from NetBSD 8.0 to NetBSD 9.0: services(5), protocols(5): Pull iana-generated services and protocols [christos 20190103] wpa: Import wpa_supplicant and hostapd 2.7. [christos 20190104] + acpi(4): Updated ACPICA to 20181213. [christos 20180104]
CVS commit: src/sys/external/bsd/acpica/conf
Module Name:src Committed By: christos Date: Sat Jan 5 20:40:05 UTC 2019 Modified Files: src/sys/external/bsd/acpica/conf: files.acpica Log Message: new file To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/external/bsd/acpica/conf/files.acpica Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/acpica/conf/files.acpica diff -u src/sys/external/bsd/acpica/conf/files.acpica:1.16 src/sys/external/bsd/acpica/conf/files.acpica:1.17 --- src/sys/external/bsd/acpica/conf/files.acpica:1.16 Fri Sep 15 13:10:30 2017 +++ src/sys/external/bsd/acpica/conf/files.acpica Sat Jan 5 15:40:05 2019 @@ -1,4 +1,4 @@ -# $NetBSD: files.acpica,v 1.16 2017/09/15 17:10:30 christos Exp $ +# $NetBSD: files.acpica,v 1.17 2019/01/05 20:40:05 christos Exp $ define acpica makeoptions acpi CPPFLAGS+="-I$S/external/bsd/acpica/dist/include" @@ -93,6 +93,7 @@ file executer/exregion.c acpica file executer/exresnte.c acpica file executer/exresolv.c acpica file executer/exresop.c acpica +file executer/exserial.c acpica file executer/exstore.c acpica file executer/exstoren.c acpica file executer/exstorob.c acpica
CVS import: src/sys/external/bsd/acpica/dist
Module Name:src Committed By: christos Date: Sat Jan 5 20:37:24 UTC 2019 Update of /cvsroot/src/sys/external/bsd/acpica/dist In directory ivanova.netbsd.org:/tmp/cvs-serv29658 Log Message: 13 December 2018. Summary of changes for version 20181213: 1) ACPICA Kernel-resident Subsystem: Fixed some buffer length issues with the GenericSerialBus, related to two of the bidirectional protocols: AttribRawProcessBytes and AttribRawBytes, which are rarely seen in the field. For these, the LEN field of the ASL buffer is now ignored. Hans de Goede Implemented a new object evaluation trace mechanism for control methods and data objects. This includes nested control methods. It is particularly useful for examining the ACPI execution during system initialization since the output is relatively terse. The flag below enables the output of the trace via the ACPI_DEBUG_PRINT_RAW interface: #define ACPI_LV_EVALUATION 0x0008 Examples: Enter evaluation : _SB.PCI0._INI (Method) Exit evaluation: _SB.PCI0._INI Enter evaluation : _OSI (Method) Exit evaluation: _OSI Enter evaluation : _SB.PCI0.TEST (Method) Nested method call : _SB.PCI0.NST1 Exit nested method : _SB.PCI0.NST1 Exit evaluation: _SB.PCI0.TEST Added two recently-defined _OSI strings. See https://docs.microsoft.com/en-us/windows-hardware/drivers/acpi/winacpi- osi. "Windows 2018" "Windows 2018.2" Update for buffer-to-string conversions via the ToHexString ASL operator. A "0x" is now prepended to each of the hex values in the output string. This provides compatibility with other ACPI implementations. The ACPI specification is somewhat vague on this issue. Example output string after conversion: "0x01,0x02,0x03,0x04,0x05,0x06" Return a run-time error for TermArg expressions within individual package elements. Although this is technically supported by the ASL grammar, other ACPI implementations do not support this either. Also, this fixes a fault if this type of construct is ever encountered (it never has been). 2) iASL Compiler/Disassembler and Tools: iASL: Implemented a new compile option (-ww) that will promote individual warnings and remarks to errors. This is intended to enhance the firmware build process. AcpiExec: Implemented a new command-line option (-eo) to support the new object evaluation trace mechanism described above. Disassembler: Added support to disassemble OEMx tables as AML/ASL tables instead of a "unknown table" message. AcpiHelp: Improved support for the "special" predefined names such as _Lxx, _Exx, _EJx, _T_x, etc. For these, any legal hex value can now be used for "xx" and "x". 31 October 2018. Summary of changes for version 20181031: An Operation Region regression was fixed by properly adding address ranges to a global list during initialization. This allows OS to accurately check for overlapping regions between native devices (such as PCI) and Operation regions as well as checking for region conflicts between two Operation Regions. Added support for the 2-byte extended opcodes in the code/feature that attempts to continue parsing during the table load phase. Skip parsing Device declarations (and other extended opcodes) when an error occurs during parsing. Previously, only single-byte opcodes were supported. Cleanup: Simplified the module-level code support by eliminating a useless global variable (AcpiGbl_GroupModuleLeveCode). 2) iASL Compiler/Disassembler and Tools: iASL/Preprocessor: Fixed a regression where an incorrect use of ACPI_FREE could cause a fault in the preprocessor. This was an inadvertent side- effect from moving more allocations/frees to the local cache/memory mechanism. iASL: Enhanced error detection by validating that all NameSeg elements within a NamePatch actually exist. The previous behavior was spotty at best, and such errors could be improperly ignored at compiler time (never at runtime, however. There are two new error messages, as shown in the examples below: dsdt.asl 33: CreateByteField (.BXXX, 1, CBF1) Error6161 - ^ One or more objects within the Pathname do not exist (.BXXX) dsdt.asl 34: CreateByteField (BUF1, .INT1, .CBF1) Error6160 -One or more prefix Scopes do not exist ^ (.CBF1) iASL: Disassembler/table-compiler: Added support for the static data table TPM2 revision 3 (an older version of TPM2). The support has been added for the compiler and the disassembler. Fixed compilation of DOS format data table file on Unix/Linux systems. iASL now properly detects line continuations (\) for DOS format data table definition language files on when executing on Unix/Linux. 03 October 2018. Summary of changes for version 20181003: 2) iASL Compiler/Disassembler and Tools:
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: christos Date: Sat Jan 5 20:32:02 UTC 2019 Modified Files: src/sys/arch/x86/x86: procfs_machdep.c Log Message: Comment out rcr0 use until the weak symbol mess is undone. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/x86/x86/procfs_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/x86/procfs_machdep.c diff -u src/sys/arch/x86/x86/procfs_machdep.c:1.25 src/sys/arch/x86/x86/procfs_machdep.c:1.26 --- src/sys/arch/x86/x86/procfs_machdep.c:1.25 Wed Nov 14 23:53:54 2018 +++ src/sys/arch/x86/x86/procfs_machdep.c Sat Jan 5 15:32:02 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: procfs_machdep.c,v 1.25 2018/11/15 04:53:54 msaitoh Exp $ */ +/* $NetBSD: procfs_machdep.c,v 1.26 2019/01/05 20:32:02 christos Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.25 2018/11/15 04:53:54 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.26 2019/01/05 20:32:02 christos Exp $"); #include #include @@ -447,7 +447,12 @@ procfs_getonecpu(int xcpu, struct cpu_in i386_fpu_fdivbug ? "yes" : "no", /* an old pentium */ #endif ci->ci_max_cpuid, +#ifdef notyet + // XXX: Fixme Weak symbols are not supported in modules (rcr0() & CR0_WP) ? "yes" : "no", +#else + "no", +#endif featurebuf, ci->ci_cflush_lsize );
CVS commit: src/sys/kern
Module Name:src Committed By: mlelstv Date: Sat Jan 5 18:03:41 UTC 2019 Modified Files: src/sys/kern: kern_subr.c Log Message: Restore code to create md0, this fixes booting an INSTALL kernel. To generate a diff of this commit: cvs rdiff -u -r1.221 -r1.222 src/sys/kern/kern_subr.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_subr.c diff -u src/sys/kern/kern_subr.c:1.221 src/sys/kern/kern_subr.c:1.222 --- src/sys/kern/kern_subr.c:1.221 Sat Jan 5 09:39:56 2019 +++ src/sys/kern/kern_subr.c Sat Jan 5 18:03:41 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_subr.c,v 1.221 2019/01/05 09:39:56 mlelstv Exp $ */ +/* $NetBSD: kern_subr.c,v 1.222 2019/01/05 18:03:41 mlelstv Exp $ */ /*- * Copyright (c) 1997, 1998, 1999, 2002, 2007, 2008 The NetBSD Foundation, Inc. @@ -79,7 +79,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_subr.c,v 1.221 2019/01/05 09:39:56 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_subr.c,v 1.222 2019/01/05 18:03:41 mlelstv Exp $"); #include "opt_ddb.h" #include "opt_md.h" @@ -112,6 +112,7 @@ static device_t parsedisk(char *, int, i static const char *getwedgename(const char *, int); static void setroot_nfs(device_t); +static void setroot_md(device_t *); static void setroot_ask(device_t, int); static void setroot_root(device_t, int); static void setroot_dump(device_t, device_t); @@ -193,7 +194,7 @@ setroot(device_t bootdv, int bootpartiti * force boot device to md0 */ if (md_is_root) - rootspec = "md0"; + setroot_md(&bootdv); #ifdef TFTPROOT /* @@ -203,10 +204,10 @@ setroot(device_t bootdv, int bootpartiti * reuses NFS init code to set up network * fetch image into ram disk * - * if successful, we change rootspec + * if successful, we change boot device */ if (tftproot_dhcpboot(bootdv) == 0) - rootspec = "md0"; + setroot_md(&bootdv); #endif /* @@ -280,6 +281,25 @@ setroot_nfs(device_t dv) vfs_delref(vops); } +/* + * Change boot device to md0 + * + * md0 only exists when it is opened once. + */ +static void +setroot_md(device_t *dvp) +{ + int md_major; + dev_t md_dev; + + md_major = devsw_name2blk("md", NULL, 0); + if (md_major >= 0) { + md_dev = MAKEDISKDEV(md_major, 0, RAW_PART); + if (bdev_open(md_dev, FREAD, S_IFBLK, curlwp) == 0) + *dvp = device_find_by_xname("md0"); + } +} + static void setroot_ask(device_t bootdv, int bootpartition) {
CVS commit: src/bin/csh
Module Name:src Committed By: christos Date: Sat Jan 5 16:56:25 UTC 2019 Modified Files: src/bin/csh: glob.c Log Message: put back x in xrealloc To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/bin/csh/glob.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/csh/glob.c diff -u src/bin/csh/glob.c:1.30 src/bin/csh/glob.c:1.31 --- src/bin/csh/glob.c:1.30 Sat Jan 5 11:54:00 2019 +++ src/bin/csh/glob.c Sat Jan 5 11:56:25 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: glob.c,v 1.30 2019/01/05 16:54:00 christos Exp $ */ +/* $NetBSD: glob.c,v 1.31 2019/01/05 16:56:25 christos Exp $ */ /*- * Copyright (c) 1980, 1991, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)glob.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: glob.c,v 1.30 2019/01/05 16:54:00 christos Exp $"); +__RCSID("$NetBSD: glob.c,v 1.31 2019/01/05 16:56:25 christos Exp $"); #endif #endif /* not lint */ @@ -197,7 +197,7 @@ globbrace(Char *s, Char *p, Char ***bl) pl = pm + 1; if (vl == &nv[size]) { size += GLOBSPACE; - nv = realloc(nv, (size_t)size * sizeof(Char *)); + nv = xrealloc(nv, (size_t)size * sizeof(Char *)); vl = &nv[size - GLOBSPACE]; } }
CVS commit: src/bin/csh
Module Name:src Committed By: christos Date: Sat Jan 5 16:54:00 UTC 2019 Modified Files: src/bin/csh: alloc.c csh.c csh.h dir.c dol.c err.c exec.c exp.c extern.h file.c func.c glob.c hist.c lex.c misc.c parse.c proc.c sem.c set.c str.c Log Message: Welcome to the 21th century csh: retire "ptr_t" now that we have "void *" To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/bin/csh/alloc.c cvs rdiff -u -r1.47 -r1.48 src/bin/csh/csh.c cvs rdiff -u -r1.27 -r1.28 src/bin/csh/csh.h cvs rdiff -u -r1.31 -r1.32 src/bin/csh/dir.c src/bin/csh/file.c cvs rdiff -u -r1.30 -r1.31 src/bin/csh/dol.c src/bin/csh/extern.h \ src/bin/csh/sem.c cvs rdiff -u -r1.22 -r1.23 src/bin/csh/err.c cvs rdiff -u -r1.32 -r1.33 src/bin/csh/exec.c src/bin/csh/lex.c cvs rdiff -u -r1.21 -r1.22 src/bin/csh/exp.c src/bin/csh/hist.c \ src/bin/csh/misc.c cvs rdiff -u -r1.41 -r1.42 src/bin/csh/func.c cvs rdiff -u -r1.29 -r1.30 src/bin/csh/glob.c cvs rdiff -u -r1.18 -r1.19 src/bin/csh/parse.c cvs rdiff -u -r1.37 -r1.38 src/bin/csh/proc.c cvs rdiff -u -r1.34 -r1.35 src/bin/csh/set.c cvs rdiff -u -r1.15 -r1.16 src/bin/csh/str.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/csh/alloc.c diff -u src/bin/csh/alloc.c:1.14 src/bin/csh/alloc.c:1.15 --- src/bin/csh/alloc.c:1.14 Sat Jan 5 05:51:06 2019 +++ src/bin/csh/alloc.c Sat Jan 5 11:54:00 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: alloc.c,v 1.14 2019/01/05 10:51:06 maya Exp $ */ +/* $NetBSD: alloc.c,v 1.15 2019/01/05 16:54:00 christos Exp $ */ /*- * Copyright (c) 1983, 1991, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)alloc.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: alloc.c,v 1.14 2019/01/05 10:51:06 maya Exp $"); +__RCSID("$NetBSD: alloc.c,v 1.15 2019/01/05 16:54:00 christos Exp $"); #endif #endif /* not lint */ @@ -47,36 +47,36 @@ __RCSID("$NetBSD: alloc.c,v 1.14 2019/01 #include "csh.h" #include "extern.h" -ptr_t +void * Malloc(size_t n) { -ptr_t ptr; +void *ptr; -if ((ptr = malloc(n)) == (ptr_t) 0) { +if ((ptr = malloc(n)) == NULL) { child++; stderror(ERR_NOMEM); } return (ptr); } -ptr_t -Realloc(ptr_t p, size_t n) +void * +Realloc(void *p, size_t n) { -ptr_t ptr; +void *ptr; -if ((ptr = realloc(p, n)) == (ptr_t) 0) { +if ((ptr = realloc(p, n)) == NULL) { child++; stderror(ERR_NOMEM); } return (ptr); } -ptr_t +void * Calloc(size_t s, size_t n) { -ptr_t ptr; +void *ptr; -if ((ptr = calloc(s, n)) == (ptr_t) 0) { +if ((ptr = calloc(s, n)) == NULL) { child++; stderror(ERR_NOMEM); } Index: src/bin/csh/csh.c diff -u src/bin/csh/csh.c:1.47 src/bin/csh/csh.c:1.48 --- src/bin/csh/csh.c:1.47 Sat Jan 5 05:51:06 2019 +++ src/bin/csh/csh.c Sat Jan 5 11:54:00 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: csh.c,v 1.47 2019/01/05 10:51:06 maya Exp $ */ +/* $NetBSD: csh.c,v 1.48 2019/01/05 16:54:00 christos Exp $ */ /*- * Copyright (c) 1980, 1991, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19 #if 0 static char sccsid[] = "@(#)csh.c 8.2 (Berkeley) 10/12/93"; #else -__RCSID("$NetBSD: csh.c,v 1.47 2019/01/05 10:51:06 maya Exp $"); +__RCSID("$NetBSD: csh.c,v 1.48 2019/01/05 16:54:00 christos Exp $"); #endif #endif /* not lint */ @@ -641,7 +641,7 @@ srccat(Char *cp, Char *dp) ep = Strspl(cp, dp); ptr = short2str(ep); -free((ptr_t) ep); +free(ep); return srcfile(ptr, mflag ? 0 : 1, 0); } @@ -760,8 +760,8 @@ srcunit(int unit, int onlyown, int hflg) /* This code could get run twice but free doesn't care */ /* XXX yes it does */ for (i = 0; i < fblocks; i++) - free((ptr_t) fbuf[i]); - free((ptr_t) fbuf); + free(fbuf[i]); + free(fbuf); /* Reset input arena */ (void)memcpy(&B, &saveB, sizeof(B)); @@ -1062,7 +1062,7 @@ process(int catch) (void)fflush(cshout); } if (seterr) { - free((ptr_t) seterr); + free(seterr); seterr = NULL; } @@ -1146,7 +1146,7 @@ dosource(Char **v, struct command *t) (void)Strcpy(buf, *v); f = globone(buf, G_ERROR); (void)strcpy((char *)buf, short2str(f)); -free((ptr_t) f); +free(f); if (!srcfile((char *)buf, 0, hflg) && !hflg) stderror(ERR_SYSTEM, (char *)buf, strerror(errno)); } Index: src/bin/csh/csh.h diff -u src/bin/csh/csh.h:1.27 src/bin/csh/csh.h:1.28 --- src/bin/csh/csh.h:1.27 Sat Jan 5 05:51:06 2019 +++ src/bin/csh/csh.h Sat Jan 5 11:54:00 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: csh.h,v 1.27 2019/01/05 10:51:06 maya Exp $ */ +/* $NetBSD: csh.h,v 1.28 2019/01/05 16:54:00 christos Exp $ */ /*- * Copyright (c) 1980, 1991, 1993 @@ -80,8 +80,6 @@ typedef char Char; typedef void *ioctl_t; /* Third arg of ioctl */ -typedef void *ptr_t; - #include "const.h" #include "char.h" #include "errnum.h" Index: src/bin/csh/dir.c diff -u src/bin/csh/dir.c:1.31 src/bin/csh/dir.c
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: skrll Date: Sat Jan 5 16:50:22 UTC 2019 Modified Files: src/sys/arch/evbarm/conf: GENERIC Log Message: Add some comments around EARLYCONS To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/evbarm/conf/GENERIC 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/GENERIC diff -u src/sys/arch/evbarm/conf/GENERIC:1.16 src/sys/arch/evbarm/conf/GENERIC:1.17 --- src/sys/arch/evbarm/conf/GENERIC:1.16 Sat Jan 5 13:55:46 2019 +++ src/sys/arch/evbarm/conf/GENERIC Sat Jan 5 16:50:22 2019 @@ -1,5 +1,5 @@ # -# $NetBSD: GENERIC,v 1.16 2019/01/05 13:55:46 aymeric Exp $ +# $NetBSD: GENERIC,v 1.17 2019/01/05 16:50:22 skrll Exp $ # # GENERIC ARM (aarch32) kernel # @@ -209,7 +209,11 @@ pseudo-device openfirm # /dev/openfirm # ODROID-XU lite #options EARLYCONS=exynos, CONSADDR=0x12c2 +# RaspberryPIs +#options EARLYCONS=bcm2835, CONSADDR=0x20201000 +#options EARLYCONS=bcm2836, CONSADDR=0x3f201000 #options EARLYCONS=bcm2837, CONSADDR=0x3f215040 + #options EARLYCONS=cycv, CONSADDR=0xffc02000 #options EARLYCONS=rk3328, CONSADDR=0xff13 #options EARLYCONS=sunxi, CONSADDR=0x01c28000 @@ -217,9 +221,8 @@ pseudo-device openfirm # /dev/openfirm # TEGRA TK1 #options EARLYCONS=tegra, CONSADDR=0x70006300 -# #options EARLYCONS=vexpress, CONSADDR=0x1c09 -#options EARLYCONS=virt +#options EARLYCONS=virt, CONSADDR=0x0900 makeoptions DEBUG="-g" # compile full symbol table makeoptions COPY_SYMTAB=1
CVS commit: src/sys/arch/sparc64/sparc64
Module Name:src Committed By: martin Date: Sat Jan 5 15:46:02 UTC 2019 Modified Files: src/sys/arch/sparc64/sparc64: autoconf.c Log Message: Remove debugging leftover, pointed out by mrg To generate a diff of this commit: cvs rdiff -u -r1.214 -r1.215 src/sys/arch/sparc64/sparc64/autoconf.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/sparc64/autoconf.c diff -u src/sys/arch/sparc64/sparc64/autoconf.c:1.214 src/sys/arch/sparc64/sparc64/autoconf.c:1.215 --- src/sys/arch/sparc64/sparc64/autoconf.c:1.214 Fri Jan 4 16:25:06 2019 +++ src/sys/arch/sparc64/sparc64/autoconf.c Sat Jan 5 15:46:02 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.214 2019/01/04 16:25:06 martin Exp $ */ +/* $NetBSD: autoconf.c,v 1.215 2019/01/05 15:46:02 martin Exp $ */ /* * Copyright (c) 1996 @@ -48,7 +48,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.214 2019/01/04 16:25:06 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.215 2019/01/05 15:46:02 martin Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -905,7 +905,6 @@ openbios_secondary_ata_heuristic(int par " secondary ATA bus, applying workaround target+2\n")); return true; } else if (strcmp(tmp, "ide") == 0) { - regs[0] = 42; if (OF_getprop(parent, "reg", ®s, sizeof(regs)) >= sizeof(regs[0])) { DPRINTF(ACDB_BOOTDEV, ("parent seems to be an OpenBIOS"
CVS commit: src
Module Name:src Committed By: aymeric Date: Sat Jan 5 13:55:46 UTC 2019 Modified Files: src/distrib/utils/embedded/files: armv7_boot.cmd src/sys/arch/evbarm/conf: GENERIC Added Files: src/sys/arch/arm/dts: socfpga_cyclone5_de0_nano_soc.dts Removed Files: src/sys/arch/arm/dts: socfpga_cyclone5_de0_sockit.dts Log Message: Rename the DE0 Nano SoC dts file to its new linux/uboot name To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/distrib/utils/embedded/files/armv7_boot.cmd cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/dts/socfpga_cyclone5_de0_nano_soc.dts cvs rdiff -u -r1.2 -r0 src/sys/arch/arm/dts/socfpga_cyclone5_de0_sockit.dts cvs rdiff -u -r1.15 -r1.16 src/sys/arch/evbarm/conf/GENERIC Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/utils/embedded/files/armv7_boot.cmd diff -u src/distrib/utils/embedded/files/armv7_boot.cmd:1.10 src/distrib/utils/embedded/files/armv7_boot.cmd:1.11 --- src/distrib/utils/embedded/files/armv7_boot.cmd:1.10 Thu Jan 3 18:21:55 2019 +++ src/distrib/utils/embedded/files/armv7_boot.cmd Sat Jan 5 13:55:46 2019 @@ -8,7 +8,6 @@ if test "${board}" = "de0-nano-soc" ; th setenv bootargs 'root=ld0a' setenv mmcpart 0:1 setenv use_fdt 1 - setenv fdtfile socfpga_cyclone5_de0_sockit.dtb fi if test "${soc}" = "exynos" ; then setenv kernel netbsd-GENERIC.ub Index: src/sys/arch/evbarm/conf/GENERIC diff -u src/sys/arch/evbarm/conf/GENERIC:1.15 src/sys/arch/evbarm/conf/GENERIC:1.16 --- src/sys/arch/evbarm/conf/GENERIC:1.15 Thu Jan 3 10:44:04 2019 +++ src/sys/arch/evbarm/conf/GENERIC Sat Jan 5 13:55:46 2019 @@ -1,5 +1,5 @@ # -# $NetBSD: GENERIC,v 1.15 2019/01/03 10:44:04 jmcneill Exp $ +# $NetBSD: GENERIC,v 1.16 2019/01/05 13:55:46 aymeric Exp $ # # GENERIC ARM (aarch32) kernel # @@ -29,7 +29,7 @@ makeoptions DTS=" exynos5422-odroidxu3.dts exynos5422-odroidxu4.dts - socfpga_cyclone5_de0_sockit.dts + socfpga_cyclone5_de0_nano_soc.dts sun4i-a10-a1000.dts sun4i-a10-ba10-tvbox.dts Added files: Index: src/sys/arch/arm/dts/socfpga_cyclone5_de0_nano_soc.dts diff -u /dev/null src/sys/arch/arm/dts/socfpga_cyclone5_de0_nano_soc.dts:1.1 --- /dev/null Sat Jan 5 13:55:46 2019 +++ src/sys/arch/arm/dts/socfpga_cyclone5_de0_nano_soc.dts Sat Jan 5 13:55:46 2019 @@ -0,0 +1,20 @@ + + +#include "../../../external/gpl2/dts/dist/arch/arm/boot/dts/socfpga_cyclone5_de0_sockit.dts" + +/ { + soc { + gtimer@fffec200 { + compatible = "arm,cortex-a9-global-timer"; + reg = <0xfffec200 0x20>; + clocks = <&mpu_periph_clk>; + interrupts = <1 11 0x301>; + }; + usb@ffb4 { + dr_mode = "host"; + }; + watchdog@ffd02000 { + resets = <&rst L4WD0_RESET>; + }; + }; +};
CVS commit: src/bin/csh
Module Name:src Committed By: maya Date: Sat Jan 5 10:51:06 UTC 2019 Modified Files: src/bin/csh: alloc.c csh.c csh.h dir.c dol.c err.c exec.c exp.c file.c func.c glob.c hist.c lex.c misc.c parse.c proc.c sem.c set.c Log Message: Remove Free, s/xfree/free/. Standard C says that free should be a no-op for a NULL pointer, so we don't need an extra function to do this. While here, add an XXX about a wrong sounding comment To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/bin/csh/alloc.c cvs rdiff -u -r1.46 -r1.47 src/bin/csh/csh.c cvs rdiff -u -r1.26 -r1.27 src/bin/csh/csh.h cvs rdiff -u -r1.30 -r1.31 src/bin/csh/dir.c src/bin/csh/file.c cvs rdiff -u -r1.29 -r1.30 src/bin/csh/dol.c src/bin/csh/sem.c cvs rdiff -u -r1.21 -r1.22 src/bin/csh/err.c cvs rdiff -u -r1.31 -r1.32 src/bin/csh/exec.c src/bin/csh/lex.c cvs rdiff -u -r1.20 -r1.21 src/bin/csh/exp.c src/bin/csh/hist.c \ src/bin/csh/misc.c cvs rdiff -u -r1.40 -r1.41 src/bin/csh/func.c cvs rdiff -u -r1.28 -r1.29 src/bin/csh/glob.c cvs rdiff -u -r1.17 -r1.18 src/bin/csh/parse.c cvs rdiff -u -r1.36 -r1.37 src/bin/csh/proc.c cvs rdiff -u -r1.33 -r1.34 src/bin/csh/set.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/csh/alloc.c diff -u src/bin/csh/alloc.c:1.13 src/bin/csh/alloc.c:1.14 --- src/bin/csh/alloc.c:1.13 Tue Jan 22 19:28:00 2013 +++ src/bin/csh/alloc.c Sat Jan 5 10:51:06 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: alloc.c,v 1.13 2013/01/22 19:28:00 christos Exp $ */ +/* $NetBSD: alloc.c,v 1.14 2019/01/05 10:51:06 maya Exp $ */ /*- * Copyright (c) 1983, 1991, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)alloc.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: alloc.c,v 1.13 2013/01/22 19:28:00 christos Exp $"); +__RCSID("$NetBSD: alloc.c,v 1.14 2019/01/05 10:51:06 maya Exp $"); #endif #endif /* not lint */ @@ -82,10 +82,3 @@ Calloc(size_t s, size_t n) } return (ptr); } - -void -Free(ptr_t p) -{ -if (p) - free(p); -} Index: src/bin/csh/csh.c diff -u src/bin/csh/csh.c:1.46 src/bin/csh/csh.c:1.47 --- src/bin/csh/csh.c:1.46 Tue Jul 16 17:47:43 2013 +++ src/bin/csh/csh.c Sat Jan 5 10:51:06 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: csh.c,v 1.46 2013/07/16 17:47:43 christos Exp $ */ +/* $NetBSD: csh.c,v 1.47 2019/01/05 10:51:06 maya Exp $ */ /*- * Copyright (c) 1980, 1991, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19 #if 0 static char sccsid[] = "@(#)csh.c 8.2 (Berkeley) 10/12/93"; #else -__RCSID("$NetBSD: csh.c,v 1.46 2013/07/16 17:47:43 christos Exp $"); +__RCSID("$NetBSD: csh.c,v 1.47 2019/01/05 10:51:06 maya Exp $"); #endif #endif /* not lint */ @@ -641,7 +641,7 @@ srccat(Char *cp, Char *dp) ep = Strspl(cp, dp); ptr = short2str(ep); -xfree((ptr_t) ep); +free((ptr_t) ep); return srcfile(ptr, mflag ? 0 : 1, 0); } @@ -757,10 +757,11 @@ srcunit(int unit, int onlyown, int hflg) int i; /* We made it to the new state... free up its storage */ - /* This code could get run twice but xfree doesn't care */ + /* This code could get run twice but free doesn't care */ + /* XXX yes it does */ for (i = 0; i < fblocks; i++) - xfree((ptr_t) fbuf[i]); - xfree((ptr_t) fbuf); + free((ptr_t) fbuf[i]); + free((ptr_t) fbuf); /* Reset input arena */ (void)memcpy(&B, &saveB, sizeof(B)); @@ -1061,7 +1062,7 @@ process(int catch) (void)fflush(cshout); } if (seterr) { - xfree((ptr_t) seterr); + free((ptr_t) seterr); seterr = NULL; } @@ -1145,7 +1146,7 @@ dosource(Char **v, struct command *t) (void)Strcpy(buf, *v); f = globone(buf, G_ERROR); (void)strcpy((char *)buf, short2str(f)); -xfree((ptr_t) f); +free((ptr_t) f); if (!srcfile((char *)buf, 0, hflg) && !hflg) stderror(ERR_SYSTEM, (char *)buf, strerror(errno)); } Index: src/bin/csh/csh.h diff -u src/bin/csh/csh.h:1.26 src/bin/csh/csh.h:1.27 --- src/bin/csh/csh.h:1.26 Tue Jul 16 17:47:43 2013 +++ src/bin/csh/csh.h Sat Jan 5 10:51:06 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: csh.h,v 1.26 2013/07/16 17:47:43 christos Exp $ */ +/* $NetBSD: csh.h,v 1.27 2019/01/05 10:51:06 maya Exp $ */ /*- * Copyright (c) 1980, 1991, 1993 @@ -89,7 +89,6 @@ typedef void *ptr_t; #define xmalloc(i) Malloc(i) #define xrealloc(p, i) Realloc(p, i) #define xcalloc(n, s) Calloc(n, s) -#define xfree(p) Free(p) #include FILE *cshin, *cshout, *csherr; Index: src/bin/csh/dir.c diff -u src/bin/csh/dir.c:1.30 src/bin/csh/dir.c:1.31 --- src/bin/csh/dir.c:1.30 Tue Jul 16 17:47:43 2013 +++ src/bin/csh/dir.c Sat Jan 5 10:51:06 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: dir.c,v 1.30 2013/07/16 17:47:43 christos Exp $ */ +/* $NetBSD: dir.c,v 1.31 2019/01/05 10:51:06 maya Exp $ */ /*- * Copyright (c) 1980, 1991, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)dir.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: dir.c,v 1.30 2013/07/16 17:4
CVS commit: src/sys/fs/hfs
Module Name:src Committed By: maya Date: Sat Jan 5 10:25:11 UTC 2019 Modified Files: src/sys/fs/hfs: libhfs.h Log Message: Remove bogus code to workaround PCC limitations. This would print stack garbage, which isn't desirable. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/fs/hfs/libhfs.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/fs/hfs/libhfs.h diff -u src/sys/fs/hfs/libhfs.h:1.7 src/sys/fs/hfs/libhfs.h:1.8 --- src/sys/fs/hfs/libhfs.h:1.7 Sun Jun 21 14:00:40 2015 +++ src/sys/fs/hfs/libhfs.h Sat Jan 5 10:25:11 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: libhfs.h,v 1.7 2015/06/21 14:00:40 maxv Exp $ */ +/* $NetBSD: libhfs.h,v 1.8 2019/01/05 10:25:11 maya Exp $ */ /*- * Copyright (c) 2005, 2007 The NetBSD Foundation, Inc. @@ -57,15 +57,9 @@ /* Macros to handle errors in this library. Not recommended outside libhfs.c */ -#ifdef __PCC__ -#define HFS_LIBERR(format, ...) \ - do{ hfslib_error(format, __FILE__, __LINE__); \ - goto error; } while(/*CONSTCOND*/ 0) -#else #define HFS_LIBERR(format, ...) \ do{ hfslib_error(format, __FILE__, __LINE__, ##__VA_ARGS__); \ goto error; } while(/*CONSTCOND*/ 0) -#endif #if 0 #pragma mark Constants (on-disk)
CVS commit: src/sys/kern
Module Name:src Committed By: mlelstv Date: Sat Jan 5 09:39:56 UTC 2019 Modified Files: src/sys/kern: kern_subr.c Log Message: Refactor setroot, no functional change intended. setroot - prepare special cases - loop until root is set setroot_nfs - special case for disk boot + NFS root setroot_ask - Prompt user setroot_root - set root device setroot_dump - set dump device To generate a diff of this commit: cvs rdiff -u -r1.220 -r1.221 src/sys/kern/kern_subr.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_subr.c diff -u src/sys/kern/kern_subr.c:1.220 src/sys/kern/kern_subr.c:1.221 --- src/sys/kern/kern_subr.c:1.220 Sun Oct 7 11:24:16 2018 +++ src/sys/kern/kern_subr.c Sat Jan 5 09:39:56 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_subr.c,v 1.220 2018/10/07 11:24:16 mlelstv Exp $ */ +/* $NetBSD: kern_subr.c,v 1.221 2019/01/05 09:39:56 mlelstv Exp $ */ /*- * Copyright (c) 1997, 1998, 1999, 2002, 2007, 2008 The NetBSD Foundation, Inc. @@ -79,7 +79,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_subr.c,v 1.220 2018/10/07 11:24:16 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_subr.c,v 1.221 2019/01/05 09:39:56 mlelstv Exp $"); #include "opt_ddb.h" #include "opt_md.h" @@ -111,6 +111,12 @@ static device_t getdisk(char *, int, int static device_t parsedisk(char *, int, int, dev_t *); static const char *getwedgename(const char *, int); +static void setroot_nfs(device_t); +static void setroot_ask(device_t, int); +static void setroot_root(device_t, int); +static void setroot_dump(device_t, device_t); + + #ifdef TFTPROOT int tftproot_dhcpboot(device_t); #endif @@ -154,6 +160,8 @@ int md_is_root = 0; /* * The device and partition that we booted from. + * + * This data might be initialized by MD code, but is defined here. */ device_t booted_device; const char *booted_method; @@ -174,71 +182,92 @@ char *bootspec; void setroot(device_t bootdv, int bootpartition) { - device_t dv; - deviter_t di; - int len, majdev; - dev_t nrootdev; - dev_t ndumpdev = NODEV; - char buf[128]; - const char *rootdevname; - const char *dumpdevname; - device_t rootdv = NULL; /* XXX gcc -Wuninitialized */ - device_t dumpdv = NULL; - struct ifnet *ifp; - const char *deffsname; - struct vfsops *vops; + + /* + * Let bootcode augment "rootspec". + */ + if (rootspec == NULL) + rootspec = bootspec; + + /* + * force boot device to md0 + */ + if (md_is_root) + rootspec = "md0"; #ifdef TFTPROOT - if (tftproot_dhcpboot(bootdv) != 0) - boothowto |= RB_ASKNAME; + /* + * XXX + * if rootspec specifies an interface + * sets root_device to that interface + * reuses NFS init code to set up network + * fetch image into ram disk + * + * if successful, we change rootspec + */ + if (tftproot_dhcpboot(bootdv) == 0) + rootspec = "md0"; #endif - + /* - * For root on md0 we have to force the attachment of md0. + * quirk for + * evbarm/mini2440 + * hpcarm + * hpcmips + * hpcsh + * + * if rootfstype is set to NFS and the + * kernel supports NFS and the boot device + * is unknown or not a network interface + * -> chose the first network interface you find + * + * hp300 has similar MD code */ - if (md_is_root) { - int md_major; - dev_t md_dev; - - bootdv = NULL; - md_major = devsw_name2blk("md", NULL, 0); - if (md_major >= 0) { - md_dev = MAKEDISKDEV(md_major, 0, RAW_PART); - if (bdev_open(md_dev, FREAD, S_IFBLK, curlwp) == 0) -bootdv = device_find_by_xname("md0"); - } - if (bootdv == NULL) - panic("Cannot open \"md0\" (root)"); - } + setroot_nfs(bootdv); /* - * Let bootcode augment "rootspec". + * If no bootdv was found by MD code and no + * root specified ask the user. */ - if (rootspec == NULL) - rootspec = bootspec; + if (rootspec == NULL && bootdv == NULL) + boothowto |= RB_ASKNAME; /* - * If NFS is specified as the file system, and we found - * a DV_DISK boot device (or no boot device at all), then - * find a reasonable network interface for "rootspec". + * loop until a root device is specified */ + do { + if (boothowto & RB_ASKNAME) + setroot_ask(bootdv, bootpartition); + else + setroot_root(bootdv, bootpartition); + + if (root_device == NULL) + boothowto |= RB_ASKNAME; + } while (root_device == NULL); +} + +/* + * If NFS is specified as the file system, and we found + * a DV_DISK boot device (or no boot device at all), then + * find a reasonable network interface for "rootspec". + */ +static void +setroot_nfs(device_t dv) +{ + struct vfsops *vops; + struct ifnet *ifp; + vops = vfs_getopsbyname(MOUNT_NFS); if (vops != NULL && strcmp(rootfstype, MOUNT_NFS) == 0 && rootspec == NULL && - (bootdv == NULL || device_class(bootdv) != DV_IFNET)) { + (dv == NULL || device_class(dv) != DV_IFNET)) { int s = pserialize_read_enter(); IFNET_READER_FOREACH(ifp) { if ((ifp->if_flags &
CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs
Module Name:src Committed By: hannken Date: Sat Jan 5 09:20:29 UTC 2019 Modified Files: src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_vnops.c Log Message: Even though zfs_netbsd_putpages() cannot use ZFS_ENTER() it has to respect the teardown lock. Enter z_teardown_lock as reader and ZFS_EXIT(). Instead of ZFS_VERIFY_ZP() return without writing and without error from zfs_putapage() if "z_sa_hdl == NULL". To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.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/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.41 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.42 --- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.41 Tue Jan 1 10:09:26 2019 +++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c Sat Jan 5 09:20:29 2019 @@ -5863,6 +5863,11 @@ zfs_putapage(vnode_t *vp, page_t **pp, i struct uvm_object *uobj = &vp->v_uobj; kmutex_t *mtx = uobj->vmobjlock; + if (zp->z_sa_hdl == NULL) { + err = 0; + goto out_unbusy; + } + off = pp[0]->offset; len = count * PAGESIZE; KASSERT(off + len <= round_page(zp->z_size)); @@ -5914,6 +5919,7 @@ zfs_putapage(vnode_t *vp, page_t **pp, i } dmu_tx_commit(tx); +out_unbusy: mutex_enter(mtx); mutex_enter(&uvm_pageqlock); uvm_page_unbusy(pp, count); @@ -5994,6 +6000,12 @@ zfs_netbsd_putpages(void *v) return 0; } } + /* + * Cannot use ZFS_ENTER() here as it returns with error + * if z_unmounted. The next statement is equivalent. + */ + rrm_enter(&zfsvfs->z_teardown_lock, RW_READER, FTAG); + rl = zfs_range_lock(zp, offlo, len, RL_WRITER); mutex_enter(vp->v_interlock); tsd_set(zfs_putpage_key, &cleaned); @@ -6011,6 +6023,7 @@ zfs_netbsd_putpages(void *v) if (cleaned) if (!async || zfsvfs->z_os->os_sync == ZFS_SYNC_ALWAYS) zil_commit(zfsvfs->z_log, zp->z_id); + ZFS_EXIT(zfsvfs); fstrans_done(vp->v_mount); } return error;
CVS commit: src/include
Module Name:src Committed By: maya Date: Sat Jan 5 09:16:46 UTC 2019 Modified Files: src/include: stdlib.h Log Message: We can make a stronger guarantee than __pure. abs/labs don't read global memory. Make GCC 9 happier. To generate a diff of this commit: cvs rdiff -u -r1.120 -r1.121 src/include/stdlib.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/include/stdlib.h diff -u src/include/stdlib.h:1.120 src/include/stdlib.h:1.121 --- src/include/stdlib.h:1.120 Wed Aug 15 10:21:42 2018 +++ src/include/stdlib.h Sat Jan 5 09:16:46 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: stdlib.h,v 1.120 2018/08/15 10:21:42 martin Exp $ */ +/* $NetBSD: stdlib.h,v 1.121 2019/01/05 09:16:46 maya Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -95,7 +95,7 @@ extern size_t __mb_cur_max; __BEGIN_DECLS __dead void _Exit(int); __dead void abort(void); -__pure int abs(int); +__constfunc int abs(int); int atexit(void (*)(void)); double atof(const char *); int atoi(const char *); @@ -111,7 +111,7 @@ div_t div(int, int); __dead void exit(int); void free(void *); __aconst char *getenv(const char *); -__pure long +__constfunc long labs(long); ldiv_t ldiv(long, long); void *malloc(size_t);
CVS commit: src
Module Name:src Committed By: maya Date: Sat Jan 5 08:55:58 UTC 2019 Modified Files: src/lib/libtelnet: enc-proto.h encrypt.c src/usr.bin/telnet: commands.c Log Message: Match the function prototype of encrypthandler instead of casting to it. Make GCC 9 snapshot happier with the code While here, remove unnecessary braces around return (KNF). To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/lib/libtelnet/enc-proto.h cvs rdiff -u -r1.17 -r1.18 src/lib/libtelnet/encrypt.c cvs rdiff -u -r1.75 -r1.76 src/usr.bin/telnet/commands.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/libtelnet/enc-proto.h diff -u src/lib/libtelnet/enc-proto.h:1.9 src/lib/libtelnet/enc-proto.h:1.10 --- src/lib/libtelnet/enc-proto.h:1.9 Mon Jan 9 15:25:33 2012 +++ src/lib/libtelnet/enc-proto.h Sat Jan 5 08:55:58 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: enc-proto.h,v 1.9 2012/01/09 15:25:33 christos Exp $ */ +/* $NetBSD: enc-proto.h,v 1.10 2019/01/05 08:55:58 maya Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -61,13 +61,13 @@ void encrypt_list_types(void); int EncryptEnable(char *, char *); int EncryptDisable(char *, char *); int EncryptType(char *, char *); -int EncryptStart(char *); -int EncryptStartInput(void); -int EncryptStartOutput(void); -int EncryptStop(char *); -int EncryptStopInput(void); -int EncryptStopOutput(void); -int EncryptStatus(void); +int EncryptStart(char *, char *); +int EncryptStartInput(char *, char *); +int EncryptStartOutput(char *, char *); +int EncryptStop(char *, char *); +int EncryptStopInput(char *, char *); +int EncryptStopOutput(char *, char *); +int EncryptStatus(char *, char *); void encrypt_send_support(void); int EncryptDebug(int); int EncryptVerbose(int); Index: src/lib/libtelnet/encrypt.c diff -u src/lib/libtelnet/encrypt.c:1.17 src/lib/libtelnet/encrypt.c:1.18 --- src/lib/libtelnet/encrypt.c:1.17 Wed Mar 21 05:33:27 2012 +++ src/lib/libtelnet/encrypt.c Sat Jan 5 08:55:58 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: encrypt.c,v 1.17 2012/03/21 05:33:27 matt Exp $ */ +/* $NetBSD: encrypt.c,v 1.18 2019/01/05 08:55:58 maya Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -33,7 +33,7 @@ #if 0 static char sccsid[] = "@(#)encrypt.c 8.2 (Berkeley) 5/30/95"; #else -__RCSID("$NetBSD: encrypt.c,v 1.17 2012/03/21 05:33:27 matt Exp $"); +__RCSID("$NetBSD: encrypt.c,v 1.18 2019/01/05 08:55:58 maya Exp $"); #endif /* not lint */ /* @@ -226,11 +226,11 @@ EncryptEnable(char *type, char *mode) if (isprefix(type, "help") || isprefix(type, "?")) { printf("Usage: encrypt enable [input|output]\n"); encrypt_list_types(); - return(0); + return 0; } if (EncryptType(type, mode)) - return(EncryptStart(mode)); - return(0); + return EncryptStart(mode, NULL); + return 0; } int @@ -250,13 +250,13 @@ EncryptDisable(char *type, char *mode) } else { if ((mode == 0) || (isprefix(mode, "input") ? 1 : 0)) { if (decrypt_mode == ep->type) -EncryptStopInput(); +EncryptStopInput(NULL, NULL); i_wont_support_decrypt |= typemask(ep->type); ret = 1; } if ((mode == 0) || (isprefix(mode, "output"))) { if (encrypt_mode == ep->type) -EncryptStopOutput(); +EncryptStopOutput(NULL, NULL); i_wont_support_encrypt |= typemask(ep->type); ret = 1; } @@ -298,28 +298,28 @@ EncryptType(char *type, char *mode) } int -EncryptStart(char *mode) +EncryptStart(char *mode, char *unused __unused) { register int ret = 0; if (mode) { if (isprefix(mode, "input")) - return(EncryptStartInput()); + return EncryptStartInput(NULL, NULL); if (isprefix(mode, "output")) - return(EncryptStartOutput()); + return EncryptStartOutput(NULL, NULL); if (isprefix(mode, "help") || isprefix(mode, "?")) { printf("Usage: encrypt start [input|output]\n"); - return(0); + return 0; } printf("%s: invalid encryption mode 'encrypt start ?' for help\n", mode); - return(0); + return 0; } - ret += EncryptStartInput(); - ret += EncryptStartOutput(); - return(ret); + ret += EncryptStartInput(NULL, NULL); + ret += EncryptStartOutput(NULL, NULL); + return ret; } int -EncryptStartInput(void) +EncryptStartInput(char *unused1 __unused, char *unused2 __unused) { if (decrypt_mode) { encrypt_send_request_start(); @@ -330,7 +330,7 @@ EncryptStartInput(void) } int -EncryptStartOutput(void) +EncryptStartOutput(char *unused1 __unused, char *unused2 __unused) { if (encrypt_mode) { encrypt_start_output(encrypt_mode); @@ -341,38 +341,38 @@ EncryptStartOutput(void) } int -EncryptStop(char *mode) +EncryptStop(char *mode, char *unused __unused) { int ret = 0; if (mode) { if (isprefix(mode, "input")) - return(EncryptStopInput()); + return EncryptStopInput(NULL, NULL); if (isprefix(mode, "output")) - return(EncryptStopOutput()); + return EncryptStopOutput(NULL, NULL); if (isprefix(mode, "help") || isprefix(mo