CVS commit: src/sys/dev/pci/ixgbe

2017-02-15 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Feb 16 07:58:21 UTC 2017

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
 txt_si softint is used only for multiqueue (ixgbe_mq_start_locked()), so don't
schedule it in ixgbe_legacy_irq().


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.76 src/sys/dev/pci/ixgbe/ixgbe.c:1.77
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.76	Mon Feb 13 10:37:37 2017
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Thu Feb 16 07:58:21 2017
@@ -59,7 +59,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 /*$FreeBSD: head/sys/dev/ixgbe/if_ix.c 302384 2016-07-07 03:39:18Z sbruno $*/
-/*$NetBSD: ixgbe.c,v 1.76 2017/02/13 10:37:37 msaitoh Exp $*/
+/*$NetBSD: ixgbe.c,v 1.77 2017/02/16 07:58:21 msaitoh Exp $*/
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
@@ -1648,11 +1648,7 @@ ixgbe_legacy_irq(void *arg)
 		softint_schedule(adapter->phy_si);
 
 	if (more)
-#ifndef IXGBE_LEGACY_TX
-		softint_schedule(txr->txr_si);
-#else
 		softint_schedule(que->que_si);
-#endif
 	else
 		ixgbe_enable_intr(adapter);
 	return 1;



CVS commit: src/sys/dev/pci

2017-02-15 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Thu Feb 16 05:36:41 UTC 2017

Modified Files:
src/sys/dev/pci: if_wm.c

Log Message:
fix about IFF_OACTIVE.

It is required manipulate IFF_OACTIVE for old ethernet controllers and ALTQ
to use if_start. To avoid race, txq_lock of 0th txq is needed to write
IFF_OACTIVE.

TODO: read side refactor


To generate a diff of this commit:
cvs rdiff -u -r1.478 -r1.479 src/sys/dev/pci/if_wm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.478 src/sys/dev/pci/if_wm.c:1.479
--- src/sys/dev/pci/if_wm.c:1.478	Mon Feb 13 05:02:21 2017
+++ src/sys/dev/pci/if_wm.c	Thu Feb 16 05:36:41 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.478 2017/02/13 05:02:21 knakahara Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.479 2017/02/16 05:36:41 knakahara Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -84,7 +84,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.478 2017/02/13 05:02:21 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.479 2017/02/16 05:36:41 knakahara Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -6522,11 +6522,15 @@ wm_send_common_locked(struct ifnet *ifp,
 	bus_size_t seglen, curlen;
 	uint32_t cksumcmd;
 	uint8_t cksumfields;
+	struct wm_queue *wmq = container_of(txq, struct wm_queue, wmq_txq);
+	int qid = wmq->wmq_id;
 
 	KASSERT(mutex_owned(txq->txq_lock));
 
 	if ((ifp->if_flags & (IFF_RUNNING | IFF_OACTIVE)) != IFF_RUNNING)
 		return;
+	if ((txq->txq_flags & WM_TXQ_NO_SPACE) != 0)
+		return;
 
 	/* Remember the previous number of free descriptors. */
 	ofree = txq->txq_free;
@@ -6635,7 +6639,9 @@ wm_send_common_locked(struct ifnet *ifp,
 			("%s: TX: need %d (%d) descriptors, have %d\n",
 			device_xname(sc->sc_dev), dmamap->dm_nsegs,
 			segs_needed, txq->txq_free - 1));
-			ifp->if_flags |= IFF_OACTIVE;
+			if (qid == 0)
+ifp->if_flags |= IFF_OACTIVE;
+			txq->txq_flags |= WM_TXQ_NO_SPACE;
 			bus_dmamap_unload(sc->sc_dmat, dmamap);
 			WM_Q_EVCNT_INCR(txq, txdstall);
 			break;
@@ -6651,7 +6657,9 @@ wm_send_common_locked(struct ifnet *ifp,
 			DPRINTF(WM_DEBUG_TX,
 			("%s: TX: 82547 Tx FIFO bug detected\n",
 			device_xname(sc->sc_dev)));
-			ifp->if_flags |= IFF_OACTIVE;
+			if (qid == 0)
+ifp->if_flags |= IFF_OACTIVE;
+			txq->txq_flags |= WM_TXQ_NO_SPACE;
 			bus_dmamap_unload(sc->sc_dmat, dmamap);
 			WM_Q_EVCNT_INCR(txq, txfifo_stall);
 			break;
@@ -6795,7 +6803,9 @@ wm_send_common_locked(struct ifnet *ifp,
 	}
 
 	if (m0 != NULL) {
-		ifp->if_flags |= IFF_OACTIVE;
+		if (qid == 0)
+			ifp->if_flags |= IFF_OACTIVE;
+		txq->txq_flags |= WM_TXQ_NO_SPACE;
 		WM_Q_EVCNT_INCR(txq, txdrop);
 		DPRINTF(WM_DEBUG_TX, ("%s: TX: error after IFQ_DEQUEUE\n",
 			__func__));
@@ -6804,7 +6814,9 @@ wm_send_common_locked(struct ifnet *ifp,
 
 	if (txq->txq_sfree == 0 || txq->txq_free <= 2) {
 		/* No more slots; notify upper layer. */
-		ifp->if_flags |= IFF_OACTIVE;
+		if (qid == 0)
+			ifp->if_flags |= IFF_OACTIVE;
+		txq->txq_flags |= WM_TXQ_NO_SPACE;
 	}
 
 	if (txq->txq_free != ofree) {
@@ -7103,6 +7115,8 @@ wm_nq_send_common_locked(struct ifnet *i
 	bus_dmamap_t dmamap;
 	int error, nexttx, lasttx = -1, seg, segs_needed;
 	bool do_csum, sent;
+	struct wm_queue *wmq = container_of(txq, struct wm_queue, wmq_txq);
+	int qid = wmq->wmq_id;
 
 	KASSERT(mutex_owned(txq->txq_lock));
 
@@ -7196,6 +7210,8 @@ wm_nq_send_common_locked(struct ifnet *i
 			("%s: TX: need %d (%d) descriptors, have %d\n",
 			device_xname(sc->sc_dev), dmamap->dm_nsegs,
 			segs_needed, txq->txq_free - 1));
+			if (qid == 0)
+ifp->if_flags |= IFF_OACTIVE;
 			txq->txq_flags |= WM_TXQ_NO_SPACE;
 			bus_dmamap_unload(sc->sc_dmat, dmamap);
 			WM_Q_EVCNT_INCR(txq, txdstall);
@@ -7353,6 +7369,8 @@ wm_nq_send_common_locked(struct ifnet *i
 	}
 
 	if (m0 != NULL) {
+		if (qid == 0)
+			ifp->if_flags |= IFF_OACTIVE;
 		txq->txq_flags |= WM_TXQ_NO_SPACE;
 		WM_Q_EVCNT_INCR(txq, txdrop);
 		DPRINTF(WM_DEBUG_TX, ("%s: TX: error after IFQ_DEQUEUE\n",
@@ -7362,6 +7380,8 @@ wm_nq_send_common_locked(struct ifnet *i
 
 	if (txq->txq_sfree == 0 || txq->txq_free <= 2) {
 		/* No more slots; notify upper layer. */
+		if (qid == 0)
+			ifp->if_flags |= IFF_OACTIVE;
 		txq->txq_flags |= WM_TXQ_NO_SPACE;
 	}
 
@@ -7430,15 +7450,16 @@ wm_txeof(struct wm_softc *sc, struct wm_
 	int count = 0;
 	int i;
 	uint8_t status;
+	struct wm_queue *wmq = container_of(txq, struct wm_queue, wmq_txq);
 
 	KASSERT(mutex_owned(txq->txq_lock));
 
 	if (txq->txq_stopping)
 		return 0;
 
-	if ((sc->sc_flags & WM_F_NEWQUEUE) != 0)
-		txq->txq_flags &= ~WM_TXQ_NO_SPACE;
-	else
+	txq->txq_flags &= ~WM_TXQ_NO_SPACE;
+	/* for ALTQ and legacy(not use multiqueue) ethernet controller */
+	if (wmq->wmq_id == 0)
 		ifp->if_flags &= ~IFF_OACTIVE;
 
 	/*



CVS commit: src/sys/arch/x86/x86

2017-02-15 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Thu Feb 16 03:53:20 UTC 2017

Modified Files:
src/sys/arch/x86/x86: efi.c

Log Message:
Quell maybe-uninitialized false positives from gcc -Os.

reported by John D. Baker at current-users@.
http://mail-index.netbsd.org/current-users/2017/02/15/msg031132.html


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/x86/x86/efi.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/efi.c
diff -u src/sys/arch/x86/x86/efi.c:1.8 src/sys/arch/x86/x86/efi.c:1.9
--- src/sys/arch/x86/x86/efi.c:1.8	Tue Feb 14 13:29:09 2017
+++ src/sys/arch/x86/x86/efi.c	Thu Feb 16 03:53:20 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: efi.c,v 1.8 2017/02/14 13:29:09 nonaka Exp $	*/
+/*	$NetBSD: efi.c,v 1.9 2017/02/16 03:53:20 nonaka Exp $	*/
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: efi.c,v 1.8 2017/02/14 13:29:09 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: efi.c,v 1.9 2017/02/16 03:53:20 nonaka Exp $");
 
 #include 
 #include 
@@ -368,7 +368,8 @@ efi_get_e820memmap(void)
 	struct bi_memmap_entry *entry;
 	struct efi_md *md;
 	uint64_t addr, size;
-	uint64_t start_addr, end_addr;
+	uint64_t start_addr = 0;/* XXX gcc -Os: maybe-uninitialized */
+	uint64_t end_addr = 0;  /* XXX gcc -Os: maybe-uninitialized */
 	uint32_t i;
 	int n, type, seg_type = -1;
 



CVS commit: src/distrib/amd64/uefi-installimage

2017-02-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Feb 16 03:47:23 UTC 2017

Modified Files:
src/distrib/amd64/uefi-installimage: Makefile.bootimage

Log Message:
Add ${GPT_TIMESTAMP}


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/distrib/amd64/uefi-installimage/Makefile.bootimage

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/amd64/uefi-installimage/Makefile.bootimage
diff -u src/distrib/amd64/uefi-installimage/Makefile.bootimage:1.5 src/distrib/amd64/uefi-installimage/Makefile.bootimage:1.6
--- src/distrib/amd64/uefi-installimage/Makefile.bootimage:1.5	Sat Feb 11 03:14:05 2017
+++ src/distrib/amd64/uefi-installimage/Makefile.bootimage	Wed Feb 15 22:47:23 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootimage,v 1.5 2017/02/11 08:14:05 pgoyette Exp $
+#	$NetBSD: Makefile.bootimage,v 1.6 2017/02/16 03:47:23 christos Exp $
 #
 # Copyright (c) 2009, 2010, 2011 Izumi Tsutsui.  All rights reserved.
 #
@@ -138,6 +138,7 @@
 
 .if ${MKREPRO_TIMESTAMP:Uno} != "no"
 MAKEFS_TIMESTAMP=-T "${MKREPRO_TIMESTAMP}"
+GPT_TIMESTAMP=-T "${MKREPRO_TIMESTAMP}"
 PAX_TIMESTAMP=--timestamp "${MKREPRO_TIMESTAMP}"
 .endif
 
@@ -214,8 +215,8 @@ BSDPARTSECTORS!= expr ${IMAGESECTORS} - 
 FSOFFSET!=	expr ${LABELSECTORS} + ${EFISECTORS}
 SWAPOFFSET!=	expr ${LABELSECTORS} + ${FSSECTORS} + ${EFISECTORS}
 
-BOOTDISK_UUID=`${TOOL_GPT} ${WORKMBR} show -i 2 | awk '/^GUID/ {print $$2}'`
-SWAPDISK_UUID=`${TOOL_GPT} ${WORKMBR} show -i 3 | awk '/^GUID/ {print $$2}'`
+BOOTDISK_UUID=`${TOOL_GPT} ${GPT_TIMESSTAMP} ${WORKMBR} show -i 2 | awk '/^GUID/ {print $$2}'`
+SWAPDISK_UUID=`${TOOL_GPT} ${GPT_TIMESSTAMP} ${WORKMBR} show -i 3 | awk '/^GUID/ {print $$2}'`
 .endif
 
 #
@@ -397,11 +398,11 @@ pre-targetfs:
 	@echo creating GPT header and partition entries...
 	${RM} -f ${WORKMBR}
 	${DD} if=/dev/zero of=${WORKMBR} seek=$$((${IMAGESECTORS} - 1)) count=1
-	${TOOL_GPT} ${WORKMBR} create
-	${TOOL_GPT} ${WORKMBR} add -a 1m -s ${EFISECTORS} -t efi -l "EFI system"
-	${TOOL_GPT} ${WORKMBR} add -a 1m -s ${FSSECTORS} -t ffs
+	${TOOL_GPT} ${GPT_TIMESSTAMP} ${WORKMBR} create
+	${TOOL_GPT} ${GPT_TIMESSTAMP} ${WORKMBR} add -a 1m -s ${EFISECTORS} -t efi -l "EFI system"
+	${TOOL_GPT} ${GPT_TIMESSTAMP} ${WORKMBR} add -a 1m -s ${FSSECTORS} -t ffs
 .if ${OMIT_SWAPIMG} == "no"
-	${TOOL_GPT} ${WORKMBR} add -a 1m -s ${SWAPSECTORS} -t swap
+	${TOOL_GPT} ${GPT_TIMESSTAMP} ${WORKMBR} add -a 1m -s ${SWAPSECTORS} -t swap
 .endif
 
 ${IMGBASE}.img:	${TARGETFS}
@@ -423,9 +424,9 @@ ${IMGBASE}.img:	${TARGETFS}
 	count=2048
 	${DD} if=${WORKMBR} count=${LABELSECTORS} |			\
 	${CAT} - ${WORKEFI} ${TARGETFS} ${WORKGPT} > ${WORKIMG}
-	${TOOL_GPT} ${WORKIMG} biosboot -i 2\
+	${TOOL_GPT} ${GPT_TIMESSTAMP} ${WORKIMG} biosboot -i 2\
 	-c ${.OBJDIR}/${WORKDIR}/usr/mdec/gptmbr.bin
-	${TOOL_GPT} ${WORKIMG} set -a bootme -i 2
+	${TOOL_GPT} ${GPT_TIMESSTAMP} ${WORKIMG} set -a bootme -i 2
 .else	# USE_GPT == "no"
 ${IMGBASE}.img:	${TARGETFS} ${WORKLABEL}
 .if ${USE_MBR} != "no"



CVS commit: src/sbin/gpt

2017-02-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Feb 16 03:32:17 UTC 2017

Modified Files:
src/sbin/gpt: biosboot.c gpt.8 gpt.c gpt.h gpt_private.h gpt_uuid.c
main.c

Log Message:
Add -T timestamp for reproducible builds.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sbin/gpt/biosboot.c
cvs rdiff -u -r1.51 -r1.52 src/sbin/gpt/gpt.8
cvs rdiff -u -r1.69 -r1.70 src/sbin/gpt/gpt.c
cvs rdiff -u -r1.33 -r1.34 src/sbin/gpt/gpt.h
cvs rdiff -u -r1.1 -r1.2 src/sbin/gpt/gpt_private.h
cvs rdiff -u -r1.13 -r1.14 src/sbin/gpt/gpt_uuid.c
cvs rdiff -u -r1.8 -r1.9 src/sbin/gpt/main.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/gpt/biosboot.c
diff -u src/sbin/gpt/biosboot.c:1.26 src/sbin/gpt/biosboot.c:1.27
--- src/sbin/gpt/biosboot.c:1.26	Thu Jun  9 15:04:43 2016
+++ src/sbin/gpt/biosboot.c	Wed Feb 15 22:32:17 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: biosboot.c,v 1.26 2016/06/09 19:04:43 christos Exp $ */
+/*	$NetBSD: biosboot.c,v 1.27 2017/02/16 03:32:17 christos Exp $ */
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
 
 #include 
 #ifdef __RCSID
-__RCSID("$NetBSD: biosboot.c,v 1.26 2016/06/09 19:04:43 christos Exp $");
+__RCSID("$NetBSD: biosboot.c,v 1.27 2017/02/16 03:32:17 christos Exp $");
 #endif
 
 #include 
@@ -298,7 +298,7 @@ cmd_biosboot(gpt_t gpt, int argc, char *
 		start = dkw.dkw_offset;
 		size = dkw.dkw_size;
 		ngpt = gpt_open(dkw.dkw_parent, gpt->flags, gpt->verbose,
-		gpt->mediasz, gpt->secsz);
+		gpt->mediasz, gpt->secsz, gpt->timestamp);
 		if (ngpt == NULL)
 			goto cleanup;
 	}

Index: src/sbin/gpt/gpt.8
diff -u src/sbin/gpt/gpt.8:1.51 src/sbin/gpt/gpt.8:1.52
--- src/sbin/gpt/gpt.8:1.51	Fri Jan 27 05:21:16 2017
+++ src/sbin/gpt/gpt.8	Wed Feb 15 22:32:17 2017
@@ -1,4 +1,4 @@
-.\" $NetBSD: gpt.8,v 1.51 2017/01/27 10:21:16 abhinav Exp $
+.\" $NetBSD: gpt.8,v 1.52 2017/02/16 03:32:17 christos Exp $
 .\"
 .\" Copyright (c) 2002 Marcel Moolenaar
 .\" All rights reserved.
@@ -26,7 +26,7 @@
 .\"
 .\" $FreeBSD: src/sbin/gpt/gpt.8,v 1.17 2006/06/22 22:22:32 marcel Exp $
 .\"
-.Dd November 1, 2016
+.Dd February 15, 2017
 .Dt GPT 8
 .Os
 .Sh NAME
@@ -37,6 +37,7 @@
 .Op Fl nrqv
 .Op Fl m Ar mediasize
 .Op Fl s Ar sectorsize
+.Op Fl T Ar timestamp
 .Ar command
 .Op Ar command_options
 .Ar device
@@ -94,6 +95,13 @@ Override the default sector size for the
 from the kernel if possible) or
 .Dv 512
 for plain files.
+.It Fl T Ar timestamp
+Specify a timestamp to be used for uuid generation so that uuids
+are not random and can be consistent for reproducible builds.
+The timestamp can be a pathname, where the timestamps are derived from
+that file, a parseable date for parsedate(3) (this option is not
+yet available in the tools build), or an integer value interpreted
+as the number of seconds from the Epoch.
 .It Fl v
 Controls the verbosity level.
 The level increases with every occurrence of this option.

Index: src/sbin/gpt/gpt.c
diff -u src/sbin/gpt/gpt.c:1.69 src/sbin/gpt/gpt.c:1.70
--- src/sbin/gpt/gpt.c:1.69	Sat Sep 24 09:40:55 2016
+++ src/sbin/gpt/gpt.c	Wed Feb 15 22:32:17 2017
@@ -35,7 +35,7 @@
 __FBSDID("$FreeBSD: src/sbin/gpt/gpt.c,v 1.16 2006/07/07 02:44:23 marcel Exp $");
 #endif
 #ifdef __RCSID
-__RCSID("$NetBSD: gpt.c,v 1.69 2016/09/24 13:40:55 christos Exp $");
+__RCSID("$NetBSD: gpt.c,v 1.70 2017/02/16 03:32:17 christos Exp $");
 #endif
 
 #include 
@@ -461,7 +461,8 @@ gpt_gpt(gpt_t gpt, off_t lba, int found)
 }
 
 gpt_t
-gpt_open(const char *dev, int flags, int verbose, off_t mediasz, u_int secsz)
+gpt_open(const char *dev, int flags, int verbose, off_t mediasz, u_int secsz,
+time_t timestamp)
 {
 	int mode, found;
 	off_t devsz;
@@ -477,6 +478,7 @@ gpt_open(const char *dev, int flags, int
 	gpt->verbose = verbose;
 	gpt->mediasz = mediasz;
 	gpt->secsz = secsz;
+	gpt->timestamp = timestamp;
 
 	mode = (gpt->flags & GPT_READONLY) ? O_RDONLY : O_RDWR|O_EXCL;
 		

Index: src/sbin/gpt/gpt.h
diff -u src/sbin/gpt/gpt.h:1.33 src/sbin/gpt/gpt.h:1.34
--- src/sbin/gpt/gpt.h:1.33	Thu Jun  9 11:12:54 2016
+++ src/sbin/gpt/gpt.h	Wed Feb 15 22:32:17 2017
@@ -74,7 +74,7 @@ struct gpt_cmd {
 uint32_t crc32(const void *, size_t);
 void	gpt_close(gpt_t);
 int	gpt_gpt(gpt_t, off_t, int);
-gpt_t	gpt_open(const char *, int, int, off_t, u_int);
+gpt_t	gpt_open(const char *, int, int, off_t, u_int, time_t);
 #define GPT_READONLY	0x01
 #define GPT_MODIFIED	0x02
 #define GPT_QUIET	0x04

Index: src/sbin/gpt/gpt_private.h
diff -u src/sbin/gpt/gpt_private.h:1.1 src/sbin/gpt/gpt_private.h:1.2
--- src/sbin/gpt/gpt_private.h:1.1	Tue Dec  1 04:05:33 2015
+++ src/sbin/gpt/gpt_private.h	Wed Feb 15 22:32:17 2017
@@ -41,5 +41,6 @@ struct gpt {
 	struct map *tbl, *lbt, *gpt, *tpg;
 	u_int secsz;
 	off_t mediasz;
+	time_t timestamp;
 	struct stat sb;
 };

Index: src/sbin/gpt/gpt_uuid.c
diff -u src/sbin/gpt/gpt_uuid.c:1.13 

CVS commit: src/distrib/common

2017-02-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Feb 16 02:37:32 UTC 2017

Modified Files:
src/distrib/common: Makefile.bootcd

Log Message:
there is no -f in install


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/distrib/common/Makefile.bootcd

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/common/Makefile.bootcd
diff -u src/distrib/common/Makefile.bootcd:1.37 src/distrib/common/Makefile.bootcd:1.38
--- src/distrib/common/Makefile.bootcd:1.37	Fri Feb 10 22:07:06 2017
+++ src/distrib/common/Makefile.bootcd	Wed Feb 15 21:37:32 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootcd,v 1.37 2017/02/11 03:07:06 christos Exp $
+#	$NetBSD: Makefile.bootcd,v 1.38 2017/02/16 02:37:32 christos Exp $
 #
 # Makefile snipped to create a CD/DVD ISO
 #
@@ -231,7 +231,7 @@ copy-releasedir:
 			release_destdir="${CUROBJDIR}/cdrom";		\
 			if [ -f $${cde} ]; then\
 echo Copying $${cde} to $$release_destdir ...;	\
-${INSTALL} ${COPY} -m 0644 -f $${cde} $${release_destdir};	\
+${INSTALL} ${COPY} -m 0644 $${cde} $${release_destdir};	\
 			elif [ -d $${cde} ]; then			\
 cd $${cde};\
 echo Copying $$(pwd) to $$release_destdir ...;	\



CVS commit: src/doc

2017-02-15 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Feb 16 01:05:01 UTC 2017

Modified Files:
src/doc: HACKS

Log Message:
sorry, correct English grammer


To generate a diff of this commit:
cvs rdiff -u -r1.183 -r1.184 src/doc/HACKS

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/HACKS
diff -u src/doc/HACKS:1.183 src/doc/HACKS:1.184
--- src/doc/HACKS:1.183	Thu Feb 16 01:02:28 2017
+++ src/doc/HACKS	Thu Feb 16 01:05:01 2017
@@ -1,4 +1,4 @@
-# $NetBSD: HACKS,v 1.183 2017/02/16 01:02:28 rin Exp $
+# $NetBSD: HACKS,v 1.184 2017/02/16 01:05:01 rin Exp $
 #
 # This file is intended to document workarounds for currently unsolved
 # (mostly) compiler bugs.
@@ -572,7 +572,7 @@ port	vax
 	file	src/external/mit/xorg/lib/libX11/Makefile.libx11 : 1.18
 	descr
 		lcWrap.c is miscompiled, which results in input failure via XIM.
-		Besides, some clients, e.g., pkgsrc/x11/kterm, receives SIGSEGV.
+		Besides, some clients, e.g., pkgsrc/x11/kterm, receive SIGSEGV.
 	kcah
 
 port	arm



CVS commit: src

2017-02-15 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Feb 16 01:02:28 UTC 2017

Modified Files:
src/doc: HACKS
src/external/mit/xorg/lib/libX11: Makefile.libx11

Log Message:
lcWrap.c is miscompiled on vax, which results in input failure via XIM.
Besides, some clients, e.g., pkgsrc/x11/kterm, receives SIGSEGV.


To generate a diff of this commit:
cvs rdiff -u -r1.182 -r1.183 src/doc/HACKS
cvs rdiff -u -r1.17 -r1.18 src/external/mit/xorg/lib/libX11/Makefile.libx11

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/HACKS
diff -u src/doc/HACKS:1.182 src/doc/HACKS:1.183
--- src/doc/HACKS:1.182	Tue Feb 14 09:59:16 2017
+++ src/doc/HACKS	Thu Feb 16 01:02:28 2017
@@ -1,4 +1,4 @@
-# $NetBSD: HACKS,v 1.182 2017/02/14 09:59:16 rin Exp $
+# $NetBSD: HACKS,v 1.183 2017/02/16 01:02:28 rin Exp $
 #
 # This file is intended to document workarounds for currently unsolved
 # (mostly) compiler bugs.
@@ -566,6 +566,15 @@ port	vax
 		mandoc(1) receives SIGILL in in_line_argn() from mdoc_macro.c.
 	kcah
 
+	hack	libX11 miscompile
+	date	Thu Feb 16 10:00:22 JST 2017
+	who	rin
+	file	src/external/mit/xorg/lib/libX11/Makefile.libx11 : 1.18
+	descr
+		lcWrap.c is miscompiled, which results in input failure via XIM.
+		Besides, some clients, e.g., pkgsrc/x11/kterm, receives SIGSEGV.
+	kcah
+
 port	arm
 
 	hack	gcc-unsigned-compare

Index: src/external/mit/xorg/lib/libX11/Makefile.libx11
diff -u src/external/mit/xorg/lib/libX11/Makefile.libx11:1.17 src/external/mit/xorg/lib/libX11/Makefile.libx11:1.18
--- src/external/mit/xorg/lib/libX11/Makefile.libx11:1.17	Sat Nov 21 11:15:31 2015
+++ src/external/mit/xorg/lib/libX11/Makefile.libx11	Thu Feb 16 01:02:28 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.libx11,v 1.17 2015/11/21 11:15:31 tsutsui Exp $
+#	$NetBSD: Makefile.libx11,v 1.18 2017/02/16 01:02:28 rin Exp $
 
 LIB=	X11
 .PATH:	${X11SRCDIR.${LIB}}/src
@@ -464,6 +464,11 @@ COPTS.OpenDis.c+=	-Wno-error	# XXX xf86b
 COPTS.XlibInt.c+=	-Wno-error	# XXX xcmiscstr.h
 COPTS.XKBBind.c+=	-Wno-deprecated-declarations	# uses XKeycodeToKeysym
 
+# XXX
+.if ${MACHINE} == "vax"
+COPTS.lcWrap.c+=	-O0
+.endif
+
 CWARNFLAGS.clang+=	-Wno-string-plus-int
 
 .include "${NETBSDSRCDIR}/external/mit/xorg/tools/makekeys/Makefile.makekeys"



CVS commit: src/distrib/cdrom

2017-02-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Feb 15 22:47:27 UTC 2017

Modified Files:
src/distrib/cdrom: hfsmap.lst

Log Message:
add chrp


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/distrib/cdrom/hfsmap.lst

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/cdrom/hfsmap.lst
diff -u src/distrib/cdrom/hfsmap.lst:1.1 src/distrib/cdrom/hfsmap.lst:1.2
--- src/distrib/cdrom/hfsmap.lst:1.1	Wed Nov 29 19:04:08 2000
+++ src/distrib/cdrom/hfsmap.lst	Wed Feb 15 17:47:27 2017
@@ -4,4 +4,5 @@
 .gz - 'GNUz' 'TEXT'
 .tgz - 'GNUz' 'TEXT'
 .html - 'nbsd' 'TEXT'
+.chrp - 'chrp' 'tbxi'
 * - 'nbsd' 'TEXT'



CVS commit: src/share/man/man7

2017-02-15 Thread Abhinav Upadhyay
Module Name:src
Committed By:   abhinav
Date:   Wed Feb 15 17:44:52 UTC 2017

Modified Files:
src/share/man/man7: src.7

Log Message:
Fix spelling: s/alogorithms/algorithms


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/share/man/man7/src.7

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/man7/src.7
diff -u src/share/man/man7/src.7:1.10 src/share/man/man7/src.7:1.11
--- src/share/man/man7/src.7:1.10	Thu May 21 01:05:33 2015
+++ src/share/man/man7/src.7	Wed Feb 15 17:44:52 2017
@@ -1,4 +1,4 @@
-.\" $NetBSD: src.7,v 1.10 2015/05/21 01:05:33 ozaki-r Exp $
+.\" $NetBSD: src.7,v 1.11 2017/02/15 17:44:52 abhinav Exp $
 .\"
 .\" Copyright (c) 2012, 2013 Mingzhe Wang and Elvira Khabirova.
 .\"	All rights reserved.
@@ -258,7 +258,7 @@ binaries.
 .It Pa conf/
 Misc files for building kernel.
 .It Pa crypto/
-Crypt alogorithms used by IPsec.
+Crypt algorithms used by IPsec.
 .It Pa ddb/
 Client code for local kernel debugger.
 .It Pa dev/



CVS commit: src/external/ibm-public/postfix/dist/src/global

2017-02-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Feb 15 16:42:16 UTC 2017

Modified Files:
src/external/ibm-public/postfix/dist/src/global: mail_params.h

Log Message:
set the default meta_directory where we are installing postfix-files.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 \
src/external/ibm-public/postfix/dist/src/global/mail_params.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/ibm-public/postfix/dist/src/global/mail_params.h
diff -u src/external/ibm-public/postfix/dist/src/global/mail_params.h:1.14 src/external/ibm-public/postfix/dist/src/global/mail_params.h:1.15
--- src/external/ibm-public/postfix/dist/src/global/mail_params.h:1.14	Mon Feb 13 20:16:45 2017
+++ src/external/ibm-public/postfix/dist/src/global/mail_params.h	Wed Feb 15 11:42:16 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: mail_params.h,v 1.14 2017/02/14 01:16:45 christos Exp $	*/
+/*	$NetBSD: mail_params.h,v 1.15 2017/02/15 16:42:16 christos Exp $	*/
 
 #ifndef _MAIL_PARAMS_H_INCLUDED_
 #define _MAIL_PARAMS_H_INCLUDED_
@@ -3925,7 +3925,7 @@ extern char *var_shlib_dir;
 
 #define VAR_META_DIR	"meta_directory"
 #ifndef DEF_META_DIR
-#define DEF_META_DIR	DEF_CONFIG_DIR
+#define DEF_META_DIR	DEF_DAEMON_DIR
 #endif
 extern char *var_meta_dir;
 



CVS commit: src/sys/arch/macppc/dev

2017-02-15 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Feb 15 12:39:29 UTC 2017

Modified Files:
src/sys/arch/macppc/dev: mesh.c

Log Message:
Fix an inverted logic.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/macppc/dev/mesh.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/macppc/dev/mesh.c
diff -u src/sys/arch/macppc/dev/mesh.c:1.37 src/sys/arch/macppc/dev/mesh.c:1.38
--- src/sys/arch/macppc/dev/mesh.c:1.37	Fri Jul 15 22:10:47 2016
+++ src/sys/arch/macppc/dev/mesh.c	Wed Feb 15 12:39:29 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: mesh.c,v 1.37 2016/07/15 22:10:47 macallan Exp $	*/
+/*	$NetBSD: mesh.c,v 1.38 2017/02/15 12:39:29 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 2000	Tsubai Masanari.
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mesh.c,v 1.37 2016/07/15 22:10:47 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mesh.c,v 1.38 2017/02/15 12:39:29 tsutsui Exp $");
 
 #include 
 #include 
@@ -264,7 +264,7 @@ mesh_attach(device_t parent, device_t se
 	intr_establish(sc->sc_irq, IST_EDGE, IPL_BIO, mesh_intr, sc);
 
 	/* Reset SCSI bus when halt. */
-	if (pmf_device_register1(self, NULL, NULL, mesh_shutdown))
+	if (!pmf_device_register1(self, NULL, NULL, mesh_shutdown))
 		aprint_error_dev(self, "couldn't establish power handler\n");
 }
 



CVS commit: src/usr.bin/ftp

2017-02-15 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Wed Feb 15 11:52:11 UTC 2017

Modified Files:
src/usr.bin/ftp: fetch.c

Log Message:
ftp(1): split the auth processing function.


To generate a diff of this commit:
cvs rdiff -u -r1.227 -r1.228 src/usr.bin/ftp/fetch.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/ftp/fetch.c
diff -u src/usr.bin/ftp/fetch.c:1.227 src/usr.bin/ftp/fetch.c:1.228
--- src/usr.bin/ftp/fetch.c:1.227	Tue Jan 31 21:05:35 2017
+++ src/usr.bin/ftp/fetch.c	Wed Feb 15 11:52:11 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: fetch.c,v 1.227 2017/01/31 21:05:35 christos Exp $	*/
+/*	$NetBSD: fetch.c,v 1.228 2017/02/15 11:52:11 nonaka Exp $	*/
 
 /*-
  * Copyright (c) 1997-2015 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: fetch.c,v 1.227 2017/01/31 21:05:35 christos Exp $");
+__RCSID("$NetBSD: fetch.c,v 1.228 2017/02/15 11:52:11 nonaka Exp $");
 #endif /* not lint */
 
 /*
@@ -855,7 +855,6 @@ print_connect(FETCH *fin, const struct u
 #define C_OK 0
 #define C_CLEANUP 1
 #define C_IMPROPER 2
-#define C_RESTART 3
 
 static int
 getresponseline(FETCH *fin, char *buf, size_t buflen, int *len)
@@ -950,6 +949,52 @@ parse_posinfo(const char **cp, struct po
 	return 0;
 }
 
+#ifndef NO_AUTH
+static void
+do_auth(int hcode, const char *url, const char *penv, struct authinfo *wauth,
+struct authinfo *pauth, char **auth, const char *message,
+volatile int *rval)
+{
+	struct authinfo aauth;
+	char *response;
+
+	if (hcode == 401)
+		aauth = *wauth;
+	else
+		aauth = *pauth;
+
+	if (verbose || aauth.auth == NULL ||
+	aauth.user == NULL || aauth.pass == NULL)
+		fprintf(ttyout, "%s\n", message);
+	if (EMPTYSTRING(*auth)) {
+		warnx("No authentication challenge provided by server");
+		return;
+	}
+
+	if (aauth.auth != NULL) {
+		char reply[10];
+
+		fprintf(ttyout, "Authorization failed. Retry (y/n)? ");
+		if (get_line(stdin, reply, sizeof(reply), NULL) < 0) {
+			return;
+		}
+		if (tolower((unsigned char)reply[0]) != 'y')
+			return;
+
+		aauth.user = NULL;
+		aauth.pass = NULL;
+	}
+
+	if (auth_url(*auth, , ) == 0) {
+		*rval = fetch_url(url, penv,
+		hcode == 401 ? pauth->auth : response,
+		hcode == 401 ? response: wauth->auth);
+		memset(response, 0, strlen(response));
+		FREEPTR(response);
+	}
+}
+#endif
+
 static int
 negotiate_connection(FETCH *fin, const char *url, const char *penv,
 struct posinfo *pi, time_t *mtime, struct authinfo *wauth,
@@ -1085,49 +1130,8 @@ negotiate_connection(FETCH *fin, const c
 #ifndef NO_AUTH
 	case 401:
 	case 407:
-	{
-		struct authinfo aauth;
-		char **authp;
-
-		if (hcode == 401)
-			aauth = *wauth;
-		else
-			aauth = *pauth;
-		
-		if (verbose || aauth.auth == NULL ||
-		aauth.user == NULL || aauth.pass == NULL)
-			fprintf(ttyout, "%s\n", message);
-		if (EMPTYSTRING(*auth)) {
-			warnx(
-		"No authentication challenge provided by server");
-			goto cleanup_fetch_url;
-		}
-
-		if (aauth.auth != NULL) {
-			char reply[10];
-
-			fprintf(ttyout,
-			"Authorization failed. Retry (y/n)? ");
-			if (get_line(stdin, reply, sizeof(reply), NULL)
-			< 0) {
-goto cleanup_fetch_url;
-			}
-			if (tolower((unsigned char)reply[0]) != 'y')
-goto cleanup_fetch_url;
-			aauth.user = NULL;
-			aauth.pass = NULL;
-		}
-
-		authp = 
-		if (auth_url(*auth, authp, ) == 0) {
-			*rval = fetch_url(url, penv,
-			hcode == 401 ? pauth->auth : aauth.auth,
-			hcode == 401 ? aauth.auth : wauth->auth);
-			memset(*authp, 0, strlen(*authp));
-			FREEPTR(*authp);
-		}
+		do_auth(hcode, url, penv, wauth, pauth, auth, message, rval);
 		goto cleanup_fetch_url;
-	}
 #endif
 	default:
 		if (message)
@@ -1153,8 +1157,9 @@ out:
 
 #ifdef WITH_SSL
 static int
-connectmethod(int s, FETCH *fin, struct urlinfo *oui, struct urlinfo *ui,
-struct authinfo *pauth, char **auth, int *hasleading)
+connectmethod(FETCH *fin, const char *url, const char *penv,
+struct urlinfo *oui, struct urlinfo *ui, struct authinfo *wauth,
+struct authinfo *pauth, char **auth, int *hasleading, volatile int *rval)
 {
 	void *ssl;
 	int hcode, rv;
@@ -1219,30 +1224,7 @@ connectmethod(int s, FETCH *fin, struct 
 		break;
 #ifndef NO_AUTH
 	case 407:
-		if (verbose || pauth->auth == NULL ||
-		pauth->user == NULL || pauth->pass == NULL)
-			fprintf(ttyout, "%s\n", message);
-		if (EMPTYSTRING(*auth)) {
-			warnx("No authentication challenge provided by server");
-			goto cleanup_fetch_url;
-		}
-
-		if (pauth->auth != NULL) {
-			char reply[10];
-
-			fprintf(ttyout, "Authorization failed. Retry (y/n)? ");
-			if (get_line(stdin, reply, sizeof(reply), NULL)
-			< 0) {
-goto cleanup_fetch_url;
-			}
-			if (tolower((unsigned char)reply[0]) != 'y')
-goto cleanup_fetch_url;
-			pauth->user = NULL;
-			pauth->pass = NULL;
-		}
-
-		if (auth_url(*auth, >auth, pauth) == 0)
-			goto