CVS commit: src/share/man/man3
Module Name:src Committed By: pgoyette Date: Mon Oct 2 05:16:41 UTC 2017 Modified Files: src/share/man/man3: queue.3 Log Message: Update for new signature for LIST_MOVE() To generate a diff of this commit: cvs rdiff -u -r1.58 -r1.59 src/share/man/man3/queue.3 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/man3/queue.3 diff -u src/share/man/man3/queue.3:1.58 src/share/man/man3/queue.3:1.59 --- src/share/man/man3/queue.3:1.58 Tue Aug 8 03:58:43 2017 +++ src/share/man/man3/queue.3 Mon Oct 2 05:16:41 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: queue.3,v 1.58 2017/08/08 03:58:43 isaki Exp $ +.\" $NetBSD: queue.3,v 1.59 2017/10/02 05:16:41 pgoyette Exp $ .\" .\" Copyright (c) 2000, 2002 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -53,7 +53,7 @@ .\" .\" @(#)queue.3 8.1 (Berkeley) 12/13/93 .\" -.Dd October 15, 2016 +.Dd October 1, 2017 .Dt QUEUE 3 .Os .Sh NAME @@ -177,7 +177,7 @@ .Fn LIST_INSERT_HEAD "LIST_HEAD *head" "TYPE *elm" "LIST_ENTRY NAME" .Fn LIST_REMOVE "TYPE *elm" "LIST_ENTRY NAME" .Fn LIST_REPLACE "TYPE *elm" "TYPE *new" "LIST_ENTRY NAME" -.Fn LIST_MOVE "LIST_HEAD *head1" "LIST_HEAD *head2" +.Fn LIST_MOVE "LIST_HEAD *head1" "LIST_HEAD *head2" "LIST_ENTRY NAME" .Pp .Fn SIMPLEQ_HEAD "HEADNAME" "TYPE" .Fn SIMPLEQ_HEAD_INITIALIZER "head"
CVS commit: src/tests/include/sys
Module Name:src Committed By: pgoyette Date: Mon Oct 2 05:14:29 UTC 2017 Modified Files: src/tests/include/sys: t_list.c Log Message: Update recently-added test to adapt to new signature of LIST_MOVE() To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/include/sys/t_list.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/include/sys/t_list.c diff -u src/tests/include/sys/t_list.c:1.1 src/tests/include/sys/t_list.c:1.2 --- src/tests/include/sys/t_list.c:1.1 Mon Oct 2 04:15:56 2017 +++ src/tests/include/sys/t_list.c Mon Oct 2 05:14:29 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: t_list.c,v 1.1 2017/10/02 04:15:56 pgoyette Exp $ */ +/* $NetBSD: t_list.c,v 1.2 2017/10/02 05:14:29 pgoyette Exp $ */ /*- * Copyright (c) 2017 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ ATF_TC_BODY(list_move, tc) n2->value = 2; LIST_INSERT_HEAD(_head, n2, entries); - LIST_MOVE(_head, _head); + LIST_MOVE(_head, _head, entries); memcpy(_copy, _head, sizeof(old_head));
CVS commit: src/sys/sys
Module Name:src Committed By: pgoyette Date: Mon Oct 2 05:13:44 UTC 2017 Modified Files: src/sys/sys: queue.h Log Message: Fix the LIST_MOVE macro to properly update the back-pointer of the first entry in the list. Note that the signature of LIST_MOVE() macro also changes (it grew an additional argument). This should not require a kernel version bump since nothing appears to use LIST_MOVE() other than the recently added atf test. To generate a diff of this commit: cvs rdiff -u -r1.70 -r1.71 src/sys/sys/queue.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/queue.h diff -u src/sys/sys/queue.h:1.70 src/sys/sys/queue.h:1.71 --- src/sys/sys/queue.h:1.70 Mon Nov 2 15:21:23 2015 +++ src/sys/sys/queue.h Mon Oct 2 05:13:44 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: queue.h,v 1.70 2015/11/02 15:21:23 christos Exp $ */ +/* $NetBSD: queue.h,v 1.71 2017/10/02 05:13:44 pgoyette Exp $ */ /* * Copyright (c) 1991, 1993 @@ -211,10 +211,11 @@ struct {\ ((tvar) = LIST_NEXT((var), field), 1); \ (var) = (tvar)) -#define LIST_MOVE(head1, head2) do { \ +#define LIST_MOVE(head1, head2, field) do { \ LIST_INIT((head2)); \ if (!LIST_EMPTY((head1))) { \ (head2)->lh_first = (head1)->lh_first; \ + (head2)->lh_first->field.le_prev = &(head2)->lh_first; \ LIST_INIT((head1)); \ }\ } while (/*CONSTCOND*/0)
CVS commit: src/tests/include/sys
Module Name:src Committed By: pgoyette Date: Mon Oct 2 04:15:56 UTC 2017 Modified Files: src/tests/include/sys: Makefile Added Files: src/tests/include/sys: t_list.c Log Message: Add a new minimalistic test for LIST_MOVE to verify that the list's first entry's prev pointer correctly points to the listhead. This test will fail until a fix for LIST_MOVE is checked in (soon). To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/tests/include/sys/Makefile cvs rdiff -u -r0 -r1.1 src/tests/include/sys/t_list.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/include/sys/Makefile diff -u src/tests/include/sys/Makefile:1.12 src/tests/include/sys/Makefile:1.13 --- src/tests/include/sys/Makefile:1.12 Mon Aug 8 14:11:08 2016 +++ src/tests/include/sys/Makefile Mon Oct 2 04:15:56 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.12 2016/08/08 14:11:08 pgoyette Exp $ +# $NetBSD: Makefile,v 1.13 2017/10/02 04:15:56 pgoyette Exp $ NOMAN= # defined @@ -9,6 +9,7 @@ TESTSDIR= ${TESTSBASE}/include/sys TESTS_C+= t_bitops TESTS_C+= t_bootblock TESTS_C+= t_cdefs +TESTS_C+= t_list TESTS_C+= t_pslist TESTS_C+= t_tree TESTS_C+= t_types Added files: Index: src/tests/include/sys/t_list.c diff -u /dev/null src/tests/include/sys/t_list.c:1.1 --- /dev/null Mon Oct 2 04:15:56 2017 +++ src/tests/include/sys/t_list.c Mon Oct 2 04:15:56 2017 @@ -0,0 +1,89 @@ +/* $NetBSD: t_list.c,v 1.1 2017/10/02 04:15:56 pgoyette Exp $ */ + +/*- + * Copyright (c) 2017 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Paul Goyette + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include + +#include + +#include + +/* + * XXX This is a limited test to make sure the operations behave as + * described on a sequential machine. It does nothing to test the + * pserialize-safety of any operations. + */ + +ATF_TC(list_move); +ATF_TC_HEAD(list_move, tc) +{ + atf_tc_set_md_var(tc, "descr", "LIST_MOVE verification"); +} +ATF_TC_BODY(list_move, tc) +{ + LIST_HEAD(listhead, entry) old_head, new_head, old_copy; + struct entry { + LIST_ENTRY(entry) entries; + uint64_t value; + } *n1, *n2, *n3; + + LIST_INIT(_head); + + n1 = malloc(sizeof(struct entry)); + n1->value = 1; + LIST_INSERT_HEAD(_head, n1, entries); + + n2 = malloc(sizeof(struct entry)); + n2->value = 2; + LIST_INSERT_HEAD(_head, n2, entries); + + LIST_MOVE(_head, _head); + + memcpy(_copy, _head, sizeof(old_head)); + + n3 = LIST_FIRST(_head); + ATF_CHECK_MSG(n3->value = 2, "Unexpected value for LIST_FIRST"); + + LIST_REMOVE(n3, entries); + ATF_CHECK_MSG(memcmp(_copy, _head, sizeof(old_head)) == 0, + "Unexpected modification of old_head during LIST_REMOVE"); + + LIST_REMOVE(LIST_FIRST(_head), entries); + ATF_CHECK_MSG(LIST_EMPTY(_head), "New list not empty!"); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, list_move); + + return atf_no_error(); +}
CVS commit: src/distrib/sets/lists/tests
Module Name:src Committed By: pgoyette Date: Mon Oct 2 04:16:32 UTC 2017 Modified Files: src/distrib/sets/lists/tests: mi Log Message: Add new LIST_MOVE test to sets list. To generate a diff of this commit: cvs rdiff -u -r1.763 -r1.764 src/distrib/sets/lists/tests/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.763 src/distrib/sets/lists/tests/mi:1.764 --- src/distrib/sets/lists/tests/mi:1.763 Fri Sep 29 12:42:36 2017 +++ src/distrib/sets/lists/tests/mi Mon Oct 2 04:16:32 2017 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.763 2017/09/29 12:42:36 maya Exp $ +# $NetBSD: mi,v 1.764 2017/10/02 04:16:32 pgoyette Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -1589,6 +1589,7 @@ ./usr/tests/include/sys/t_bitops tests-include-tests compattestfile,atf ./usr/tests/include/sys/t_bootblock tests-include-tests compattestfile,atf ./usr/tests/include/sys/t_cdefs tests-include-tests compattestfile,atf +./usr/tests/include/sys/t_list tests-include-tests compattestfile,atf ./usr/tests/include/sys/t_pslist tests-include-tests compattestfile,atf ./usr/tests/include/sys/t_socket tests-include-tests atf,rump ./usr/tests/include/sys/t_tree tests-include-tests compattestfile,atf
CVS commit: src/sys/arch/powerpc/booke/dev
Module Name:src Committed By: knakahara Date: Mon Oct 2 01:55:40 UTC 2017 Modified Files: src/sys/arch/powerpc/booke/dev: pq3etsec.c Log Message: only get vtag when we have vtag like the other drivers. like if_bge.c:1.312 and if_stge.c:1.64. fixed by s-yamaguchi@IIJ, thanks. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/arch/powerpc/booke/dev/pq3etsec.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/powerpc/booke/dev/pq3etsec.c diff -u src/sys/arch/powerpc/booke/dev/pq3etsec.c:1.30 src/sys/arch/powerpc/booke/dev/pq3etsec.c:1.31 --- src/sys/arch/powerpc/booke/dev/pq3etsec.c:1.30 Tue Sep 26 07:42:05 2017 +++ src/sys/arch/powerpc/booke/dev/pq3etsec.c Mon Oct 2 01:55:40 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pq3etsec.c,v 1.30 2017/09/26 07:42:05 knakahara Exp $ */ +/* $NetBSD: pq3etsec.c,v 1.31 2017/10/02 01:55:40 knakahara Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -41,7 +41,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: pq3etsec.c,v 1.30 2017/09/26 07:42:05 knakahara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pq3etsec.c,v 1.31 2017/10/02 01:55:40 knakahara Exp $"); #include #include @@ -1996,7 +1996,7 @@ pq3etsec_tx_offload( KASSERT(m->m_flags & M_PKTHDR); have_vtag = vlan_has_tag(m); - vtag = vlan_get_tag(m); + vtag = (have_vtag) ? vlan_get_tag(m) : 0; /* * Let see if we are doing any offload first. @@ -2031,7 +2031,7 @@ pq3etsec_tx_offload( fcb.txfcb_l4os = M_CSUM_DATA_IPv6_HL(m->m_pkthdr.csum_data); fcb.txfcb_l3os = ETHER_HDR_LEN; fcb.txfcb_phcs = 0; - fcb.txfcb_vlctl = have_vtag ? vtag : 0; + fcb.txfcb_vlctl = vtag; #if 0 printf("%s: csum_flags=%#x: txfcb flags=%#x lsos=%u l4os=%u phcs=%u vlctl=%#x\n",
CVS commit: src/sys/arch/macppc/stand/fixcoff
Module Name:src Committed By: uwe Date: Mon Oct 2 01:03:31 UTC 2017 Modified Files: src/sys/arch/macppc/stand/fixcoff: elf32_powerpc_merge.x Log Message: Add cvs id keyword. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ src/sys/arch/macppc/stand/fixcoff/elf32_powerpc_merge.x 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/macppc/stand/fixcoff/elf32_powerpc_merge.x diff -u src/sys/arch/macppc/stand/fixcoff/elf32_powerpc_merge.x:1.6 src/sys/arch/macppc/stand/fixcoff/elf32_powerpc_merge.x:1.7 --- src/sys/arch/macppc/stand/fixcoff/elf32_powerpc_merge.x:1.6 Mon Oct 2 00:55:55 2017 +++ src/sys/arch/macppc/stand/fixcoff/elf32_powerpc_merge.x Mon Oct 2 01:03:31 2017 @@ -1,3 +1,4 @@ +/* $NetBSD: elf32_powerpc_merge.x,v 1.7 2017/10/02 01:03:31 uwe Exp $ */ OUTPUT_ARCH(powerpc) SECTIONS {
CVS commit: src/sys/arch/macppc/stand/fixcoff
Module Name:src Committed By: uwe Date: Mon Oct 2 00:55:55 UTC 2017 Modified Files: src/sys/arch/macppc/stand/fixcoff: elf32_powerpc_merge.x Log Message: PR port-macppc/52564: revert previous and use a different workaround. The .eh_frame has nothing to do with it, especially since it's not generated now anyway. The problem is that . = (. + 0x0FFF) & 0xF000; now seems to cause binutils to pad the preceding section, and when that happens to be .text the powermac ofw is unhappy for whatever reason. For now provide .pad section that absorbs the padding as a workaround. The binutils problem still needs to be looked into. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 \ src/sys/arch/macppc/stand/fixcoff/elf32_powerpc_merge.x 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/macppc/stand/fixcoff/elf32_powerpc_merge.x diff -u src/sys/arch/macppc/stand/fixcoff/elf32_powerpc_merge.x:1.5 src/sys/arch/macppc/stand/fixcoff/elf32_powerpc_merge.x:1.6 --- src/sys/arch/macppc/stand/fixcoff/elf32_powerpc_merge.x:1.5 Wed Sep 20 18:44:22 2017 +++ src/sys/arch/macppc/stand/fixcoff/elf32_powerpc_merge.x Mon Oct 2 00:55:55 2017 @@ -32,9 +32,6 @@ SECTIONS *(.rodata.*) *(.rodata1) *(.got1) - } - .eh_frame : - { *(.eh_frame_hdr) *(.eh_frame) } @@ -43,6 +40,7 @@ SECTIONS .dtors : { *(.dtors) } _etext = .; PROVIDE (etext = .); + .pad : { LONG(0) } /* Read-write section, merged into data segment: */ . = (. + 0x0FFF) & 0xF000; .data:
CVS commit: src/sbin/resize_ffs
Module Name:src Committed By: christos Date: Sun Oct 1 22:59:19 UTC 2017 Modified Files: src/sbin/resize_ffs: resize_ffs.8 resize_ffs.c Log Message: PR/52590: David H. Gutteridge: Minor documentation improvements To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sbin/resize_ffs/resize_ffs.8 cvs rdiff -u -r1.51 -r1.52 src/sbin/resize_ffs/resize_ffs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/resize_ffs/resize_ffs.8 diff -u src/sbin/resize_ffs/resize_ffs.8:1.17 src/sbin/resize_ffs/resize_ffs.8:1.18 --- src/sbin/resize_ffs/resize_ffs.8:1.17 Mon Sep 12 01:47:21 2016 +++ src/sbin/resize_ffs/resize_ffs.8 Sun Oct 1 18:59:19 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: resize_ffs.8,v 1.17 2016/09/12 05:47:21 sevan Exp $ +.\" $NetBSD: resize_ffs.8,v 1.18 2017/10/01 22:59:19 christos Exp $ .\" .\" As its sole author, I explicitly place this man page in the public .\" domain. Anyone may use it in any way for any purpose (though I would @@ -9,7 +9,7 @@ .\" X Against HTML mo...@rodents.montreal.qc.ca .\" / \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B .\" -.Dd April 6, 2015 +.Dd October 1, 2017 .Dt RESIZE_FFS 8 .Os .Sh NAME @@ -128,10 +128,8 @@ command first appeared in .Aq r...@netbsd.org (Byteswapped file system and UFS2 support) .Pp -A big bug-finding kudos goes to John Kohl for finding the rotational -layout bug referred to in the -.Sx WARNING -section above. +A big bug-finding kudos goes to John Kohl for finding a significant +rotational layout bug. .Sh BUGS Can fail to shrink a file system when there actually is enough space, because it does not distinguish between a block allocated as a block Index: src/sbin/resize_ffs/resize_ffs.c diff -u src/sbin/resize_ffs/resize_ffs.c:1.51 src/sbin/resize_ffs/resize_ffs.c:1.52 --- src/sbin/resize_ffs/resize_ffs.c:1.51 Sun Oct 1 03:18:39 2017 +++ src/sbin/resize_ffs/resize_ffs.c Sun Oct 1 18:59:19 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: resize_ffs.c,v 1.51 2017/10/01 07:18:39 mlelstv Exp $ */ +/* $NetBSD: resize_ffs.c,v 1.52 2017/10/01 22:59:19 christos Exp $ */ /* From sources sent on February 17, 2003 */ /*- * As its sole author, I explicitly place this code in the public @@ -36,7 +36,7 @@ */ #include -__RCSID("$NetBSD: resize_ffs.c,v 1.51 2017/10/01 07:18:39 mlelstv Exp $"); +__RCSID("$NetBSD: resize_ffs.c,v 1.52 2017/10/01 22:59:19 christos Exp $"); #include #include @@ -2304,7 +2304,7 @@ static void usage(void) { - (void)fprintf(stderr, "usage: %s [-cvy] [-s size] special\n", + (void)fprintf(stderr, "usage: %s [-cpvy] [-s size] special\n", getprogname()); exit(EXIT_FAILURE); }
CVS commit: src/usr.bin/tail
Module Name:src Committed By: kre Date: Sun Oct 1 22:35:23 UTC 2017 Modified Files: src/usr.bin/tail: tac.1 Log Message: Remove some unnecessary words. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.bin/tail/tac.1 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/tail/tac.1 diff -u src/usr.bin/tail/tac.1:1.1 src/usr.bin/tail/tac.1:1.2 --- src/usr.bin/tail/tac.1:1.1 Sun Oct 1 20:49:24 2017 +++ src/usr.bin/tail/tac.1 Sun Oct 1 22:35:23 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: tac.1,v 1.1 2017/10/01 20:49:24 maya Exp $ +.\" $NetBSD: tac.1,v 1.2 2017/10/01 22:35:23 kre Exp $ .\" .\" Copyright (c) 2017 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -43,7 +43,7 @@ .Nm .Pq cat backwards outputs the contents of each of each of the specified files, -or of the standard input if no files are specified its standard input, +or the standard input if no files are specified, in reverse line order to the standard output. .Sh EXIT STATUS .Ex -std tac
CVS commit: src/sys/dev
Module Name:src Committed By: nat Date: Sun Oct 1 21:49:20 UTC 2017 Modified Files: src/sys/dev: audio.c Log Message: Ensure proper use of sc_opens (play back) and sc_recopens (recording). Fix logic for /dev/sound so audiosetinfo is only called once. These changes are to ensure that init_output/input is only called once for the respective function play back or recording. For multiple recording or plack back streams init_input/output is only called once fot the first play/rec stream. This addresses PR kern/52580, PR kern/52581 and PR kern/52582 analyzed and reported by isaki@. To generate a diff of this commit: cvs rdiff -u -r1.409 -r1.410 src/sys/dev/audio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/audio.c diff -u src/sys/dev/audio.c:1.409 src/sys/dev/audio.c:1.410 --- src/sys/dev/audio.c:1.409 Sat Sep 30 05:37:55 2017 +++ src/sys/dev/audio.c Sun Oct 1 21:49:20 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: audio.c,v 1.409 2017/09/30 05:37:55 isaki Exp $ */ +/* $NetBSD: audio.c,v 1.410 2017/10/01 21:49:20 nat Exp $ */ /*- * Copyright (c) 2016 Nathanial Sloss@@ -148,7 +148,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.409 2017/09/30 05:37:55 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.410 2017/10/01 21:49:20 nat Exp $"); #ifdef _KERNEL_OPT #include "audio.h" @@ -2027,7 +2027,7 @@ audio_initbufs(struct audio_softc *sc, s ((vc->sc_open & AUOPEN_READ) || vc == sc->sc_hwvc)) { audio_init_ringbuffer(sc, >sc_mrr, AUMODE_RECORD); - if (sc->sc_opens == 0 && (vc->sc_mode & AUMODE_RECORD)) { + if (sc->sc_recopens == 0 && (vc->sc_open & AUOPEN_READ)) { if (hw->init_input) { error = hw->init_input(sc->hw_hdl, vc->sc_mrr.s.start, @@ -2043,7 +2043,7 @@ audio_initbufs(struct audio_softc *sc, s audio_init_ringbuffer(sc, >sc_mpr, AUMODE_PLAY); vc->sc_sil_count = 0; - if (sc->sc_opens == 0 && (vc->sc_mode & AUMODE_PLAY)) { + if (sc->sc_opens == 0 && (vc->sc_open & AUOPEN_WRITE)) { if (hw->init_output) { error = hw->init_output(sc->hw_hdl, vc->sc_mpr.s.start, @@ -2157,7 +2157,7 @@ audio_open(dev_t dev, struct audio_softc if (error) goto bad; - if (sc->sc_opens == 0) { + if (sc->sc_opens + sc->sc_recopens == 0) { sc->sc_credentials = kauth_cred_get(); kauth_cred_hold(sc->sc_credentials); if (hw->open != NULL) { @@ -2216,13 +2216,13 @@ audio_open(dev_t dev, struct audio_softc * The /dev/audio is always (re)set to 8-bit MU-Law mono * For the other devices, you get what they were last set to. */ - error = audio_set_defaults(sc, mode, vc); - if (!error && ISDEVSOUND(dev) && sc->sc_aivalid == true) { + if (ISDEVSOUND(dev) && sc->sc_aivalid == true) { sc->sc_ai.mode = mode; sc->sc_ai.play.port = ~0; sc->sc_ai.record.port = ~0; error = audiosetinfo(sc, >sc_ai, true, vc); - } + } else + error = audio_set_defaults(sc, mode, vc); if (error) goto bad; @@ -2250,7 +2250,8 @@ audio_open(dev_t dev, struct audio_softc grow_mixer_states(sc, 2); if (flags & FREAD) sc->sc_recopens++; - sc->sc_opens++; + if (flags & FWRITE) + sc->sc_opens++; chan->dev = dev; chan->chan = n; chan->deschan = n; @@ -2265,7 +2266,7 @@ audio_open(dev_t dev, struct audio_softc bad: audio_destroy_pfilters(vc); audio_destroy_rfilters(vc); - if (hw->close != NULL && sc->sc_opens == 0) + if (hw->close != NULL && sc->sc_opens == 0 && sc->sc_recopens == 0) hw->close(sc->hw_hdl); mutex_exit(sc->sc_lock); audio_free_ring(sc, >sc_mpr); @@ -2285,7 +2286,7 @@ audio_init_record(struct audio_softc *sc KASSERT(mutex_owned(sc->sc_lock)); - if (sc->sc_opens != 0) + if (sc->sc_recopens != 0) return; mutex_enter(sc->sc_intr_lock); @@ -2416,7 +2417,7 @@ audio_close(struct audio_softc *sc, int KASSERT(mutex_owned(sc->sc_lock)); - if (sc->sc_opens == 0) + if (sc->sc_opens == 0 && sc->sc_recopens == 0) return ENXIO; vc = chan->vc; @@ -2450,7 +2451,7 @@ audio_close(struct audio_softc *sc, int audio_drain(sc, chan->vc); vc->sc_pbus = false; } - if (sc->sc_opens == 1) { + if ((flags & FWRITE) && (sc->sc_opens == 1)) { if (vc->sc_mpr.mmapped == false) audio_drain(sc, sc->sc_hwvc); if (hw->drain) @@ -2461,11 +2462,11 @@ audio_close(struct audio_softc *sc, int if ((flags & FREAD) && (sc->sc_recopens == 1)) sc->sc_rec_started = false; - if (sc->sc_opens == 1 && hw->close != NULL) + if (sc->sc_opens + sc->sc_recopens == 1 && hw->close != NULL) hw->close(sc->hw_hdl); mutex_exit(sc->sc_intr_lock); - if (sc->sc_opens == 1) { + if (sc->sc_opens + sc->sc_recopens == 1) { sc->sc_async_audio = 0; kauth_cred_free(sc->sc_credentials); } @@ -2479,7 +2480,8 @@ audio_close(struct audio_softc *sc, int if (flags & FREAD) sc->sc_recopens--; - sc->sc_opens--; + if (flags & FWRITE) + sc->sc_opens--;
CVS commit: src
Module Name:src Committed By: maya Date: Sun Oct 1 20:49:25 UTC 2017 Modified Files: src/distrib/sets/lists/base: mi src/distrib/sets/lists/man: mi src/usr.bin/tail: Makefile tail.1 tail.c Added Files: src/usr.bin/tail: tac.1 Log Message: Add arguments to tail: -q: suppress filename headers when multiple files are used -v: print filename headers even when only one file is used head already supports the same arguments, which originated in GNU head. GNU tail also has the same flags. Add tac, a hard link to 'tail -rq'. Prints a file in reverse line order. Similar to GNU tac, but lacking any options. Add accompanying documentation. To generate a diff of this commit: cvs rdiff -u -r1.1161 -r1.1162 src/distrib/sets/lists/base/mi cvs rdiff -u -r1.1561 -r1.1562 src/distrib/sets/lists/man/mi cvs rdiff -u -r1.3 -r1.4 src/usr.bin/tail/Makefile cvs rdiff -u -r0 -r1.1 src/usr.bin/tail/tac.1 cvs rdiff -u -r1.17 -r1.18 src/usr.bin/tail/tail.1 src/usr.bin/tail/tail.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/mi diff -u src/distrib/sets/lists/base/mi:1.1161 src/distrib/sets/lists/base/mi:1.1162 --- src/distrib/sets/lists/base/mi:1.1161 Sun Sep 17 00:00:39 2017 +++ src/distrib/sets/lists/base/mi Sun Oct 1 20:49:25 2017 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1161 2017/09/17 00:00:39 sevan Exp $ +# $NetBSD: mi,v 1.1162 2017/10/01 20:49:25 maya Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -940,6 +940,7 @@ ./usr/bin/sysstatbase-util-bin ./usr/bin/systatbase-util-bin ./usr/bin/tabs base-util-bin +./usr/bin/tac base-util-bin ./usr/bin/tail base-util-bin ./usr/bin/talk base-netutil-bin ./usr/bin/tar base-util-bin Index: src/distrib/sets/lists/man/mi diff -u src/distrib/sets/lists/man/mi:1.1561 src/distrib/sets/lists/man/mi:1.1562 --- src/distrib/sets/lists/man/mi:1.1561 Sat Sep 30 12:27:26 2017 +++ src/distrib/sets/lists/man/mi Sun Oct 1 20:49:25 2017 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1561 2017/09/30 12:27:26 sevan Exp $ +# $NetBSD: mi,v 1.1562 2017/10/01 20:49:25 maya Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -555,6 +555,7 @@ ./usr/share/man/cat1/systat.0 man-util-catman .cat ./usr/share/man/cat1/systrace.0 man-obsolete obsolete ./usr/share/man/cat1/tabs.0 man-util-catman .cat +./usr/share/man/cat1/tac.0 man-util-catman .cat ./usr/share/man/cat1/tail.0 man-util-catman .cat ./usr/share/man/cat1/talk.0 man-netutil-catman .cat ./usr/share/man/cat1/tar.0 man-util-catman .cat @@ -3732,6 +3733,7 @@ ./usr/share/man/html1/sysstat.html man-util-htmlman html ./usr/share/man/html1/systat.html man-util-htmlman html ./usr/share/man/html1/tabs.html man-util-htmlman html +./usr/share/man/html1/tac.html man-util-htmlman html ./usr/share/man/html1/tail.html man-util-htmlman html ./usr/share/man/html1/talk.html man-netutil-htmlman html ./usr/share/man/html1/tar.html man-util-htmlman html @@ -6563,6 +6565,7 @@ ./usr/share/man/man1/systat.1 man-util-man .man ./usr/share/man/man1/systrace.1 man-obsolete obsolete ./usr/share/man/man1/tabs.1 man-util-man .man +./usr/share/man/man1/tac.1 man-util-man .man ./usr/share/man/man1/tail.1 man-util-man .man ./usr/share/man/man1/talk.1 man-netutil-man .man ./usr/share/man/man1/tar.1 man-util-man .man Index: src/usr.bin/tail/Makefile diff -u src/usr.bin/tail/Makefile:1.3 src/usr.bin/tail/Makefile:1.4 --- src/usr.bin/tail/Makefile:1.3 Wed Nov 23 07:41:55 1994 +++ src/usr.bin/tail/Makefile Sun Oct 1 20:49:24 2017 @@ -1,7 +1,11 @@ -# $NetBSD: Makefile,v 1.3 1994/11/23 07:41:55 jtc Exp $ +# $NetBSD: Makefile,v 1.4 2017/10/01 20:49:24 maya Exp $ # @(#)Makefile 8.1 (Berkeley) 6/6/93 PROG= tail SRCS= forward.c misc.c read.c reverse.c tail.c +LINKS= ${BINDIR}/tail ${BINDIR}/tac + +MAN= tail.1 tac.1 + .include Index: src/usr.bin/tail/tail.1 diff -u src/usr.bin/tail/tail.1:1.17 src/usr.bin/tail/tail.1:1.18 --- src/usr.bin/tail/tail.1:1.17 Tue Jul 4 07:04:50 2017 +++ src/usr.bin/tail/tail.1 Sun Oct 1 20:49:24 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: tail.1,v 1.17 2017/07/04 07:04:50 wiz Exp $ +.\" $NetBSD: tail.1,v 1.18 2017/10/01 20:49:24 maya Exp $ .\" .\" Copyright (c) 1980, 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -32,7 +32,7 @@ .\" .\" @(#)tail.1 8.1 (Berkeley) 6/6/93 .\" -.Dd June 15, 2014 +.Dd October 1, 2017 .Dt TAIL 1 .Os .Sh NAME @@ -43,7 +43,7 @@ .Oo .Fl f | .Fl F | -.Fl r +.Fl rqv .Oc .Oo .Fl b Ar number | @@ -133,12 +133,17 @@ The default for the option is to display all of the input. .El .Pp -If more than a single file is specified, each file is preceded by a +If more than a single file is specified, or the +.Fl v +option is
CVS commit: [netbsd-7-1] src/doc
Module Name:src Committed By: snj Date: Sun Oct 1 17:14:24 UTC 2017 Modified Files: src/doc [netbsd-7-1]: CHANGES-7.1.1 Log Message: 1512 To generate a diff of this commit: cvs rdiff -u -r1.1.2.33 -r1.1.2.34 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.33 src/doc/CHANGES-7.1.1:1.1.2.34 --- src/doc/CHANGES-7.1.1:1.1.2.33 Sun Sep 24 20:14:07 2017 +++ src/doc/CHANGES-7.1.1 Sun Oct 1 17:14:24 2017 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.1.1,v 1.1.2.33 2017/09/24 20:14:07 snj Exp $ +# $NetBSD: CHANGES-7.1.1,v 1.1.2.34 2017/10/01 17:14:24 snj Exp $ A complete list of changes from the NetBSD 7.1 release to the NetBSD 7.1.1 release: @@ -3673,3 +3673,8 @@ sys/arch/mips/mips/bds_emul.S 1.9 Make Malta work on real hardware again. [mrg, ticket #1500] +sys/arch/i386/i386/i386_trap.S 1.12 + + use %ss instead of %ds in trap06 + [maxv, ticket #1512] +
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: snj Date: Sun Oct 1 17:14:40 UTC 2017 Modified Files: src/doc [netbsd-7]: CHANGES-7.2 Log Message: 1501, 1502, 1512 To generate a diff of this commit: cvs rdiff -u -r1.1.2.48 -r1.1.2.49 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.48 src/doc/CHANGES-7.2:1.1.2.49 --- src/doc/CHANGES-7.2:1.1.2.48 Sun Sep 24 20:13:48 2017 +++ src/doc/CHANGES-7.2 Sun Oct 1 17:14:39 2017 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.2,v 1.1.2.48 2017/09/24 20:13:48 snj Exp $ +# $NetBSD: CHANGES-7.2,v 1.1.2.49 2017/10/01 17:14:39 snj Exp $ A complete list of changes from the NetBSD 7.1 release to the NetBSD 7.2 release: @@ -4690,3 +4690,18 @@ sys/arch/mips/mips/bds_emul.S 1.9 Make Malta work on real hardware again. [mrg, ticket #1500] +sys/arch/i386/i386/i386_trap.S 1.12 + + use %ss instead of %ds in trap06 + [maxv, ticket #1512] + +etc/MAKEDEV.tmpl1.186 via patch + + Create a device node for veriexec by default. + [sevan, ticket #1501] + +sys/dev/usb/usb.c1.166 + + Add a missing break that should've been included in 1.163. + [skrll, ticket #1502] +
CVS commit: [netbsd-7-0] src/doc
Module Name:src Committed By: snj Date: Sun Oct 1 17:14:14 UTC 2017 Modified Files: src/doc [netbsd-7-0]: CHANGES-7.0.3 Log Message: 1512 To generate a diff of this commit: cvs rdiff -u -r1.1.2.65 -r1.1.2.66 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.65 src/doc/CHANGES-7.0.3:1.1.2.66 --- src/doc/CHANGES-7.0.3:1.1.2.65 Sun Sep 24 20:13:59 2017 +++ src/doc/CHANGES-7.0.3 Sun Oct 1 17:14:14 2017 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.0.3,v 1.1.2.65 2017/09/24 20:13:59 snj Exp $ +# $NetBSD: CHANGES-7.0.3,v 1.1.2.66 2017/10/01 17:14:14 snj Exp $ A complete list of changes from the NetBSD 7.0.2 release to the NetBSD 7.0.3 release: @@ -4975,3 +4975,8 @@ sys/arch/mips/mips/bds_emul.S 1.9 Make Malta work on real hardware again. [mrg, ticket #1500] +sys/arch/i386/i386/i386_trap.S 1.12 + + use %ss instead of %ds in trap06 + [maxv, ticket #1512] +
CVS commit: [netbsd-7] src/sys/dev/usb
Module Name:src Committed By: snj Date: Sun Oct 1 17:12:41 UTC 2017 Modified Files: src/sys/dev/usb [netbsd-7]: usb.c Log Message: Pull up following revision(s) (requested by skrll in ticket #1502): sys/dev/usb/usb.c: revision 1.166 Add a missing break that should have been included in revision 1.163. Spotted by "sc dying" and reported on current-users To generate a diff of this commit: cvs rdiff -u -r1.154.2.2 -r1.154.2.3 src/sys/dev/usb/usb.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/usb.c diff -u src/sys/dev/usb/usb.c:1.154.2.2 src/sys/dev/usb/usb.c:1.154.2.3 --- src/sys/dev/usb/usb.c:1.154.2.2 Wed Apr 5 19:54:20 2017 +++ src/sys/dev/usb/usb.c Sun Oct 1 17:12:41 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: usb.c,v 1.154.2.2 2017/04/05 19:54:20 snj Exp $ */ +/* $NetBSD: usb.c,v 1.154.2.3 2017/10/01 17:12:41 snj Exp $ */ /* * Copyright (c) 1998, 2002, 2008, 2012 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.154.2.2 2017/04/05 19:54:20 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.154.2.3 2017/10/01 17:12:41 snj Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -775,6 +775,7 @@ usbioctl(dev_t devt, u_long cmd, void *d len = UGETW(ur->ucr_request.wLength); kmem_free(ptr, len); } + break; } case USB_DEVICEINFO:
CVS commit: [netbsd-7] src/etc
Module Name:src Committed By: snj Date: Sun Oct 1 17:07:04 UTC 2017 Modified Files: src/etc [netbsd-7]: MAKEDEV.tmpl Log Message: Pull up following revision(s) (requested by sevan in ticket #1501): etc/MAKEDEV.tmpl: revision 1.186 via patch veriexec is enabled by default in most kernel configs but the lack of device node results in a non working config, despite following manual to get setup. Remove a step for the user by creating a device node for veriexec by default. ok mrg jakllsch To generate a diff of this commit: cvs rdiff -u -r1.172.4.1 -r1.172.4.2 src/etc/MAKEDEV.tmpl Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/MAKEDEV.tmpl diff -u src/etc/MAKEDEV.tmpl:1.172.4.1 src/etc/MAKEDEV.tmpl:1.172.4.2 --- src/etc/MAKEDEV.tmpl:1.172.4.1 Mon Nov 16 14:38:03 2015 +++ src/etc/MAKEDEV.tmpl Sun Oct 1 17:07:04 2017 @@ -1,5 +1,5 @@ #!/bin/sh - -# $NetBSD: MAKEDEV.tmpl,v 1.172.4.1 2015/11/16 14:38:03 msaitoh Exp $ +# $NetBSD: MAKEDEV.tmpl,v 1.172.4.2 2017/10/01 17:07:04 snj Exp $ # # Copyright (c) 2003,2007,2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -839,6 +839,7 @@ all) makedev altmem makedev zfs makedev lua + makedev veriexec makedev local # do this last ;;
CVS commit: [netbsd-7-0] src/sys/arch/i386/i386
Module Name:src Committed By: snj Date: Sun Oct 1 17:01:44 UTC 2017 Modified Files: src/sys/arch/i386/i386 [netbsd-7-0]: i386_trap.S Log Message: Pull up following revision(s) (requested by maxv in ticket #1512): sys/arch/i386/i386/i386_trap.S: revision 1.12 Pfff, use %ss and not %ds. The latter is controlled by userland, the former contains the kernel value (flat); FreeBSD fixed this too a few weeks ago. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.5.12.1 src/sys/arch/i386/i386/i386_trap.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/i386/i386_trap.S diff -u src/sys/arch/i386/i386/i386_trap.S:1.5 src/sys/arch/i386/i386/i386_trap.S:1.5.12.1 --- src/sys/arch/i386/i386/i386_trap.S:1.5 Wed Feb 12 23:24:09 2014 +++ src/sys/arch/i386/i386/i386_trap.S Sun Oct 1 17:01:44 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: i386_trap.S,v 1.5 2014/02/12 23:24:09 dsl Exp $ */ +/* $NetBSD: i386_trap.S,v 1.5.12.1 2017/10/01 17:01:44 snj Exp $ */ /* * Copyright 2002 (c) Wasabi Systems, Inc. @@ -66,7 +66,7 @@ #if 0 #include -__KERNEL_RCSID(0, "$NetBSD: i386_trap.S,v 1.5 2014/02/12 23:24:09 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: i386_trap.S,v 1.5.12.1 2017/10/01 17:01:44 snj Exp $"); #endif /* @@ -119,7 +119,7 @@ IDTVEC_END(trap05) SUPERALIGN_TEXT IDTVEC(trap06) /* Check if there is no DTrace hook registered. */ - cmpl $0,dtrace_invop_jump_addr + cmpl $0,%ss:dtrace_invop_jump_addr je norm_ill /* Check if this is a user fault. */
CVS commit: [netbsd-7-1] src/sys/arch/i386/i386
Module Name:src Committed By: snj Date: Sun Oct 1 17:01:46 UTC 2017 Modified Files: src/sys/arch/i386/i386 [netbsd-7-1]: i386_trap.S Log Message: Pull up following revision(s) (requested by maxv in ticket #1512): sys/arch/i386/i386/i386_trap.S: revision 1.12 Pfff, use %ss and not %ds. The latter is controlled by userland, the former contains the kernel value (flat); FreeBSD fixed this too a few weeks ago. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.5.20.1 src/sys/arch/i386/i386/i386_trap.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/i386/i386_trap.S diff -u src/sys/arch/i386/i386/i386_trap.S:1.5 src/sys/arch/i386/i386/i386_trap.S:1.5.20.1 --- src/sys/arch/i386/i386/i386_trap.S:1.5 Wed Feb 12 23:24:09 2014 +++ src/sys/arch/i386/i386/i386_trap.S Sun Oct 1 17:01:45 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: i386_trap.S,v 1.5 2014/02/12 23:24:09 dsl Exp $ */ +/* $NetBSD: i386_trap.S,v 1.5.20.1 2017/10/01 17:01:45 snj Exp $ */ /* * Copyright 2002 (c) Wasabi Systems, Inc. @@ -66,7 +66,7 @@ #if 0 #include -__KERNEL_RCSID(0, "$NetBSD: i386_trap.S,v 1.5 2014/02/12 23:24:09 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: i386_trap.S,v 1.5.20.1 2017/10/01 17:01:45 snj Exp $"); #endif /* @@ -119,7 +119,7 @@ IDTVEC_END(trap05) SUPERALIGN_TEXT IDTVEC(trap06) /* Check if there is no DTrace hook registered. */ - cmpl $0,dtrace_invop_jump_addr + cmpl $0,%ss:dtrace_invop_jump_addr je norm_ill /* Check if this is a user fault. */
CVS commit: [netbsd-7] src/sys/arch/i386/i386
Module Name:src Committed By: snj Date: Sun Oct 1 17:01:47 UTC 2017 Modified Files: src/sys/arch/i386/i386 [netbsd-7]: i386_trap.S Log Message: Pull up following revision(s) (requested by maxv in ticket #1512): sys/arch/i386/i386/i386_trap.S: revision 1.12 Pfff, use %ss and not %ds. The latter is controlled by userland, the former contains the kernel value (flat); FreeBSD fixed this too a few weeks ago. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.5.6.1 src/sys/arch/i386/i386/i386_trap.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/i386/i386_trap.S diff -u src/sys/arch/i386/i386/i386_trap.S:1.5 src/sys/arch/i386/i386/i386_trap.S:1.5.6.1 --- src/sys/arch/i386/i386/i386_trap.S:1.5 Wed Feb 12 23:24:09 2014 +++ src/sys/arch/i386/i386/i386_trap.S Sun Oct 1 17:01:47 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: i386_trap.S,v 1.5 2014/02/12 23:24:09 dsl Exp $ */ +/* $NetBSD: i386_trap.S,v 1.5.6.1 2017/10/01 17:01:47 snj Exp $ */ /* * Copyright 2002 (c) Wasabi Systems, Inc. @@ -66,7 +66,7 @@ #if 0 #include -__KERNEL_RCSID(0, "$NetBSD: i386_trap.S,v 1.5 2014/02/12 23:24:09 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: i386_trap.S,v 1.5.6.1 2017/10/01 17:01:47 snj Exp $"); #endif /* @@ -119,7 +119,7 @@ IDTVEC_END(trap05) SUPERALIGN_TEXT IDTVEC(trap06) /* Check if there is no DTrace hook registered. */ - cmpl $0,dtrace_invop_jump_addr + cmpl $0,%ss:dtrace_invop_jump_addr je norm_ill /* Check if this is a user fault. */
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: snj Date: Sun Oct 1 16:45:00 UTC 2017 Modified Files: src/doc [netbsd-8]: CHANGES-8.0 Log Message: 295 To generate a diff of this commit: cvs rdiff -u -r1.1.2.61 -r1.1.2.62 src/doc/CHANGES-8.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-8.0 diff -u src/doc/CHANGES-8.0:1.1.2.61 src/doc/CHANGES-8.0:1.1.2.62 --- src/doc/CHANGES-8.0:1.1.2.61 Sun Oct 1 10:20:40 2017 +++ src/doc/CHANGES-8.0 Sun Oct 1 16:45:00 2017 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.0,v 1.1.2.61 2017/10/01 10:20:40 martin Exp $ +# $NetBSD: CHANGES-8.0,v 1.1.2.62 2017/10/01 16:45:00 snj Exp $ A complete list of changes from the initial NetBSD 8.0 branch on 2017-06-04 until the 8.0 release: @@ -6065,3 +6065,11 @@ sys/uvm/uvm_map.c1.352 Bruno Haible). [pgoyette, ticket #294] +lib/libpthread/pthread_attr.c 1.18 + + pthread__attr_init_private: + malloc+memset -> calloc. Also initialize all values to the proper + defaults. + This fixes the "rustc panic" discussed on pkgsrc-users. + [martin, ticket #295] +
CVS commit: [netbsd-8] src/lib/libpthread
Module Name:src Committed By: snj Date: Sun Oct 1 16:37:57 UTC 2017 Modified Files: src/lib/libpthread [netbsd-8]: pthread_attr.c Log Message: Pull up following revision(s) (requested by martin in ticket #295): lib/libpthread/pthread_attr.c: revision 1.18 pthread__attr_init_private: malloc+memset -> calloc. Also initialize all values to the proper defaults. This fixes the "rustc panic" discussed on pkgsrc-users. OK: joerg To generate a diff of this commit: cvs rdiff -u -r1.16.24.1 -r1.16.24.2 src/lib/libpthread/pthread_attr.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/libpthread/pthread_attr.c diff -u src/lib/libpthread/pthread_attr.c:1.16.24.1 src/lib/libpthread/pthread_attr.c:1.16.24.2 --- src/lib/libpthread/pthread_attr.c:1.16.24.1 Thu Aug 31 08:32:39 2017 +++ src/lib/libpthread/pthread_attr.c Sun Oct 1 16:37:57 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pthread_attr.c,v 1.16.24.1 2017/08/31 08:32:39 bouyer Exp $ */ +/* $NetBSD: pthread_attr.c,v 1.16.24.2 2017/10/01 16:37:57 snj Exp $ */ /*- * Copyright (c) 2001, 2002, 2003, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__RCSID("$NetBSD: pthread_attr.c,v 1.16.24.1 2017/08/31 08:32:39 bouyer Exp $"); +__RCSID("$NetBSD: pthread_attr.c,v 1.16.24.2 2017/10/01 16:37:57 snj Exp $"); #include #include @@ -58,11 +58,12 @@ pthread__attr_init_private(pthread_attr_ if ((p = attr->pta_private) != NULL) return p; - p = malloc(sizeof(*p)); + p = calloc(1, sizeof(*p)); if (p != NULL) { - memset(p, 0, sizeof(*p)); attr->pta_private = p; p->ptap_policy = SCHED_OTHER; + p->ptap_stacksize = pthread__stacksize; + p->ptap_guardsize = pthread__guardsize; } return p; }
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Sun Oct 1 15:05:10 UTC 2017 Modified Files: src/sys/arch/arm/sunxi: sunxi_emac.c sunxi_emac.h Log Message: Disable poorly implemented tx interrupt mitigation code, fix checksum offload support. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/sunxi/sunxi_emac.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/sunxi/sunxi_emac.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/sunxi/sunxi_emac.c diff -u src/sys/arch/arm/sunxi/sunxi_emac.c:1.7 src/sys/arch/arm/sunxi/sunxi_emac.c:1.8 --- src/sys/arch/arm/sunxi/sunxi_emac.c:1.7 Tue Sep 19 17:26:45 2017 +++ src/sys/arch/arm/sunxi/sunxi_emac.c Sun Oct 1 15:05:09 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_emac.c,v 1.7 2017/09/19 17:26:45 jmcneill Exp $ */ +/* $NetBSD: sunxi_emac.c,v 1.8 2017/10/01 15:05:09 jmcneill Exp $ */ /*- * Copyright (c) 2016-2017 Jared McNeill@@ -33,7 +33,7 @@ #include "opt_net_mpsafe.h" #include -__KERNEL_RCSID(0, "$NetBSD: sunxi_emac.c,v 1.7 2017/09/19 17:26:45 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunxi_emac.c,v 1.8 2017/10/01 15:05:09 jmcneill Exp $"); #include #include @@ -95,7 +95,6 @@ __KERNEL_RCSID(0, "$NetBSD: sunxi_emac.c #define BURST_LEN_DEFAULT 8 #define RX_TX_PRI_DEFAULT 0 #define PAUSE_TIME_DEFAULT 0x400 -#define TX_INTERVAL_DEFAULT 64 /* syscon EMAC clock register */ #define EMAC_CLK_EPHY_ADDR (0x1f << 20) /* H3 */ @@ -125,9 +124,6 @@ static int sunxi_emac_rx_tx_pri = RX_TX_ /* Pause time field in the transmitted control frame */ static int sunxi_emac_pause_time = PAUSE_TIME_DEFAULT; -/* Request a TX interrupt every descriptors */ -static int sunxi_emac_tx_interval = TX_INTERVAL_DEFAULT; - enum sunxi_emac_type { EMAC_A83T = 1, EMAC_H3, @@ -337,8 +333,6 @@ sunxi_emac_setup_txdesc(struct sunxi_ema } else { status = TX_DESC_CTL; size = flags | len; - if ((index & (sunxi_emac_tx_interval - 1)) == 0) - size |= TX_INT_CTL; ++sc->tx.queued; } @@ -380,7 +374,7 @@ sunxi_emac_setup_txbuf(struct sunxi_emac for (cur = index, i = 0; i < nsegs; i++) { sc->tx.buf_map[cur].mbuf = (i == 0 ? m : NULL); if (i == nsegs - 1) - flags |= TX_LAST_DESC; + flags |= TX_LAST_DESC | TX_INT_CTL; sunxi_emac_setup_txdesc(sc, cur, flags, segs[i].ds_addr, segs[i].ds_len); @@ -740,15 +734,14 @@ sunxi_emac_rxintr(struct sunxi_emac_soft if ((ifp->if_capenable & IFCAP_CSUM_IPv4_Rx) != 0 && (status & RX_FRM_TYPE) != 0) { -m->m_pkthdr.csum_flags = M_CSUM_IPv4; +m->m_pkthdr.csum_flags = M_CSUM_IPv4 | +M_CSUM_TCPv4 | M_CSUM_UDPv4; if ((status & RX_HEADER_ERR) != 0) m->m_pkthdr.csum_flags |= M_CSUM_IPv4_BAD; -if ((status & RX_PAYLOAD_ERR) == 0) { +if ((status & RX_PAYLOAD_ERR) != 0) m->m_pkthdr.csum_flags |= - M_CSUM_DATA; - m->m_pkthdr.csum_data = 0x; -} + M_CSUM_TCP_UDP_BAD; } ++npkt; Index: src/sys/arch/arm/sunxi/sunxi_emac.h diff -u src/sys/arch/arm/sunxi/sunxi_emac.h:1.3 src/sys/arch/arm/sunxi/sunxi_emac.h:1.4 --- src/sys/arch/arm/sunxi/sunxi_emac.h:1.3 Sat Sep 30 10:29:10 2017 +++ src/sys/arch/arm/sunxi/sunxi_emac.h Sun Oct 1 15:05:09 2017 @@ -47,24 +47,39 @@ #define BASIC_CTL_RX_TX_PRI (1 << 1) #define BASIC_CTL_SOFT_RST (1 << 0) #define EMAC_INT_STA 0x08 -#define RX_BUF_UA_INT (1 << 10) +#define RGMII_LINK_STA_INT (1 << 16) +#define RX_EARLY_INT (1 << 13) +#define RX_OVERFLOW_INT (1 << 12) +#define RX_TIMEOUT_INT (1 << 11) +#define RX_DMA_STOPPED_INT (1 << 10) +#define RX_BUF_UA_INT (1 << 9) #define RX_INT (1 << 8) +#define TX_EARLY_INT (1 << 5) #define TX_UNDERFLOW_INT (1 << 4) +#define TX_TIMEOUT_INT (1 << 3) #define TX_BUF_UA_INT (1 << 2) #define TX_DMA_STOPPED_INT (1 << 1) #define TX_INT (1 << 0) #define EMAC_INT_EN 0x0c -#define RX_BUF_UA_INT_EN (1 << 10) +#define RX_EARLY_INT_EN (1 << 13) +#define RX_OVERFLOW_INT_EN (1 << 12) +#define RX_TIMEOUT_INT_EN (1 << 11) +#define RX_DMA_STOPPED_INT_EN (1 << 10) +#define RX_BUF_UA_INT_EN (1 << 9) #define RX_INT_EN (1 << 8) +#define TX_EARLY_INT_EN (1 << 5) #define TX_UNDERFLOW_INT_EN (1 << 4) +#define TX_TIMEOUT_INT_EN (1 << 3) #define TX_BUF_UA_INT_EN (1 << 2) #define TX_DMA_STOPPED_INT_EN (1 << 1) #define TX_INT_EN (1 << 0) #define EMAC_TX_CTL_0 0x10 #define TX_EN (1 << 31) +#define TX_FRM_LEN_CTL (1 << 30) #define EMAC_TX_CTL_1 0x14 #define TX_DMA_START (1 << 31) #define TX_DMA_EN (1 << 30) +#define TX_TH (0x7 << 8) #define TX_NEXT_FRAME (1 << 2) #define TX_MD (1 << 1) #define FLUSH_TX_FIFO (1 << 0) @@ -75,14 +90,23 @@ #define EMAC_TX_DMA_LIST 0x20 #define EMAC_RX_CTL_0 0x24 #define RX_EN (1 << 31) +#define RX_FRM_LEN_CTL (1 << 30) #define JUMBO_FRM_EN (1 << 29) #define STRIP_FCS (1 << 28) #define
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Sun Oct 1 10:45:49 UTC 2017 Modified Files: src/sys/arch/evbarm/conf: SUNXI Log Message: Shuffle attach order so CCUs attach before GPIO controllers To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/arch/evbarm/conf/SUNXI 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/SUNXI diff -u src/sys/arch/evbarm/conf/SUNXI:1.31 src/sys/arch/evbarm/conf/SUNXI:1.32 --- src/sys/arch/evbarm/conf/SUNXI:1.31 Sat Sep 30 12:49:21 2017 +++ src/sys/arch/evbarm/conf/SUNXI Sun Oct 1 10:45:49 2017 @@ -1,5 +1,5 @@ # -# $NetBSD: SUNXI,v 1.31 2017/09/30 12:49:21 jmcneill Exp $ +# $NetBSD: SUNXI,v 1.32 2017/10/01 10:45:49 jmcneill Exp $ # # Allwinner sunxi family # @@ -95,12 +95,12 @@ cpu* at cpus? psci* at fdt? # Clock and reset controllers -sun5ia13ccu* at fdt? pass 4 # A13 CCU -sun6ia31ccu* at fdt? pass 4 # A31 CCU -sun8ia83tccu* at fdt? pass 4 # A83T CCU -sun8ih3ccu* at fdt? pass 4 # H3 CCU -sun8ih3rccu* at fdt? pass 4 # H3 CCU (PRCM) -sun50ia64ccu* at fdt? pass 4 # A64 CCU +sun5ia13ccu* at fdt? pass 2 # A13 CCU +sun6ia31ccu* at fdt? pass 2 # A31 CCU +sun8ia83tccu* at fdt? pass 2 # A83T CCU +sun8ih3ccu* at fdt? pass 2 # H3 CCU +sun8ih3rccu* at fdt? pass 2 # H3 CCU (PRCM) +sun50ia64ccu* at fdt? pass 2 # A64 CCU sunxiresets* at fdt? pass 1 # Misc. clock resets sunxigates* at fdt? pass 1 # Misc. clock gates @@ -133,7 +133,7 @@ sun6idma* at fdt? # DMA controller (su # Clock and Reset controller # GPIO controller -sunxigpio* at fdt? pass 2 # GPIO +sunxigpio* at fdt? pass 3 # GPIO gpio* at gpiobus? # Ethernet
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Sun Oct 1 10:20:40 UTC 2017 Modified Files: src/doc [netbsd-8]: CHANGES-8.0 Log Message: Ticket #294 To generate a diff of this commit: cvs rdiff -u -r1.1.2.60 -r1.1.2.61 src/doc/CHANGES-8.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-8.0 diff -u src/doc/CHANGES-8.0:1.1.2.60 src/doc/CHANGES-8.0:1.1.2.61 --- src/doc/CHANGES-8.0:1.1.2.60 Thu Sep 28 01:19:22 2017 +++ src/doc/CHANGES-8.0 Sun Oct 1 10:20:40 2017 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.0,v 1.1.2.60 2017/09/28 01:19:22 snj Exp $ +# $NetBSD: CHANGES-8.0,v 1.1.2.61 2017/10/01 10:20:40 martin Exp $ A complete list of changes from the initial NetBSD 8.0 branch on 2017-06-04 until the 8.0 release: @@ -6059,3 +6059,9 @@ sys/dev/usb/if_athn_usb.c 1.23 athn_usb_alloc_tx_list [skrll, ticket #293] +sys/uvm/uvm_map.c1.352 + + Fix user-triggerable kernel crash as reported in PR kern/52573 (from + Bruno Haible). + [pgoyette, ticket #294] +
CVS commit: [netbsd-8] src/sys/uvm
Module Name:src Committed By: martin Date: Sun Oct 1 10:20:03 UTC 2017 Modified Files: src/sys/uvm [netbsd-8]: uvm_map.c Log Message: Pull up following revision(s) (requested by pgoyette in ticket #294): sys/uvm/uvm_map.c: revision 1.352 Fix user-triggerable kernel crash as reported in PR kern/52573 (from Bruno Haible). To generate a diff of this commit: cvs rdiff -u -r1.351 -r1.351.2.1 src/sys/uvm/uvm_map.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/uvm/uvm_map.c diff -u src/sys/uvm/uvm_map.c:1.351 src/sys/uvm/uvm_map.c:1.351.2.1 --- src/sys/uvm/uvm_map.c:1.351 Tue May 30 17:09:17 2017 +++ src/sys/uvm/uvm_map.c Sun Oct 1 10:20:03 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_map.c,v 1.351 2017/05/30 17:09:17 chs Exp $ */ +/* $NetBSD: uvm_map.c,v 1.351.2.1 2017/10/01 10:20:03 martin Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.351 2017/05/30 17:09:17 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.351.2.1 2017/10/01 10:20:03 martin Exp $"); #include "opt_ddb.h" #include "opt_pax.h" @@ -4991,7 +4991,7 @@ fill_vmentries(struct lwp *l, pid_t pid, vme = kmem_alloc(vmesize, KM_SLEEP); for (entry = map->header.next; entry != >header; entry = entry->next) { - if (oldp && (dp - (char *)oldp) < *oldlenp) { + if (oldp && (dp - (char *)oldp) < vmesize) { error = fill_vmentry(l, p, [count], map, entry); if (error) goto out; @@ -5009,7 +5009,7 @@ out: const u_int esize = min(sizeof(*vme), elem_size); dp = oldp; for (size_t i = 0; i < count; i++) { - if (oldp && (dp - (char *)oldp) < *oldlenp) { + if (oldp && (dp - (char *)oldp) < vmesize) { error = sysctl_copyout(l, [i], dp, esize); if (error) break;
CVS commit: src/sys/netipsec
Module Name:src Committed By: ryoon Date: Sun Oct 1 09:45:16 UTC 2017 Modified Files: src/sys/netipsec: key.c Log Message: Fix typo in comment To generate a diff of this commit: cvs rdiff -u -r1.230 -r1.231 src/sys/netipsec/key.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/netipsec/key.c diff -u src/sys/netipsec/key.c:1.230 src/sys/netipsec/key.c:1.231 --- src/sys/netipsec/key.c:1.230 Sat Sep 30 21:47:12 2017 +++ src/sys/netipsec/key.c Sun Oct 1 09:45:16 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: key.c,v 1.230 2017/09/30 21:47:12 christos Exp $ */ +/* $NetBSD: key.c,v 1.231 2017/10/01 09:45:16 ryoon Exp $ */ /* $FreeBSD: src/sys/netipsec/key.c,v 1.3.2.3 2004/02/14 22:23:23 bms Exp $ */ /* $KAME: key.c,v 1.191 2001/06/27 10:46:49 sakane Exp $ */ @@ -32,10 +32,10 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.230 2017/09/30 21:47:12 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.231 2017/10/01 09:45:16 ryoon Exp $"); /* - * This code is referd to RFC 2367 + * This code is referred to RFC 2367 */ #if defined(_KERNEL_OPT)
CVS commit: src/sbin/resize_ffs
Module Name:src Committed By: mlelstv Date: Sun Oct 1 07:18:39 UTC 2017 Modified Files: src/sbin/resize_ffs: resize_ffs.c Log Message: - More fixes to use 64bit offsets. - Compute left-over fragments also for FFS2. To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/sbin/resize_ffs/resize_ffs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/resize_ffs/resize_ffs.c diff -u src/sbin/resize_ffs/resize_ffs.c:1.50 src/sbin/resize_ffs/resize_ffs.c:1.51 --- src/sbin/resize_ffs/resize_ffs.c:1.50 Sat Sep 30 18:32:52 2017 +++ src/sbin/resize_ffs/resize_ffs.c Sun Oct 1 07:18:39 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: resize_ffs.c,v 1.50 2017/09/30 18:32:52 kre Exp $ */ +/* $NetBSD: resize_ffs.c,v 1.51 2017/10/01 07:18:39 mlelstv Exp $ */ /* From sources sent on February 17, 2003 */ /*- * As its sole author, I explicitly place this code in the public @@ -36,7 +36,7 @@ */ #include -__RCSID("$NetBSD: resize_ffs.c,v 1.50 2017/09/30 18:32:52 kre Exp $"); +__RCSID("$NetBSD: resize_ffs.c,v 1.51 2017/10/01 07:18:39 mlelstv Exp $"); #include #include @@ -478,7 +478,7 @@ initcg(int cgn) dmax = newsb->fs_size - base; if (dmax > newsb->fs_fpg) dmax = newsb->fs_fpg; - start = >cg_space[0] - (unsigned char *) cg; + start = (unsigned char *)>cg_space[0] - (unsigned char *) cg; /* * Clear out the cg - assumes all-0-bytes is the correct way * to initialize fields we don't otherwise touch, which is @@ -606,13 +606,11 @@ initcg(int cgn) dhigh += newsb->fs_frag; } } - if (is_ufs2 == 0) { - /* Deal with any leftover frag at the end of the cg. */ - i = dmax - dhigh; - if (i) { - cg->cg_frsum[i]++; - cg->cg_cs.cs_nffree += i; - } + /* Deal with any leftover frag at the end of the cg. */ + i = dmax - dhigh; + if (i) { + cg->cg_frsum[i]++; + cg->cg_cs.cs_nffree += i; } /* Update the csum info. */ csums[cgn] = cg->cg_cs; @@ -1049,9 +1047,9 @@ grow(void) * last cg (though possibly not to a full cg!). */ if (oldsb->fs_size % oldsb->fs_fpg) { struct cg *cg; - int newcgsize; - int prevcgtop; - int oldcgsize; + int64_t newcgsize; + int64_t prevcgtop; + int64_t oldcgsize; cg = cgs[oldsb->fs_ncg - 1]; cgflags[oldsb->fs_ncg - 1] |= CGF_DIRTY | CGF_BLKMAPS; prevcgtop = oldsb->fs_fpg * (oldsb->fs_ncg - 1); @@ -1124,13 +1122,12 @@ markblk(mark_callback_t fn, union dinode * Returns the number of bytes occupied in file, as does markblk(). * For the sake of update_for_data_move(), we read the indirect block * _after_ making the _PRE callback. The name is historical. */ -static int +static off_t markiblk(mark_callback_t fn, union dinode * di, off_t bn, off_t o, int lev) { int i; - int j; unsigned k; - int tot; + off_t j, tot; static int32_t indirblk1[howmany(MAXBSIZE, sizeof(int32_t))]; static int32_t indirblk2[howmany(MAXBSIZE, sizeof(int32_t))]; static int32_t indirblk3[howmany(MAXBSIZE, sizeof(int32_t))]; @@ -1141,10 +1138,10 @@ markiblk(mark_callback_t fn, union dinod if (lev < 0) return (markblk(fn, di, bn, o)); if (bn == 0) { - for (i = newsb->fs_bsize; + for (j = newsb->fs_bsize; lev >= 0; - i *= FFS_NINDIR(newsb), lev--); - return (i); + j *= FFS_NINDIR(newsb), lev--); + return (j); } (*fn) (bn, newsb->fs_frag, newsb->fs_bsize, MDB_INDIR_PRE); readat(FFS_FSBTODB(newsb, bn), indirblks[lev], newsb->fs_bsize); @@ -1180,7 +1177,7 @@ static void map_inode_data_blocks(union dinode * di, mark_callback_t fn) { off_t o; /* offset within inode */ - int inc; /* increment for o - maybe should be off_t? */ + off_t inc; /* increment for o */ int b; /* index within di_db[] and di_ib[] arrays */ /* Scan the direct blocks... */ @@ -1329,7 +1326,7 @@ mark_move(unsigned int from, unsigned in * each block of consecutive allocated frags is moved as a unit. */ static void -fragmove(struct cg * cg, int base, unsigned int start, unsigned int n) +fragmove(struct cg * cg, int64_t base, unsigned int start, unsigned int n) { unsigned int i; int run;