re: CVS commit: src/lib/csu/common

2013-06-27 Thread matthew green

 Module Name:  src
 Committed By: matt
 Date: Thu Jun 27 03:37:21 UTC 2013
 
 Modified Files:
   src/lib/csu/common: Makefile.inc
 
 Log Message:
 Add -fPIC to compile of crtbeginS.o

what is this for?  crtbeginS.o is for static binaries isn't it?


.mrg.


Re: CVS commit: src/lib/csu/common

2013-06-27 Thread Matt Thomas

On Jun 27, 2013, at 7:28 AM, matthew green m...@eterna.com.au wrote:

 
 Module Name: src
 Committed By:matt
 Date:Thu Jun 27 03:37:21 UTC 2013
 
 Modified Files:
  src/lib/csu/common: Makefile.inc
 
 Log Message:
 Add -fPIC to compile of crtbeginS.o
 
 what is this for?  crtbeginS.o is for static binaries isn't it?

crtbegin.o is for static
crtbeginS.o is for shared


Re: CVS commit: src/lib/csu/common

2013-06-27 Thread Joerg Sonnenberger
On Thu, Jun 27, 2013 at 08:03:06AM -0700, Matt Thomas wrote:
 
 On Jun 27, 2013, at 7:28 AM, matthew green m...@eterna.com.au wrote:
 
  
  Module Name:   src
  Committed By:  matt
  Date:  Thu Jun 27 03:37:21 UTC 2013
  
  Modified Files:
 src/lib/csu/common: Makefile.inc
  
  Log Message:
  Add -fPIC to compile of crtbeginS.o
  
  what is this for?  crtbeginS.o is for static binaries isn't it?
 
 crtbegin.o is for static
 crtbeginS.o is for shared

Actually, it is crtbegin.o for the main binary, crtbeginS.o for shared
objects and crtbeginT.o for static binaries. Making crtbegin.o PIC is
useful for PIE.

Joerg


Re: CVS commit: xsrc/external/mit/fontconfig/dist/src

2013-06-27 Thread Valery Ushakov
On Thu, Jun 27, 2013 at 12:44:11 +, Thomas Klausner wrote:

 Modified Files:
   xsrc/external/mit/fontconfig/dist/src: fcname.c
 
 Log Message:
 Fix a comparison of constant warning with clang
 
 From upstream:
 commit 9acc14c34a372b54f9075ec3611588298fb2a501
 Author: Akira TAGOH ak...@tagoh.org
 Date:   Wed Jun 26 12:03:38 2013 +0900

Their fix is incorrect.

-   if (t-type == (unsigned int) -1 || type == t-type)
+   if ((unsigned int) t-type == (unsigned int) -1 || type == t-type)

it does wrong thing with short enums, and non-eabi arm ports still use
it, as far as I understand.

The enum in question contains only small values, so with -fshort-enums
(default for older arms ABIs) gcc will use the narrowest integral type
that can hold all the values, in this case single byte is enough, and
(though I don't remember chapter and verse) it's likely to be
unsigned.  Thus

  t-type = -1;

will be converted to uint8_t and stored as 0xff, and when cast to
unsigned int it will be 0xff, so it will NOT compare equal with
(unsigned int)-1

Consider something like:

#include stdio.h

enum e { E0, E1 };
volatile enum e e;

int
main(void)
{
printf(sizeof enum = %zu\n, sizeof(e));

e = -1;
if ((unsigned int)e == (unsigned int)-1) {
printf(equal\n);
}
else {
printf(NOT equal\n);
}
return 0;
}


$ cc -Wall -Wextra enum.c  ./a.out 
sizeof enum = 4
equal

$ cc -Wall -Wextra -fshort-enums enum.c  ./a.out 
enum.c: In function 'main':
enum.c:12:5: warning: comparison is always false due to limited range of data 
type
sizeof enum = 1
NOT equal

-1 should really be in the enum as one of the enumeration constants.

-uwe


Re: CVS commit: xsrc/external/mit/fontconfig/dist/src

2013-06-27 Thread Martin Husemann
On Thu, Jun 27, 2013 at 07:40:32PM +0400, Valery Ushakov wrote:
 -1 should really be in the enum as one of the enumeration constants.

Indeed, and then the enumerator name should be used instead of the
stupid -1 constant.

Martin


Re: CVS commit: src/lib/csu/common

2013-06-27 Thread Matt Thomas

On Jun 27, 2013, at 8:33 AM, Joerg Sonnenberger jo...@britannica.bec.de wrote:

 On Thu, Jun 27, 2013 at 08:03:06AM -0700, Matt Thomas wrote:
 
 On Jun 27, 2013, at 7:28 AM, matthew green m...@eterna.com.au wrote:
 
 
 Module Name:   src
 Committed By:  matt
 Date:  Thu Jun 27 03:37:21 UTC 2013
 
 Modified Files:
src/lib/csu/common: Makefile.inc
 
 Log Message:
 Add -fPIC to compile of crtbeginS.o
 
 what is this for?  crtbeginS.o is for static binaries isn't it?
 
 crtbegin.o is for static
 crtbeginS.o is for shared
 
 Actually, it is crtbegin.o for the main binary, crtbeginS.o for shared
 objects and crtbeginT.o for static binaries. Making crtbegin.o PIC is
 useful for PIE.


We don't build crtbeginT.o any more.

Re: CVS commit: src/lib/csu/common

2013-06-27 Thread Joerg Sonnenberger
On Thu, Jun 27, 2013 at 09:54:33AM -0700, Matt Thomas wrote:
 
 On Jun 27, 2013, at 8:33 AM, Joerg Sonnenberger jo...@britannica.bec.de 
 wrote:
 
  On Thu, Jun 27, 2013 at 08:03:06AM -0700, Matt Thomas wrote:
  
  On Jun 27, 2013, at 7:28 AM, matthew green m...@eterna.com.au wrote:
  
  
  Module Name: src
  Committed By:matt
  Date:Thu Jun 27 03:37:21 UTC 2013
  
  Modified Files:
   src/lib/csu/common: Makefile.inc
  
  Log Message:
  Add -fPIC to compile of crtbeginS.o
  
  what is this for?  crtbeginS.o is for static binaries isn't it?
  
  crtbegin.o is for static
  crtbeginS.o is for shared
  
  Actually, it is crtbegin.o for the main binary, crtbeginS.o for shared
  objects and crtbeginT.o for static binaries. Making crtbegin.o PIC is
  useful for PIE.
 
 
 We don't build crtbeginT.o any more.

Correct, so crtbegin.o should also be PIC.

Joerg


CVS commit: src/sys/fs/udf

2013-06-27 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Thu Jun 27 09:38:08 UTC 2013

Modified Files:
src/sys/fs/udf: udf_vnops.c

Log Message:
Since UDF volumes are always mounted async, the simple UBC purging with
VOP_PUTPAGES() was never triggered resulting in far too much data in the UBC
that needed to be written out. This could result in instability on small
memory machines.


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/sys/fs/udf/udf_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/sys/fs/udf/udf_vnops.c
diff -u src/sys/fs/udf/udf_vnops.c:1.75 src/sys/fs/udf/udf_vnops.c:1.76
--- src/sys/fs/udf/udf_vnops.c:1.75	Mon Mar 18 19:35:41 2013
+++ src/sys/fs/udf/udf_vnops.c	Thu Jun 27 09:38:08 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_vnops.c,v 1.75 2013/03/18 19:35:41 plunky Exp $ */
+/* $NetBSD: udf_vnops.c,v 1.76 2013/06/27 09:38:08 reinoud Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -32,7 +32,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__KERNEL_RCSID(0, $NetBSD: udf_vnops.c,v 1.75 2013/03/18 19:35:41 plunky Exp $);
+__KERNEL_RCSID(0, $NetBSD: udf_vnops.c,v 1.76 2013/06/27 09:38:08 reinoud Exp $);
 #endif /* not lint */
 
 
@@ -276,7 +276,6 @@ udf_write(void *v)
 	struct extfile_entry *efe;
 	uint64_t file_size, old_size, old_offset;
 	vsize_t len;
-	int async = vp-v_mount-mnt_flag  MNT_ASYNC;
 	int aflag = ioflag  IO_SYNC ? B_SYNC : 0;
 	int error;
 	int resid, extended;
@@ -364,7 +363,7 @@ udf_write(void *v)
 		 * Directories are excluded since its file data that we want
 		 * to purge.
 		 */
-		if (!async  (vp-v_type != VDIR) 
+		if ((vp-v_type != VDIR) 
 		  (old_offset  16 != uio-uio_offset  16)) {
 			mutex_enter(vp-v_interlock);
 			error = VOP_PUTPAGES(vp, (old_offset  16)  16,



CVS commit: src/sys/dev/pci

2013-06-27 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Jun 27 09:57:49 UTC 2013

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

Log Message:
 Move the location of wm_check_mng_mode() and wm_get_wakeup() in wm_attach().
Those functions access EEPROM, so they have to call after identifying EEPROM
access type. This modification may change the behavior of BMC(IPMI).


To generate a diff of this commit:
cvs rdiff -u -r1.260 -r1.261 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.260 src/sys/dev/pci/if_wm.c:1.261
--- src/sys/dev/pci/if_wm.c:1.260	Tue Jun 25 17:38:38 2013
+++ src/sys/dev/pci/if_wm.c	Thu Jun 27 09:57:49 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.260 2013/06/25 17:38:38 msaitoh Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.261 2013/06/27 09:57:49 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -76,7 +76,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.260 2013/06/25 17:38:38 msaitoh Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.261 2013/06/27 09:57:49 msaitoh Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -1244,8 +1244,6 @@ wm_attach(device_t parent, device_t self
 		return;
 	}
 
-	wm_get_wakeup(sc);
-
 	/*
 	 * In addition, i82544 and later support I/O mapped indirect
 	 * register access.  It is not desirable (nor supported in
@@ -1540,26 +1538,6 @@ wm_attach(device_t parent, device_t self
 	 */
 	wm_reset(sc);
 
-	switch (sc-sc_type) {
-	case WM_T_82571:
-	case WM_T_82572:
-	case WM_T_82573:
-	case WM_T_82574:
-	case WM_T_82583:
-	case WM_T_80003:
-	case WM_T_ICH8:
-	case WM_T_ICH9:
-	case WM_T_ICH10:
-	case WM_T_PCH:
-	case WM_T_PCH2:
-	case WM_T_PCH_LPT:
-		if (wm_check_mng_mode(sc) != 0)
-			wm_get_hw_control(sc);
-		break;
-	default:
-		break;
-	}
-
 	/*
 	 * Get some information about the EEPROM.
 	 */
@@ -1696,6 +1674,28 @@ wm_attach(device_t parent, device_t self
 		sc-sc_ee_addrbits, eetype);
 	}
 
+	switch (sc-sc_type) {
+	case WM_T_82571:
+	case WM_T_82572:
+	case WM_T_82573:
+	case WM_T_82574:
+	case WM_T_82583:
+	case WM_T_80003:
+	case WM_T_ICH8:
+	case WM_T_ICH9:
+	case WM_T_ICH10:
+	case WM_T_PCH:
+	case WM_T_PCH2:
+	case WM_T_PCH_LPT:
+		if (wm_check_mng_mode(sc) != 0) {
+			printf (get hw control (1)\n);
+			wm_get_hw_control(sc);
+		}
+		break;
+	default:
+		break;
+	}
+	wm_get_wakeup(sc);
 	/*
 	 * Read the Ethernet address from the EEPROM, if not first found
 	 * in device properties.
@@ -7983,8 +7983,8 @@ wm_enable_mng_pass_thru(struct wm_softc 
 
 		factps = CSR_READ(sc, WMREG_FACTPS);
 		wm_read_eeprom(sc, EEPROM_OFF_CFG2, 1, data);
-		DPRINTF(WM_DEBUG_MANAGE, (%s: CFG2 (%04x)\n,
-	  device_xname(sc-sc_dev), data));
+		DPRINTF(WM_DEBUG_MANAGE, (%s: FACTPS = %08x, CFG2=%04x\n,
+			device_xname(sc-sc_dev), factps, data));
 		if (((factps  FACTPS_MNGCG) == 0)
 		 ((data  EEPROM_CFG2_MNGM_MASK)
 			== (EEPROM_CFG2_MNGM_PT  EEPROM_CFG2_MNGM_SHIFT)))



CVS commit: src/libexec/httpd

2013-06-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 27 10:01:31 UTC 2013

Modified Files:
src/libexec/httpd: bozohttpd.c bozohttpd.h cgi-bozo.c

Log Message:
Redo previous (fixing a memory leak introduced), and while there rework
virtual server support - in daemonized mode mixed virtual and main
server usage would alter the virtual hostname depending on order of
requests.
To fix, move the effective virtual hostname into the request structure
and leave the httpd server description static.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/libexec/httpd/bozohttpd.c
cvs rdiff -u -r1.23 -r1.24 src/libexec/httpd/bozohttpd.h
cvs rdiff -u -r1.20 -r1.21 src/libexec/httpd/cgi-bozo.c

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

Modified files:

Index: src/libexec/httpd/bozohttpd.c
diff -u src/libexec/httpd/bozohttpd.c:1.34 src/libexec/httpd/bozohttpd.c:1.35
--- src/libexec/httpd/bozohttpd.c:1.34	Sun Jun 23 20:32:55 2013
+++ src/libexec/httpd/bozohttpd.c	Thu Jun 27 10:01:31 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: bozohttpd.c,v 1.34 2013/06/23 20:32:55 martin Exp $	*/
+/*	$NetBSD: bozohttpd.c,v 1.35 2013/06/27 10:01:31 martin Exp $	*/
 
 /*	$eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $	*/
 
@@ -337,6 +337,7 @@ bozo_clean_request(bozo_httpreq_t *reque
 	MF(hr_remotehost);
 	MF(hr_remoteaddr);
 	MF(hr_serverport);
+	MF(hr_virthostname);
 	MF(hr_file);
 	MF(hr_oldfile);
 	MF(hr_query);
@@ -539,6 +540,7 @@ bozo_read_request(bozohttpd_t *httpd)
 	request-hr_range = NULL;
 	request-hr_last_byte_pos = -1;
 	request-hr_if_modified_since = NULL;
+	request-hr_virthostname = NULL;
 	request-hr_file = NULL;
 	request-hr_oldfile = NULL;
 
@@ -954,6 +956,7 @@ handle_redirect(bozo_httpreq_t *request,
 	bozohttpd_t *httpd = request-hr_httpd;
 	char *urlbuf;
 	char portbuf[20];
+	const char *hostname = BOZOHOST(httpd, request);
 	int query = 0;
 	
 	if (url == NULL) {
@@ -972,7 +975,7 @@ handle_redirect(bozo_httpreq_t *request,
 		request-hr_serverport);
 	else
 		portbuf[0] = '\0';
-	bozo_warn(httpd, redirecting %s%s%s, httpd-virthostname, portbuf, url);
+	bozo_warn(httpd, redirecting %s%s%s, hostname, portbuf, url);
 	debug((httpd, DEBUG_FAT, redirecting %s, url));
 	bozo_printf(httpd, %s 301 Document Moved\r\n, request-hr_proto);
 	if (request-hr_proto != httpd-consts.http_09) 
@@ -980,7 +983,7 @@ handle_redirect(bozo_httpreq_t *request,
 	if (request-hr_proto != httpd-consts.http_09) {
 		bozo_printf(httpd, Location: http://;);
 		if (absolute == 0)
-			bozo_printf(httpd, %s%s, httpd-virthostname, portbuf);
+			bozo_printf(httpd, %s%s, hostname, portbuf);
 		if (query) {
 			bozo_printf(httpd, %s?%s\r\n, url, request-hr_query);
 		} else {
@@ -997,13 +1000,13 @@ handle_redirect(bozo_httpreq_t *request,
 		if (absolute)
 			bozo_printf(httpd, %s?%s, url, request-hr_query);
 		else
-			bozo_printf(httpd, %s%s%s?%s, httpd-virthostname,
+			bozo_printf(httpd, %s%s%s?%s, hostname,
 portbuf, url, request-hr_query);
 	} else {
 		if (absolute)
 			bozo_printf(httpd, %s, url);
 		else
-			bozo_printf(httpd, %s%s%s, httpd-virthostname,
+			bozo_printf(httpd, %s%s%s, hostname,
 portbuf, url);
 	}
 	bozo_printf(httpd, \here/a\n);
@@ -1076,9 +1079,10 @@ check_virtual(bozo_httpreq_t *request)
 len) == 0) {
 	/* found it, punch it */
 	debug((httpd, DEBUG_OBESE, found it punch it));
-	httpd-virthostname = strdup(d-d_name);
+	request-hr_virthostname =
+	bozostrdup(httpd,d-d_name);
 	if (asprintf(s, %s/%s, httpd-virtbase,
-	httpd-virthostname)  0)
+	request-hr_virthostname)  0)
 		bozo_err(httpd, 1, asprintf);
 	break;
 }
@@ -1268,6 +1272,7 @@ transform_request(bozo_httpreq_t *reques
 	bozohttpd_t *httpd = request-hr_httpd;
 	char	*file, *newfile = NULL;
 	size_t	len;
+	const char *hostname = BOZOHOST(httpd, request);
 
 	file = NULL;
 	*isindex = 0;
@@ -1306,10 +1311,10 @@ transform_request(bozo_httpreq_t *reques
 
 			debug((httpd, DEBUG_FAT,
 checking referrer \%s\ vs virthostname %s,
-r, httpd-virthostname));
+r, hostname));
 			if (strncmp(r, http://;, 7) != 0 ||
-			(strncasecmp(r + 7, httpd-virthostname,
-					 strlen(httpd-virthostname)) != 0 
+			(strncasecmp(r + 7, hostname,
+					 strlen(hostname)) != 0 
 			 !TOP_PAGE(file)))
 to_indexhtml = 1;
 		} else {
@@ -1318,8 +1323,8 @@ transform_request(bozo_httpreq_t *reques
 			debug((httpd, DEBUG_FAT, url has no referrer at all));
 			/* if there's no referrer, let / or /index.html past */
 			if (!TOP_PAGE(file) ||
-			(h  strncasecmp(h, httpd-virthostname,
-					strlen(httpd-virthostname)) != 0))
+			(h  strncasecmp(h, hostname,
+					strlen(hostname)) != 0))
 to_indexhtml = 1;
 		}
 
@@ -1829,6 +1834,7 @@ bozo_http_error(bozohttpd_t *httpd, int 
 	const char *reason = http_errors_long(code);
 	const char *proto = (request  

CVS commit: src/libexec/httpd

2013-06-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 27 11:02:20 UTC 2013

Modified Files:
src/libexec/httpd: bozohttpd.c

Log Message:
After handling a request by sending a redirect, do not proceed with the normal
request handling (which would typically add error output after the end
of the redirect message).


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/libexec/httpd/bozohttpd.c

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

Modified files:

Index: src/libexec/httpd/bozohttpd.c
diff -u src/libexec/httpd/bozohttpd.c:1.35 src/libexec/httpd/bozohttpd.c:1.36
--- src/libexec/httpd/bozohttpd.c:1.35	Thu Jun 27 10:01:31 2013
+++ src/libexec/httpd/bozohttpd.c	Thu Jun 27 11:02:20 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: bozohttpd.c,v 1.35 2013/06/27 10:01:31 martin Exp $	*/
+/*	$NetBSD: bozohttpd.c,v 1.36 2013/06/27 11:02:20 martin Exp $	*/
 
 /*	$eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $	*/
 
@@ -1114,9 +1114,10 @@ use_slashdir:
 
 /*
  * checks to see if this request has a valid .bzredirect file.  returns
- * 0 on failure and 1 on success.
+ * 0 when no redirection happend, or 1 when handle_redirect() has been
+ * called.
  */
-static void
+static int
 check_bzredirect(bozo_httpreq_t *request)
 {
 	struct stat sb;
@@ -1145,12 +1146,12 @@ check_bzredirect(bozo_httpreq_t *request
 	snprintf(redir, sizeof(redir), %s/%s, dir, REDIRECT_FILE);
 	if (lstat(redir, sb) == 0) {
 		if (!S_ISLNK(sb.st_mode))
-			return;
+			return 0;
 		absolute = 0;
 	} else {
 		snprintf(redir, sizeof(redir), %s/%s, dir, ABSREDIRECT_FILE);
 		if (lstat(redir, sb)  0 || !S_ISLNK(sb.st_mode))
-			return;
+			return 0;
 		absolute = 1;
 	}
 	debug((request-hr_httpd, DEBUG_FAT,
@@ -1158,7 +1159,7 @@ check_bzredirect(bozo_httpreq_t *request
 	rv = readlink(redir, redirpath, sizeof redirpath - 1);
 	if (rv == -1 || rv == 0) {
 		debug((request-hr_httpd, DEBUG_FAT, readlink failed));
-		return;
+		return 0;
 	}
 	redirpath[rv] = '\0';
 	debug((request-hr_httpd, DEBUG_FAT,
@@ -1174,6 +1175,7 @@ check_bzredirect(bozo_httpreq_t *request
 	debug((request-hr_httpd, DEBUG_FAT,
 	   check_bzredirect: new redir %s, finalredir));
 	handle_redirect(request, finalredir, absolute);
+	return 1;
 }
 
 /* this fixes the %HH hack that RFC2396 requires.  */
@@ -1288,7 +1290,8 @@ transform_request(bozo_httpreq_t *reques
 		goto bad_done;
 	}
 
-	check_bzredirect(request);
+	if (check_bzredirect(request))
+		return 0;
 
 	if (httpd-untrustedref) {
 		int to_indexhtml = 0;



CVS commit: src/libexec/httpd

2013-06-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 27 12:20:08 UTC 2013

Modified Files:
src/libexec/httpd: bozohttpd.c

Log Message:
Fix copypasto in debug output


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/libexec/httpd/bozohttpd.c

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

Modified files:

Index: src/libexec/httpd/bozohttpd.c
diff -u src/libexec/httpd/bozohttpd.c:1.36 src/libexec/httpd/bozohttpd.c:1.37
--- src/libexec/httpd/bozohttpd.c:1.36	Thu Jun 27 11:02:20 2013
+++ src/libexec/httpd/bozohttpd.c	Thu Jun 27 12:20:08 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: bozohttpd.c,v 1.36 2013/06/27 11:02:20 martin Exp $	*/
+/*	$NetBSD: bozohttpd.c,v 1.37 2013/06/27 12:20:08 martin Exp $	*/
 
 /*	$eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $	*/
 
@@ -924,7 +924,7 @@ check_direct_access(bozo_httpreq_t *requ
 	char dir[MAXPATHLEN], dirfile[MAXPATHLEN], *basename;
 
 	snprintf(dir, sizeof(dir), %s, request-hr_file + 1);
-	debug((request-hr_httpd, DEBUG_FAT, check_bzredirect: dir %s, dir));
+	debug((request-hr_httpd, DEBUG_FAT, check_direct_access: dir %s, dir));
 	basename = strrchr(dir, '/');
 
 	if ((!basename || basename[1] != '\0') 



CVS commit: xsrc/external/mit/fontconfig/dist/src

2013-06-27 Thread Thomas Klausner
Module Name:xsrc
Committed By:   wiz
Date:   Thu Jun 27 12:44:11 UTC 2013

Modified Files:
xsrc/external/mit/fontconfig/dist/src: fcname.c

Log Message:
Fix a comparison of constant warning with clang

From upstream:
commit 9acc14c34a372b54f9075ec3611588298fb2a501
Author: Akira TAGOH ak...@tagoh.org
Date:   Wed Jun 26 12:03:38 2013 +0900


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 xsrc/external/mit/fontconfig/dist/src/fcname.c

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

Modified files:

Index: xsrc/external/mit/fontconfig/dist/src/fcname.c
diff -u xsrc/external/mit/fontconfig/dist/src/fcname.c:1.4 xsrc/external/mit/fontconfig/dist/src/fcname.c:1.5
--- xsrc/external/mit/fontconfig/dist/src/fcname.c:1.4	Mon Jun  3 19:49:01 2013
+++ xsrc/external/mit/fontconfig/dist/src/fcname.c	Thu Jun 27 12:44:11 2013
@@ -86,7 +86,7 @@ FcObjectValidType (FcObject object, FcTy
 		return FcTrue;
 	break;
 	default:
-	if (t-type == (unsigned int) -1 || type == t-type)
+	if ((unsigned int) t-type == (unsigned int) -1 || type == t-type)
 		return FcTrue;
 	break;
 	}



CVS commit: src/external/mit/xorg/lib/fontconfig/src

2013-06-27 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu Jun 27 12:44:58 UTC 2013

Modified Files:
src/external/mit/xorg/lib/fontconfig/src: Makefile

Log Message:
Remove clang workaround, problem was fixed using upstream commit.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/external/mit/xorg/lib/fontconfig/src/Makefile

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

Modified files:

Index: src/external/mit/xorg/lib/fontconfig/src/Makefile
diff -u src/external/mit/xorg/lib/fontconfig/src/Makefile:1.14 src/external/mit/xorg/lib/fontconfig/src/Makefile:1.15
--- src/external/mit/xorg/lib/fontconfig/src/Makefile:1.14	Tue Jun 25 14:05:04 2013
+++ src/external/mit/xorg/lib/fontconfig/src/Makefile	Thu Jun 27 12:44:58 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.14 2013/06/25 14:05:04 wiz Exp $
+#	$NetBSD: Makefile,v 1.15 2013/06/27 12:44:58 wiz Exp $
 
 .include bsd.own.mk
 
@@ -126,7 +126,6 @@ PKGCONFIG=	fontconfig
 CPPFLAGS.fcxml.c=	-Wno-error
 
 CWARNFLAGS.clang+=	-Wno-pointer-sign -Wno-switch
-CWARNFLAGS.clang+=	-Wno-error=tautological-constant-out-of-range-compare
 
 .include bsd.x11.mk
 .include bsd.lib.mk



CVS commit: src/share/examples/npf

2013-06-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 27 14:52:58 UTC 2013

Removed Files:
src/share/examples/npf: l2tp-gw.conf

Log Message:
remove file that did not go before.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r0 src/share/examples/npf/l2tp-gw.conf

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



CVS commit: src/sys/arch/evbarm/beagle

2013-06-27 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jun 27 14:58:55 UTC 2013

Modified Files:
src/sys/arch/evbarm/beagle: beagle_machdep.c

Log Message:
Only print CBAR on those cortex with CBAR


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/evbarm/beagle/beagle_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/evbarm/beagle/beagle_machdep.c
diff -u src/sys/arch/evbarm/beagle/beagle_machdep.c:1.49 src/sys/arch/evbarm/beagle/beagle_machdep.c:1.50
--- src/sys/arch/evbarm/beagle/beagle_machdep.c:1.49	Thu Jun 20 05:39:19 2013
+++ src/sys/arch/evbarm/beagle/beagle_machdep.c	Thu Jun 27 14:58:55 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: beagle_machdep.c,v 1.49 2013/06/20 05:39:19 matt Exp $ */
+/*	$NetBSD: beagle_machdep.c,v 1.50 2013/06/27 14:58:55 matt Exp $ */
 
 /*
  * Machine dependent functions for kernel setup for TI OSK5912 board.
@@ -125,7 +125,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: beagle_machdep.c,v 1.49 2013/06/20 05:39:19 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: beagle_machdep.c,v 1.50 2013/06/27 14:58:55 matt Exp $);
 
 #include opt_machdep.h
 #include opt_ddb.h
@@ -506,7 +506,9 @@ initarm(void *arg)
 	printf(initarm: Configuring system ...\n);
 #endif
 
+#if defined(CPU_CORTEXA7) || defined(CPU_CORTEXA9) || defined(CPU_CORTEXA15)
 	printf(initarm: cbar=%#x\n, armreg_cbar_read());
+#endif
 
 	/*
 	 * Set up the variables that define the availability of physical



CVS commit: src/sys/arch/sparc64/sparc64

2013-06-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 27 15:27:46 UTC 2013

Modified Files:
src/sys/arch/sparc64/sparc64: syscall.c

Log Message:
Simplify with sy_invoke()


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/sparc64/sparc64/syscall.c

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

Modified files:

Index: src/sys/arch/sparc64/sparc64/syscall.c
diff -u src/sys/arch/sparc64/sparc64/syscall.c:1.41 src/sys/arch/sparc64/sparc64/syscall.c:1.42
--- src/sys/arch/sparc64/sparc64/syscall.c:1.41	Sun Feb 19 21:06:31 2012
+++ src/sys/arch/sparc64/sparc64/syscall.c	Thu Jun 27 15:27:46 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: syscall.c,v 1.41 2012/02/19 21:06:31 rmind Exp $ */
+/*	$NetBSD: syscall.c,v 1.42 2013/06/27 15:27:46 martin Exp $ */
 
 /*-
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -79,7 +79,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: syscall.c,v 1.41 2012/02/19 21:06:31 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: syscall.c,v 1.42 2013/06/27 15:27:46 martin Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -114,8 +114,7 @@ union args {
 static inline int handle_old(struct trapframe64 *, register_t *);
 static inline int getargs(struct proc *, struct trapframe64 *,
 register_t *, const struct sysent **, union args *, int *);
-void syscall_plain(struct trapframe64 *, register_t, register_t);
-void syscall_fancy(struct trapframe64 *, register_t, register_t);
+void syscall(struct trapframe64 *, register_t, register_t);
 
 /*
  * Handle old style system calls.
@@ -242,10 +241,8 @@ void
 syscall_intern(struct proc *p)
 {
 
-	if (trace_is_enabled(p))
-		p-p_md.md_syscall = syscall_fancy;
-	else
-		p-p_md.md_syscall = syscall_plain;
+	p-p_trace_enabled = trace_is_enabled(p);
+	p-p_md.md_syscall = syscall;
 }
 
 /*
@@ -278,7 +275,7 @@ syscall_intern(struct proc *p)
  *  
  */
 void
-syscall_plain(struct trapframe64 *tf, register_t code, register_t pc)
+syscall(struct trapframe64 *tf, register_t code, register_t pc)
 {
 	const struct sysent *callp;
 	struct lwp *l = curlwp;
@@ -312,7 +309,7 @@ syscall_plain(struct trapframe64 *tf, re
 	rval[0] = 0;
 	rval[1] = tf-tf_out[1];
 
-	error = sy_call(callp, l, args, rval);
+	error = sy_invoke(callp, l, args.r, rval, code);
 
 	switch (error) {
 	case 0:
@@ -350,107 +347,6 @@ syscall_plain(struct trapframe64 *tf, re
 	share_fpu(l, tf);
 }
 
-void
-syscall_fancy(struct trapframe64 *tf, register_t code, register_t pc)
-{
-	const struct sysent *callp;
-	struct lwp *l = curlwp;
-	union args args, *ap = NULL;
-#ifdef __arch64__
-	union args args64;
-	int i;
-#endif
-	struct proc *p = l-l_proc;
-	int error, new;
-	register_t rval[2];
-	u_quad_t sticks;
-	vaddr_t opc, onpc;
-	int s64;
-
-	LWP_CACHE_CREDS(l, p);
-	curcpu()-ci_data.cpu_nsyscall++;
-	sticks = p-p_sticks;
-	l-l_md.md_tf = tf;
-
-	/*
-	 * save pc/npc in case of ERESTART
-	 * adjust pc/npc to new values
-	 */
-	opc = tf-tf_pc;
-	onpc = tf-tf_npc;
-
-	new = handle_old(tf, code);
-
-	tf-tf_npc = tf-tf_pc + 4;
-
-	if ((error = getargs(p, tf, code, callp, args, s64)) != 0)
-		goto bad;
-		
-#ifdef __arch64__
-	if (s64)
-		ap = args;
-	else {
-		for (i = 0; i  callp-sy_narg; i++)
-			args64.l[i] = args.i[i];
-		ap = args64;
-	}
-#else
-	ap = args;
-#endif
-
-	if ((error = trace_enter(code, ap-r, callp-sy_narg)) != 0) {
-		goto out;
-	}
-#ifdef __arch64__
-	if (!s64)
-		for (i = 0; i  callp-sy_narg; i++)
-			args.i[i] = args64.l[i];
-#endif
-
-	rval[0] = 0;
-	rval[1] = tf-tf_out[1];
-
-	error = sy_call(callp, l, args, rval);
-out:
-	switch (error) {
-	case 0:
-		/* Note: fork() does not return here in the child */
-		tf-tf_out[0] = rval[0];
-		tf-tf_out[1] = rval[1];
-		if (!new)
-			/* old system call convention: clear C on success */
-			tf-tf_tstate = ~(((int64_t)(ICC_C | XCC_C)) 
-			TSTATE_CCR_SHIFT);	/* success */
-		break;
-
-	case ERESTART:
-		tf-tf_pc = opc;
-		tf-tf_npc = onpc;
-		break;
-
-	case EJUSTRETURN:
-		/* nothing to do */
-		break;
-
-	default:
-	bad:
-		if (p-p_emul-e_errno)
-			error = p-p_emul-e_errno[error];
-		tf-tf_out[0] = error;
-		tf-tf_tstate |= (((int64_t)(ICC_C | XCC_C)) 
-  TSTATE_CCR_SHIFT);	/* fail */
-		tf-tf_pc = onpc;
-		tf-tf_npc = tf-tf_pc + 4;
-		break;
-	}
-
-	if (ap)
-		trace_exit(code, rval, error);
-
-	userret(l, pc, sticks);
-	share_fpu(l, tf);
-}
-
 /*
  * Process the tail end of a fork() for the child.
  */



CVS commit: src/usr.sbin/rtadvd

2013-06-27 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Jun 27 15:46:40 UTC 2013

Modified Files:
src/usr.sbin/rtadvd: rtadvd.c

Log Message:
Check valid lengths of RDNSS and DNSSL options when rtadvd receives RA/RS.
rtadvd doesn't actually look into the option itself, but it may do in the
future to warn about consistency.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/usr.sbin/rtadvd/rtadvd.c

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

Modified files:

Index: src/usr.sbin/rtadvd/rtadvd.c
diff -u src/usr.sbin/rtadvd/rtadvd.c:1.41 src/usr.sbin/rtadvd/rtadvd.c:1.42
--- src/usr.sbin/rtadvd/rtadvd.c:1.41	Fri Dec 14 09:48:31 2012
+++ src/usr.sbin/rtadvd/rtadvd.c	Thu Jun 27 15:46:40 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtadvd.c,v 1.41 2012/12/14 09:48:31 roy Exp $	*/
+/*	$NetBSD: rtadvd.c,v 1.42 2013/06/27 15:46:40 roy Exp $	*/
 /*	$KAME: rtadvd.c,v 1.92 2005/10/17 14:40:02 suz Exp $	*/
 
 /*
@@ -1379,7 +1379,13 @@ nd6_options(struct nd_opt_hdr *hdr, int 
 		if ((hdr-nd_opt_type == ND_OPT_MTU 
 		(optlen != sizeof(struct nd_opt_mtu))) ||
 		((hdr-nd_opt_type == ND_OPT_PREFIX_INFORMATION 
-		optlen != sizeof(struct nd_opt_prefix_info {
+		optlen != sizeof(struct nd_opt_prefix_info))) ||
+		(hdr-nd_opt_type == ND_OPT_RDNSS 
+		((optlen  (int)sizeof(struct nd_opt_rdnss) ||
+		(optlen - sizeof(struct nd_opt_rdnss)) % 16 != 0))) ||
+		(hdr-nd_opt_type == ND_OPT_DNSSL 
+		optlen  (int)sizeof(struct nd_opt_dnssl)))
+		{
 			syslog(LOG_INFO, %s invalid option length,
 			__func__);
 			continue;
@@ -1388,6 +1394,8 @@ nd6_options(struct nd_opt_hdr *hdr, int 
 		switch (hdr-nd_opt_type) {
 		case ND_OPT_TARGET_LINKADDR:
 		case ND_OPT_REDIRECTED_HEADER:
+		case ND_OPT_RDNSS:
+		case ND_OPT_DNSSL:
 			break;	/* we don't care about these options */
 		case ND_OPT_SOURCE_LINKADDR:
 		case ND_OPT_MTU:



CVS commit: src/sys

2013-06-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 27 17:47:18 UTC 2013

Modified Files:
src/sys/kern: uipc_mbuf.c
src/sys/net80211: ieee80211_netbsd.c ieee80211_netbsd.h
src/sys/sys: mbuf.h

Log Message:
- add m_add() that puts an mbuf to end of a chain
- m_append() and m_align() with their family
- remove parameters from prototypes


To generate a diff of this commit:
cvs rdiff -u -r1.149 -r1.150 src/sys/kern/uipc_mbuf.c
cvs rdiff -u -r1.23 -r1.24 src/sys/net80211/ieee80211_netbsd.c
cvs rdiff -u -r1.17 -r1.18 src/sys/net80211/ieee80211_netbsd.h
cvs rdiff -u -r1.151 -r1.152 src/sys/sys/mbuf.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/kern/uipc_mbuf.c
diff -u src/sys/kern/uipc_mbuf.c:1.149 src/sys/kern/uipc_mbuf.c:1.150
--- src/sys/kern/uipc_mbuf.c:1.149	Wed May  8 07:08:45 2013
+++ src/sys/kern/uipc_mbuf.c	Thu Jun 27 13:47:18 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_mbuf.c,v 1.149 2013/05/08 11:08:45 pooka Exp $	*/
+/*	$NetBSD: uipc_mbuf.c,v 1.150 2013/06/27 17:47:18 christos Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2001 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uipc_mbuf.c,v 1.149 2013/05/08 11:08:45 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: uipc_mbuf.c,v 1.150 2013/06/27 17:47:18 christos Exp $);
 
 #include opt_mbuftrace.h
 #include opt_nmbclusters.h
@@ -458,6 +458,88 @@ mb_ctor(void *arg, void *object, int fla
 	return (0);
 }
 
+/*
+ * Add mbuf to the end of a chain
+ */
+struct mbuf *
+m_add(struct mbuf *c, struct mbuf *m) {
+	struct mbuf *n;
+
+	if (c == NULL)
+		return m;
+
+	for (n = c; n-m_next != NULL; n = n-m_next)
+		continue;
+	n-m_next = m;
+	return c;
+}
+
+/*
+ * Set the m_data pointer of a newly-allocated mbuf
+ * to place an object of the specified size at the
+ * end of the mbuf, longword aligned.
+ */
+void
+m_align(struct mbuf *m, int len)
+{
+   int adjust;
+
+   if (m-m_flags  M_EXT)
+	   adjust = m-m_ext.ext_size - len;
+   else if (m-m_flags  M_PKTHDR)
+	   adjust = MHLEN - len;
+   else
+	   adjust = MLEN - len;
+   m-m_data += adjust ~ (sizeof(long)-1);
+}
+
+/*
+ * Append the specified data to the indicated mbuf chain,
+ * Extend the mbuf chain if the new data does not fit in
+ * existing space.
+ *
+ * Return 1 if able to complete the job; otherwise 0.
+ */
+int
+m_append(struct mbuf *m0, int len, const void *cpv)
+{
+	struct mbuf *m, *n;
+	int remainder, space;
+	const char *cp = cpv;
+
+	for (m = m0; m-m_next != NULL; m = m-m_next)
+		continue;
+	remainder = len;
+	space = M_TRAILINGSPACE(m);
+	if (space  0) {
+		/*
+		 * Copy into available space.
+		 */
+		if (space  remainder)
+			space = remainder;
+		memmove(mtod(m, char *) + m-m_len, cp, space);
+		m-m_len += space;
+		cp = cp + space, remainder -= space;
+	}
+	while (remainder  0) {
+		/*
+		 * Allocate a new mbuf; could check space
+		 * and allocate a cluster instead.
+		 */
+		n = m_get(M_DONTWAIT, m-m_type);
+		if (n == NULL)
+			break;
+		n-m_len = min(MLEN, remainder);
+		memmove(mtod(n, void *), cp, n-m_len);
+		cp += n-m_len, remainder -= n-m_len;
+		m-m_next = n;
+		m = n;
+	}
+	if (m0-m_flags  M_PKTHDR)
+		m0-m_pkthdr.len += len - remainder;
+	return (remainder == 0);
+}
+
 void
 m_reclaim(void *arg, int flags)
 {

Index: src/sys/net80211/ieee80211_netbsd.c
diff -u src/sys/net80211/ieee80211_netbsd.c:1.23 src/sys/net80211/ieee80211_netbsd.c:1.24
--- src/sys/net80211/ieee80211_netbsd.c:1.23	Mon Feb  4 10:44:45 2013
+++ src/sys/net80211/ieee80211_netbsd.c	Thu Jun 27 13:47:18 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: ieee80211_netbsd.c,v 1.23 2013/02/04 15:44:45 christos Exp $ */
+/* $NetBSD: ieee80211_netbsd.c,v 1.24 2013/06/27 17:47:18 christos Exp $ */
 /*-
  * Copyright (c) 2003-2005 Sam Leffler, Errno Consulting
  * All rights reserved.
@@ -30,7 +30,7 @@
 #ifdef __FreeBSD__
 __FBSDID($FreeBSD: src/sys/net80211/ieee80211_freebsd.c,v 1.8 2005/08/08 18:46:35 sam Exp $);
 #else
-__KERNEL_RCSID(0, $NetBSD: ieee80211_netbsd.c,v 1.23 2013/02/04 15:44:45 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: ieee80211_netbsd.c,v 1.24 2013/06/27 17:47:18 christos Exp $);
 #endif
 
 /*
@@ -535,71 +535,6 @@ if_printf(struct ifnet *ifp, const char 
 	return;
 }
 
-/*
- * Set the m_data pointer of a newly-allocated mbuf
- * to place an object of the specified size at the
- * end of the mbuf, longword aligned.
- */
-void
-m_align(struct mbuf *m, int len)
-{
-   int adjust;
-
-   if (m-m_flags  M_EXT)
-	   adjust = m-m_ext.ext_size - len;
-   else if (m-m_flags  M_PKTHDR)
-	   adjust = MHLEN - len;
-   else
-	   adjust = MLEN - len;
-   m-m_data += adjust ~ (sizeof(long)-1);
-}
-
-/*
- * Append the specified data to the indicated mbuf chain,
- * Extend the mbuf chain if the new data does not fit in
- * existing space.
- *
- * Return 1 if able to complete the job; otherwise 

CVS commit: src/sys

2013-06-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 27 18:53:18 UTC 2013

Modified Files:
src/sys/kern: uipc_socket2.c
src/sys/sys: socketvar.h

Log Message:
Introduce a more general method of sbcreatecontrol, sbcreatecontrol1 that
can take flags (M_WAITOK), and allocate large messages if needed. It also
returns the allocated pointer instead of copying the data to the passed
pointer. Implement sbcreatecontrol() using that.


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/sys/kern/uipc_socket2.c
cvs rdiff -u -r1.129 -r1.130 src/sys/sys/socketvar.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/kern/uipc_socket2.c
diff -u src/sys/kern/uipc_socket2.c:1.110 src/sys/kern/uipc_socket2.c:1.111
--- src/sys/kern/uipc_socket2.c:1.110	Tue Dec 20 18:56:28 2011
+++ src/sys/kern/uipc_socket2.c	Thu Jun 27 14:53:17 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_socket2.c,v 1.110 2011/12/20 23:56:28 christos Exp $	*/
+/*	$NetBSD: uipc_socket2.c,v 1.111 2013/06/27 18:53:17 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uipc_socket2.c,v 1.110 2011/12/20 23:56:28 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: uipc_socket2.c,v 1.111 2013/06/27 18:53:17 christos Exp $);
 
 #include opt_mbuftrace.h
 #include opt_sb_max.h
@@ -1301,32 +1301,49 @@ sbdroprecord(struct sockbuf *sb)
  * with the specified type for presentation on a socket buffer.
  */
 struct mbuf *
-sbcreatecontrol(void *p, int size, int type, int level)
+sbcreatecontrol1(void **p, int size, int type, int level, int flags)
 {
 	struct cmsghdr	*cp;
 	struct mbuf	*m;
+	int space = CMSG_SPACE(size);
 
-	if (CMSG_SPACE(size)  MCLBYTES) {
-		printf(sbcreatecontrol: message too large %d\n, size);
+	if ((flags  M_DONTWAIT)  space  MCLBYTES) {
+		printf(%s: message too large %d\n, __func__, space);
 		return NULL;
 	}
 
-	if ((m = m_get(M_DONTWAIT, MT_CONTROL)) == NULL)
-		return (NULL);
-	if (CMSG_SPACE(size)  MLEN) {
-		MCLGET(m, M_DONTWAIT);
+	if ((m = m_get(flags, MT_CONTROL)) == NULL)
+		return NULL;
+	if (space  MLEN) {
+		if (space  MCLBYTES)
+			MEXTMALLOC(m, space, M_WAITOK);
+		else
+			MCLGET(m, flags);
 		if ((m-m_flags  M_EXT) == 0) {
 			m_free(m);
 			return NULL;
 		}
 	}
 	cp = mtod(m, struct cmsghdr *);
-	memcpy(CMSG_DATA(cp), p, size);
-	m-m_len = CMSG_SPACE(size);
+	*p = CMSG_DATA(cp);
+	m-m_len = space;
 	cp-cmsg_len = CMSG_LEN(size);
 	cp-cmsg_level = level;
 	cp-cmsg_type = type;
-	return (m);
+	return m;
+}
+
+struct mbuf *
+sbcreatecontrol(void *p, int size, int type, int level)
+{
+	struct mbuf *m;
+	void *v;
+
+	m = sbcreatecontrol1(v, size, type, level, M_DONTWAIT);
+	if (m == NULL)
+		return NULL;
+	memcpy(v, p, size);
+	return m;
 }
 
 void

Index: src/sys/sys/socketvar.h
diff -u src/sys/sys/socketvar.h:1.129 src/sys/sys/socketvar.h:1.130
--- src/sys/sys/socketvar.h:1.129	Tue Jan 31 21:27:23 2012
+++ src/sys/sys/socketvar.h	Thu Jun 27 14:53:18 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: socketvar.h,v 1.129 2012/02/01 02:27:23 matt Exp $	*/
+/*	$NetBSD: socketvar.h,v 1.130 2013/06/27 18:53:18 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -272,6 +272,8 @@ void	sbcheck(struct sockbuf *);
 void	sbcompress(struct sockbuf *, struct mbuf *, struct mbuf *);
 struct mbuf *
 	sbcreatecontrol(void *, int, int, int);
+struct mbuf *
+	sbcreatecontrol1(void **, int, int, int, int);
 void	sbdrop(struct sockbuf *, int);
 void	sbdroprecord(struct sockbuf *);
 void	sbflush(struct sockbuf *);



CVS commit: src/sys/kern

2013-06-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 27 18:54:31 UTC 2013

Modified Files:
src/sys/kern: uipc_usrreq.c

Log Message:
use sbcreatecontrol1() and m_add() instead of open-coding everything, and
getting it slightly wrong.


To generate a diff of this commit:
cvs rdiff -u -r1.141 -r1.142 src/sys/kern/uipc_usrreq.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/uipc_usrreq.c
diff -u src/sys/kern/uipc_usrreq.c:1.141 src/sys/kern/uipc_usrreq.c:1.142
--- src/sys/kern/uipc_usrreq.c:1.141	Wed Feb 13 20:00:07 2013
+++ src/sys/kern/uipc_usrreq.c	Thu Jun 27 14:54:31 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_usrreq.c,v 1.141 2013/02/14 01:00:07 riastradh Exp $	*/
+/*	$NetBSD: uipc_usrreq.c,v 1.142 2013/06/27 18:54:31 christos Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000, 2004, 2008, 2009 The NetBSD Foundation, Inc.
@@ -96,7 +96,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uipc_usrreq.c,v 1.141 2013/02/14 01:00:07 riastradh Exp $);
+__KERNEL_RCSID(0, $NetBSD: uipc_usrreq.c,v 1.142 2013/06/27 18:54:31 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -1465,52 +1465,26 @@ unp_internalize(struct mbuf **controlp)
 struct mbuf *
 unp_addsockcred(struct lwp *l, struct mbuf *control)
 {
-	struct cmsghdr *cmp;
 	struct sockcred *sc;
-	struct mbuf *m, *n;
-	int len, space, i;
-
-	len = CMSG_LEN(SOCKCREDSIZE(kauth_cred_ngroups(l-l_cred)));
-	space = CMSG_SPACE(SOCKCREDSIZE(kauth_cred_ngroups(l-l_cred)));
-
-	m = m_get(M_WAIT, MT_CONTROL);
-	if (space  MLEN) {
-		if (space  MCLBYTES)
-			MEXTMALLOC(m, space, M_WAITOK);
-		else
-			m_clget(m, M_WAIT);
-		if ((m-m_flags  M_EXT) == 0) {
-			m_free(m);
-			return (control);
-		}
-	}
+	struct mbuf *m;
+	void *p;
 
-	m-m_len = space;
-	m-m_next = NULL;
-	cmp = mtod(m, struct cmsghdr *);
-	sc = (struct sockcred *)CMSG_DATA(cmp);
-	cmp-cmsg_len = len;
-	cmp-cmsg_level = SOL_SOCKET;
-	cmp-cmsg_type = SCM_CREDS;
+	m = sbcreatecontrol1(p, SOCKCREDSIZE(kauth_cred_ngroups(l-l_cred)),
+		SCM_CREDS, SOL_SOCKET, M_WAITOK);
+	if (m == NULL)
+		return control;
+		
+	sc = p;
 	sc-sc_uid = kauth_cred_getuid(l-l_cred);
 	sc-sc_euid = kauth_cred_geteuid(l-l_cred);
 	sc-sc_gid = kauth_cred_getgid(l-l_cred);
 	sc-sc_egid = kauth_cred_getegid(l-l_cred);
 	sc-sc_ngroups = kauth_cred_ngroups(l-l_cred);
-	for (i = 0; i  sc-sc_ngroups; i++)
-		sc-sc_groups[i] = kauth_cred_group(l-l_cred, i);
 
-	/*
-	 * If a control message already exists, append us to the end.
-	 */
-	if (control != NULL) {
-		for (n = control; n-m_next != NULL; n = n-m_next)
-			;
-		n-m_next = m;
-	} else
-		control = m;
+	for (int i = 0; i  sc-sc_ngroups; i++)
+		sc-sc_groups[i] = kauth_cred_group(l-l_cred, i);
 
-	return (control);
+	return m_add(control, m);
 }
 
 /*



CVS commit: src/sys/netinet

2013-06-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 27 19:38:16 UTC 2013

Modified Files:
src/sys/netinet: in.h in_pcb.h ip_input.c ip_output.c

Log Message:
implement IP_PKTINFO and IP_RECVPKTINFO.


To generate a diff of this commit:
cvs rdiff -u -r1.88 -r1.89 src/sys/netinet/in.h
cvs rdiff -u -r1.50 -r1.51 src/sys/netinet/in_pcb.h
cvs rdiff -u -r1.305 -r1.306 src/sys/netinet/ip_input.c
cvs rdiff -u -r1.222 -r1.223 src/sys/netinet/ip_output.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/netinet/in.h
diff -u src/sys/netinet/in.h:1.88 src/sys/netinet/in.h:1.89
--- src/sys/netinet/in.h:1.88	Sat Apr 27 17:35:24 2013
+++ src/sys/netinet/in.h	Thu Jun 27 15:38:16 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: in.h,v 1.88 2013/04/27 21:35:24 joerg Exp $	*/
+/*	$NetBSD: in.h,v 1.89 2013/06/27 19:38:16 christos Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -287,6 +287,17 @@ struct ip_opts {
 #endif
 #define	IP_RECVTTL		23   /* bool; receive IP TTL w/dgram */
 #define	IP_MINTTL		24   /* minimum TTL for packet or drop */
+#define	IP_PKTINFO		25   /* int; send interface and src addr */
+#define	IP_RECVPKTINFO		26   /* int; send interface and dst addr */
+
+/*
+ * Information sent in the control message of a datagram socket for
+ * IP_PKTINFO and IP_RECVPKTINFO.
+ */
+struct in_pktinfo {
+	struct in_addr	ipi_addr;	/* src/dst address */
+	unsigned int ipi_ifindex;	/* interface index */
+};
 
 /*
  * Defaults and limits for options

Index: src/sys/netinet/in_pcb.h
diff -u src/sys/netinet/in_pcb.h:1.50 src/sys/netinet/in_pcb.h:1.51
--- src/sys/netinet/in_pcb.h:1.50	Mon Jun 25 11:28:39 2012
+++ src/sys/netinet/in_pcb.h	Thu Jun 27 15:38:16 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: in_pcb.h,v 1.50 2012/06/25 15:28:39 christos Exp $	*/
+/*	$NetBSD: in_pcb.h,v 1.51 2013/06/27 19:38:16 christos Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -100,28 +100,31 @@ struct inpcb {
 #define	inp_laddr	inp_ip.ip_src
 
 /* flags in inp_flags: */
-#define	INP_RECVOPTS		0x01	/* receive incoming IP options */
-#define	INP_RECVRETOPTS		0x02	/* receive IP options for reply */
-#define	INP_RECVDSTADDR		0x04	/* receive IP dst address */
-#define	INP_HDRINCL		0x08	/* user supplies entire IP header */
-#define	INP_HIGHPORT		0x10	/* (unused; FreeBSD compat) */
-#define	INP_LOWPORT		0x20	/* user wants low port binding */
-#define	INP_ANONPORT		0x40	/* port chosen for user */
-#define	INP_RECVIF		0x80	/* receive incoming interface */
+#define	INP_RECVOPTS		0x0001	/* receive incoming IP options */
+#define	INP_RECVRETOPTS		0x0002	/* receive IP options for reply */
+#define	INP_RECVDSTADDR		0x0004	/* receive IP dst address */
+#define	INP_HDRINCL		0x0008	/* user supplies entire IP header */
+#define	INP_HIGHPORT		0x0010	/* (unused; FreeBSD compat) */
+#define	INP_LOWPORT		0x0020	/* user wants low port binding */
+#define	INP_ANONPORT		0x0040	/* port chosen for user */
+#define	INP_RECVIF		0x0080	/* receive incoming interface */
 /* XXX should move to an UDP control block */
-#define INP_ESPINUDP		0x100	/* ESP over UDP for NAT-T */
-#define INP_ESPINUDP_NON_IKE	0x200	/* ESP over UDP for NAT-T */
+#define INP_ESPINUDP		0x0100	/* ESP over UDP for NAT-T */
+#define INP_ESPINUDP_NON_IKE	0x0200	/* ESP over UDP for NAT-T */
 #define INP_ESPINUDP_ALL	(INP_ESPINUDP|INP_ESPINUDP_NON_IKE)
-#define INP_NOHEADER		0x400	/* Kernel removes IP header
+#define INP_NOHEADER		0x0400	/* Kernel removes IP header
 	 * before feeding a packet
 	 * to the raw socket user.
 	 * The socket user will
 	 * not supply an IP header.
 	 * Cancels INP_HDRINCL.
 	 */
-#define	INP_RECVTTL		0x800	/* receive incoming IP TTL */
+#define	INP_RECVTTL		0x0800	/* receive incoming IP TTL */
+#define	INP_PKTINFO		0x1000	/* receive dst packet info */
+#define	INP_RECVPKTINFO		0x2000	/* receive dst packet info */
 #define	INP_CONTROLOPTS		(INP_RECVOPTS|INP_RECVRETOPTS|INP_RECVDSTADDR|\
-INP_RECVIF|INP_RECVTTL)
+INP_RECVIF|INP_RECVTTL|INP_RECVPKTINFO|\
+INP_PKTINFO)
 
 #define	sotoinpcb(so)		((struct inpcb *)(so)-so_pcb)
 

Index: src/sys/netinet/ip_input.c
diff -u src/sys/netinet/ip_input.c:1.305 src/sys/netinet/ip_input.c:1.306
--- src/sys/netinet/ip_input.c:1.305	Sat Jun  8 09:50:22 2013
+++ src/sys/netinet/ip_input.c	Thu Jun 27 15:38:16 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip_input.c,v 1.305 2013/06/08 13:50:22 rmind Exp $	*/
+/*	$NetBSD: ip_input.c,v 1.306 2013/06/27 19:38:16 christos Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,7 +91,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ip_input.c,v 1.305 2013/06/08 13:50:22 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: ip_input.c,v 1.306 2013/06/27 19:38:16 christos Exp $);
 
 #include opt_inet.h
 #include opt_compat_netbsd.h
@@ -1405,6 +1405,24 @@ ip_savecontrol(struct inpcb *inp, struct
 		if (*mp)
 			mp = (*mp)-m_next;
 

CVS commit: src/tests/net/net

2013-06-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 27 20:01:24 UTC 2013

Modified Files:
src/tests/net/net: Makefile
Added Files:
src/tests/net/net: t_pktinfo.c

Log Message:
add a pktinfo test


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/net/net/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/net/net/t_pktinfo.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/net/net/Makefile
diff -u src/tests/net/net/Makefile:1.4 src/tests/net/net/Makefile:1.5
--- src/tests/net/net/Makefile:1.4	Sat Jan  5 19:35:22 2013
+++ src/tests/net/net/Makefile	Thu Jun 27 16:01:24 2013
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2013/01/06 00:35:22 christos Exp $
+# $NetBSD: Makefile,v 1.5 2013/06/27 20:01:24 christos Exp $
 #
 
 .include bsd.own.mk
@@ -8,6 +8,7 @@ TESTSDIR=	${TESTSBASE}/net/net
 TESTS_C=	t_raw
 TESTS_C+=	t_unix
 TESTS_C+=	t_udp
+TESTS_C+=	t_pktinfo
 
 LDADD.t_raw+=		-lrumpnet_local -lrumpnet_netinet -lrumpnet_net
 LDADD.t_raw+=		-lrumpnet -lrumpvfs -lrump -lrumpuser -lpthread

Added files:

Index: src/tests/net/net/t_pktinfo.c
diff -u /dev/null src/tests/net/net/t_pktinfo.c:1.1
--- /dev/null	Thu Jun 27 16:01:24 2013
+++ src/tests/net/net/t_pktinfo.c	Thu Jun 27 16:01:24 2013
@@ -0,0 +1,193 @@
+/*	$NetBSD: t_pktinfo.c,v 1.1 2013/06/27 20:01:24 christos Exp $	*/
+
+/*-
+ * Copyright (c) 2013 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas.
+ *
+ * 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 sys/cdefs.h
+__RCSID($NetBSD: t_pktinfo.c,v 1.1 2013/06/27 20:01:24 christos Exp $);
+
+#include sys/types.h
+#include sys/socket.h
+#include netinet/in.h
+#include arpa/inet.h
+#include stdlib.h
+#include unistd.h
+#include stdio.h
+#include string.h
+#include errno.h
+
+static const char traffic[] = foo;
+
+#ifdef TEST
+#include err.h
+#define ERR(msg) err(EXIT_FAILURE, msg)
+#define ERRX(msg, a) errx(EXIT_FAILURE, msg, a)
+#define ERRX2(msg, a1, a2) errx(EXIT_FAILURE, msg, a1, a2)
+#else
+#include atf-c.h
+#define ERR(msg) ATF_REQUIRE_MSG(0, %s: %s, msg, strerror(errno))
+#define ERRX(msg, a) ATF_REQUIRE_MSG(0, msg, a)
+#define ERRX2(msg, a1, a2) ATF_REQUIRE_MSG(0, msg, a1, a2)
+#endif
+
+static int
+server(struct sockaddr_in *sin) {
+	int s, one;
+	socklen_t len = sizeof(*sin);
+
+	if ((s = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1)
+		ERR(socket);
+
+	memset(sin, 0, len);
+	sin-sin_family = AF_INET;
+	sin-sin_len = len;
+	sin-sin_port = 0;
+	sin-sin_addr.s_addr = htonl(INADDR_LOOPBACK);
+
+	if (bind(s, (const struct sockaddr *)sin, len) == -1)
+		ERR(bind);
+
+	if (getsockname(s, (struct sockaddr *)sin, len) == -1)
+		ERR(getsockname);
+
+	one = 1;
+	if (setsockopt(s, IPPROTO_IP, IP_PKTINFO, one, sizeof(one)) == -1)
+		ERR(setsockopt);
+	if (setsockopt(s, IPPROTO_IP, IP_RECVPKTINFO, one, sizeof(one)) == -1)
+		ERR(setsockopt);
+
+	return s;
+}
+
+static int
+client(struct sockaddr_in *sin) {
+	int s;
+
+	if ((s = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1)
+		ERR(socket);
+	if (sendto(s, traffic, sizeof(traffic), 0,
+	(const struct sockaddr *)sin, sizeof(*sin)) == -1)
+		ERR(sendto);
+	return s;
+}
+
+static void
+receive(int s) {
+	struct msghdr msg;
+	struct cmsghdr *cmsg;
+	struct iovec iov;
+	char buf[sizeof(traffic)];
+	struct in_pktinfo *ipi;
+	char control[CMSG_SPACE(sizeof(*ipi)) * 2];
+
+	memset(msg, 0, sizeof(msg));
+	msg.msg_name = NULL;
+	msg.msg_namelen = 0;
+	msg.msg_iov = iov;
+	memset(iov, 0, sizeof(iov));
+	iov.iov_base = buf;
+	iov.iov_len = sizeof(buf);
+	msg.msg_iovlen 

CVS commit: src/distrib/sets/lists

2013-06-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 27 20:03:36 UTC 2013

Modified Files:
src/distrib/sets/lists/debug: mi
src/distrib/sets/lists/tests: mi

Log Message:
add pktinfo tests


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.536 -r1.537 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/debug/mi
diff -u src/distrib/sets/lists/debug/mi:1.23 src/distrib/sets/lists/debug/mi:1.24
--- src/distrib/sets/lists/debug/mi:1.23	Tue May 28 12:57:56 2013
+++ src/distrib/sets/lists/debug/mi	Thu Jun 27 16:03:36 2013
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.23 2013/05/28 16:57:56 joerg Exp $
+# $NetBSD: mi,v 1.24 2013/06/27 20:03:36 christos Exp $
 ./etc/mtree/set.debug   comp-sys-root
 ./usr/libdata/debug/bin/cat.debug		comp-util-debug		debug
 ./usr/libdata/debug/bin/chio.debug		comp-util-debug		debug
@@ -1817,6 +1817,7 @@
 ./usr/libdata/debug/usr/tests/net/icmp/t_ping.debug		tests-net-debug		debug,atf,rump
 ./usr/libdata/debug/usr/tests/net/if/t_compat.debug		tests-net-debug		debug,atf,rump
 ./usr/libdata/debug/usr/tests/net/if_loop/t_pr.debug		tests-net-debug		debug,atf,rump
+./usr/libdata/debug/usr/tests/net/net/t_pktinfo.debug		tests-net-debug		debug,atf
 ./usr/libdata/debug/usr/tests/net/net/t_raw.debug		tests-net-debug		debug,atf,rump
 ./usr/libdata/debug/usr/tests/net/net/t_udp.debug		tests-net-debug		debug,atf,rump
 ./usr/libdata/debug/usr/tests/net/net/t_unix.debug		tests-net-debug		debug,atf,rump

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.536 src/distrib/sets/lists/tests/mi:1.537
--- src/distrib/sets/lists/tests/mi:1.536	Tue May 28 12:57:56 2013
+++ src/distrib/sets/lists/tests/mi	Thu Jun 27 16:03:36 2013
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.536 2013/05/28 16:57:56 joerg Exp $
+# $NetBSD: mi,v 1.537 2013/06/27 20:03:36 christos Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -2600,6 +2600,7 @@
 ./usr/tests/net/nettests-net-tests
 ./usr/tests/net/net/Atffile			tests-net-tests		atf,rump
 ./usr/tests/net/net/Kyuafile			tests-net-tests		atf,rump,kyua
+./usr/tests/net/net/t_pktinfo		tests-net-tests		atf
 ./usr/tests/net/net/t_raw		tests-net-tests		atf,rump
 ./usr/tests/net/net/t_udp		tests-net-tests		atf,rump
 ./usr/tests/net/net/t_unix		tests-net-tests		atf,rump



CVS commit: src/share/man/man4

2013-06-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 27 20:14:25 UTC 2013

Modified Files:
src/share/man/man4: ip.4

Log Message:
add pktinfo stuff


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/share/man/man4/ip.4

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/man4/ip.4
diff -u src/share/man/man4/ip.4:1.33 src/share/man/man4/ip.4:1.34
--- src/share/man/man4/ip.4:1.33	Mon Jun 25 10:47:55 2012
+++ src/share/man/man4/ip.4	Thu Jun 27 16:14:25 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: ip.4,v 1.33 2012/06/25 14:47:55 christos Exp $
+.\	$NetBSD: ip.4,v 1.34 2013/06/27 20:14:25 christos Exp $
 .\
 .\ Copyright (c) 1983, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\
 .\ @(#)ip.4	8.2 (Berkeley) 11/30/93
 .\
-.Dd June 25, 2012
+.Dd June 27, 2013
 .Dt IP 4
 .Os
 .Sh NAME
@@ -111,6 +111,25 @@ setsockopt(s, IPPROTO_IP, IP_IPSEC_POLIC
 .Ed
 .Pp
 The
+.Dv IP_PKTINFO
+option can be used to turn on receiving of information about the source
+address of the packet, and the interface index. The information is passed
+in an
+.Tp struct in_pktinfo
+structure, which contains
+.Bd -literal
+	struct in_addr ipi_addr;	/* the source or destination address */
+	unsigned int ipi_ifindex;	/* the interface index */
+.Ed
+and added to the control portion of the message:
+The cmsghdr fields have the following values:
+.Bd -literal
+cmsg_len = CMSG_LEN(sizeof(struct in_pktinfo))
+cmsg_level = IPPROTO_IP
+cmsg_type = IP_PKTINFO
+.Ed
+.Pp
+The
 .Dv IP_PORTALGO
 can be used to randomize the port selection.
 Valid algorithms are described in
@@ -189,6 +208,13 @@ cmsg_level = IPPROTO_IP
 cmsg_type = IP_RECVIF
 .Ed
 .Pp
+The
+.Dv IP_RECVPKTINFO
+option is similar to the
+.Dv IP_PKTINFO
+one, only in this case the inbound information is returned.
+i
+.Pp
 If the
 .Dv IP_RECVTTL
 option is enabled on a



CVS commit: src/sys/netinet

2013-06-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 27 20:17:36 UTC 2013

Modified Files:
src/sys/netinet: ip_input.c

Log Message:
flip src/dst


To generate a diff of this commit:
cvs rdiff -u -r1.306 -r1.307 src/sys/netinet/ip_input.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/netinet/ip_input.c
diff -u src/sys/netinet/ip_input.c:1.306 src/sys/netinet/ip_input.c:1.307
--- src/sys/netinet/ip_input.c:1.306	Thu Jun 27 15:38:16 2013
+++ src/sys/netinet/ip_input.c	Thu Jun 27 16:17:36 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip_input.c,v 1.306 2013/06/27 19:38:16 christos Exp $	*/
+/*	$NetBSD: ip_input.c,v 1.307 2013/06/27 20:17:36 christos Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,7 +91,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ip_input.c,v 1.306 2013/06/27 19:38:16 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: ip_input.c,v 1.307 2013/06/27 20:17:36 christos Exp $);
 
 #include opt_inet.h
 #include opt_compat_netbsd.h
@@ -1407,7 +1407,7 @@ ip_savecontrol(struct inpcb *inp, struct
 	}
 	if (inp-inp_flags  INP_RECVPKTINFO) {
 		struct in_pktinfo ipi;
-		ipi.ipi_addr = ip-ip_dst;
+		ipi.ipi_addr = ip-ip_src;
 		ipi.ipi_ifindex = m-m_pkthdr.rcvif-if_index;
 		*mp = sbcreatecontrol((void *) ipi,
 		sizeof(ipi), IP_RECVPKTINFO, IPPROTO_IP);
@@ -1416,7 +1416,7 @@ ip_savecontrol(struct inpcb *inp, struct
 	}
 	if (inp-inp_flags  INP_PKTINFO) {
 		struct in_pktinfo ipi;
-		ipi.ipi_addr = ip-ip_src;
+		ipi.ipi_addr = ip-ip_dst;
 		ipi.ipi_ifindex = m-m_pkthdr.rcvif-if_index;
 		*mp = sbcreatecontrol((void *) ipi,
 		sizeof(ipi), IP_PKTINFO, IPPROTO_IP);



CVS commit: src/sys/arch/acorn26/acorn26

2013-06-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 27 21:16:20 UTC 2013

Modified Files:
src/sys/arch/acorn26/acorn26: cpu.c

Log Message:
move assignment outside setjmp, because static analyzers are not smart enough
to know that it is impossible for id to be uninitialized.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/acorn26/acorn26/cpu.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/acorn26/acorn26/cpu.c
diff -u src/sys/arch/acorn26/acorn26/cpu.c:1.28 src/sys/arch/acorn26/acorn26/cpu.c:1.29
--- src/sys/arch/acorn26/acorn26/cpu.c:1.28	Sat Nov 21 15:32:13 2009
+++ src/sys/arch/acorn26/acorn26/cpu.c	Thu Jun 27 17:16:20 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.28 2009/11/21 20:32:13 rmind Exp $ */
+/* $NetBSD: cpu.c,v 1.29 2013/06/27 21:16:20 christos Exp $ */
 
 /*-
  * Copyright (c) 2000, 2001 Ben Harris
@@ -32,7 +32,7 @@
 
 #include sys/param.h
 
-__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.28 2009/11/21 20:32:13 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.29 2013/06/27 21:16:20 christos Exp $);
 
 #include sys/device.h
 #include sys/proc.h
@@ -147,14 +147,13 @@ static register_t
 cpu_identify(void)
 {
 	register_t dummy;
-	volatile register_t id;
+	volatile register_t id = CPU_ID_ARM2;
 	void *cp_core, *cp15;
 
 	cp_core = install_coproc_handler(CORE_UNKNOWN_HANDLER,
 	cpu_undef_handler);
 	cp15 = install_coproc_handler(SYSTEM_COPROC, cpu_undef_handler);
 	if (setjmp(undef_jmp) == 0) {
-		id = CPU_ID_ARM2;
 		/* ARM250 and ARM3 support SWP. */
 		__asm volatile (swp r0, r0, [%0] : : r (dummy) : r0);
 		id = CPU_ID_ARM250;



CVS commit: src/sys/arch/alpha/eisa

2013-06-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 27 21:21:05 UTC 2013

Modified Files:
src/sys/arch/alpha/eisa: eisa_machdep.c

Log Message:
don't forget to insert the io to the list
http://M00nBSD.net/ae123a9bae03f7dde5c6d654412daf5a.html


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/alpha/eisa/eisa_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/alpha/eisa/eisa_machdep.c
diff -u src/sys/arch/alpha/eisa/eisa_machdep.c:1.9 src/sys/arch/alpha/eisa/eisa_machdep.c:1.10
--- src/sys/arch/alpha/eisa/eisa_machdep.c:1.9	Sun Feb  5 21:14:13 2012
+++ src/sys/arch/alpha/eisa/eisa_machdep.c	Thu Jun 27 17:21:05 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: eisa_machdep.c,v 1.9 2012/02/06 02:14:13 matt Exp $ */
+/* $NetBSD: eisa_machdep.c,v 1.10 2013/06/27 21:21:05 christos Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(0, $NetBSD: eisa_machdep.c,v 1.9 2012/02/06 02:14:13 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: eisa_machdep.c,v 1.10 2013/06/27 21:21:05 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -255,6 +255,7 @@ eisa_parse_io(struct ecu_func *ecuf, uin
 		ecuio-ecuio_io.ecio_addr = dp[1] | (dp[2]  8);
 		ecuio-ecuio_io.ecio_size = (dp[0]  0x1f) + 1;
 		ecuio-ecuio_io.ecio_shared = (dp[0]  0x40) ? 1 : 0;
+		SIMPLEQ_INSERT_TAIL(ecuf-ecuf_io, ecuio, ecuio_list);
 
 #ifdef EISA_DEBUG
 		printf(IO 0x%lx 0x%lx%s\n, ecuio-ecuio_io.ecio_addr,



CVS commit: src/share/man/man4

2013-06-27 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu Jun 27 21:22:46 UTC 2013

Modified Files:
src/share/man/man4: ip.4

Log Message:
New sentence, new line. Fix typo. Remove 'i'.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/share/man/man4/ip.4

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/man4/ip.4
diff -u src/share/man/man4/ip.4:1.34 src/share/man/man4/ip.4:1.35
--- src/share/man/man4/ip.4:1.34	Thu Jun 27 20:14:25 2013
+++ src/share/man/man4/ip.4	Thu Jun 27 21:22:46 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: ip.4,v 1.34 2013/06/27 20:14:25 christos Exp $
+.\	$NetBSD: ip.4,v 1.35 2013/06/27 21:22:46 wiz Exp $
 .\
 .\ Copyright (c) 1983, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -113,8 +113,8 @@ setsockopt(s, IPPROTO_IP, IP_IPSEC_POLIC
 The
 .Dv IP_PKTINFO
 option can be used to turn on receiving of information about the source
-address of the packet, and the interface index. The information is passed
-in an
+address of the packet, and the interface index.
+The information is passed in a
 .Tp struct in_pktinfo
 structure, which contains
 .Bd -literal
@@ -213,7 +213,6 @@ The
 option is similar to the
 .Dv IP_PKTINFO
 one, only in this case the inbound information is returned.
-i
 .Pp
 If the
 .Dv IP_RECVTTL



CVS commit: src/sys/arch/ia64/stand/common

2013-06-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 27 21:22:16 UTC 2013

Modified Files:
src/sys/arch/ia64/stand/common: fileload.c

Log Message:
fix uninitialized variable
http://M00nBSD.net/ae123a9bae03f7dde5c6d654412daf5a.html


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/stand/common/fileload.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/ia64/stand/common/fileload.c
diff -u src/sys/arch/ia64/stand/common/fileload.c:1.3 src/sys/arch/ia64/stand/common/fileload.c:1.4
--- src/sys/arch/ia64/stand/common/fileload.c:1.3	Thu Dec 27 15:21:51 2012
+++ src/sys/arch/ia64/stand/common/fileload.c	Thu Jun 27 17:22:16 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: fileload.c,v 1.3 2012/12/27 20:21:51 martin Exp $	*/
+/*	$NetBSD: fileload.c,v 1.4 2013/06/27 21:22:16 christos Exp $	*/
 
 /*-
  * Copyright (c) 1998 Michael Smith msm...@freebsd.org
@@ -61,7 +61,7 @@ int
 command_load(int argc, char *argv[])
 {
 char	*typestr;
-int		dofile, dokld, ch, error;
+int		dofile, dokld, ch;
 
 dokld = dofile = 0;
 optind = 1;
@@ -89,11 +89,12 @@ command_load(int argc, char *argv[])
  * Do we have explicit KLD load ?
  */
 if (dokld || file_havepath(argv[1])) {
-	error = file_loadkernel(argv[1], argc - 2, argv + 2);
+	int error = file_loadkernel(argv[1], argc - 2, argv + 2);
 	if (error == EEXIST)
 	sprintf(command_errbuf, warning: KLD '%s' already loaded, argv[1]);
+	return error == 0 ? CMD_OK : CMD_ERROR;
 }
-return (error == 0 ? CMD_OK : CMD_ERROR);
+return CMD_OK;
 }
 
 



CVS commit: src/sys/arch/mipsco/stand/installboot

2013-06-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 27 21:23:21 UTC 2013

Modified Files:
src/sys/arch/mipsco/stand/installboot: installboot.c

Log Message:
free boot_code
http://M00nBSD.net/ae123a9bae03f7dde5c6d654412daf5a.html


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/mipsco/stand/installboot/installboot.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/mipsco/stand/installboot/installboot.c
diff -u src/sys/arch/mipsco/stand/installboot/installboot.c:1.8 src/sys/arch/mipsco/stand/installboot/installboot.c:1.9
--- src/sys/arch/mipsco/stand/installboot/installboot.c:1.8	Wed Mar 18 06:22:32 2009
+++ src/sys/arch/mipsco/stand/installboot/installboot.c	Thu Jun 27 17:23:21 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: installboot.c,v 1.8 2009/03/18 10:22:32 cegger Exp $	*/
+/*	$NetBSD: installboot.c,v 1.9 2013/06/27 21:23:21 christos Exp $	*/
 
 /*
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -219,6 +219,7 @@ do_install(const char *disk, const char 
 	if ((fd = open(disk, O_WRONLY)) == -1)
 		FATALIO(open %s, bootstrap);
 	len = pwrite(fd, boot_code, boot_size, BOOTBLOCK_OFFSET);
+	free(boot_code);
 	if (len == -1)
 		FATAL(write %s, disk);
 	if (len != boot_size)



CVS commit: src/sys/arch/sgimips/stand/sgivol

2013-06-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 27 21:24:08 UTC 2013

Modified Files:
src/sys/arch/sgimips/stand/sgivol: sgivol.c

Log Message:
close fp
http://M00nBSD.net/ae123a9bae03f7dde5c6d654412daf5a.html


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/sgimips/stand/sgivol/sgivol.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/sgimips/stand/sgivol/sgivol.c
diff -u src/sys/arch/sgimips/stand/sgivol/sgivol.c:1.18 src/sys/arch/sgimips/stand/sgivol/sgivol.c:1.19
--- src/sys/arch/sgimips/stand/sgivol/sgivol.c:1.18	Sun Aug  3 13:42:34 2008
+++ src/sys/arch/sgimips/stand/sgivol/sgivol.c	Thu Jun 27 17:24:08 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: sgivol.c,v 1.18 2008/08/03 17:42:34 rumble Exp $	*/
+/*	$NetBSD: sgivol.c,v 1.19 2013/06/27 21:24:08 christos Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -529,6 +529,7 @@ write_file(void)
 		}
 		i -= i  512 ? 512 : i;
 	}
+	fclose(fp);
 }
 
 void



CVS commit: src/lib/csu

2013-06-27 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jun 27 21:24:39 UTC 2013

Modified Files:
src/lib/csu/arch/arm: Makefile.inc
src/lib/csu/arch/earm: Makefile.inc
src/lib/csu/arch/powerpc: Makefile.inc crtend.S
src/lib/csu/common: Makefile.inc crtbegin.c
Added Files:
src/lib/csu/arch/arm: crtbegin.h
src/lib/csu/arch/earm: crtbegin.h
src/lib/csu/arch/powerpc: crtbegin.h
src/lib/csu/arch/vax: crtbegin.h
Removed Files:
src/lib/csu/arch/arm: crtbegin.S
src/lib/csu/arch/earm: crtbegin.S
src/lib/csu/arch/powerpc: crtbegin.S

Log Message:
Switch arm, earm, powerpc to use crtbegin.c
Use -fpie for crtbegin.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/csu/arch/arm/Makefile.inc
cvs rdiff -u -r1.6 -r0 src/lib/csu/arch/arm/crtbegin.S
cvs rdiff -u -r0 -r1.1 src/lib/csu/arch/arm/crtbegin.h
cvs rdiff -u -r1.1 -r1.2 src/lib/csu/arch/earm/Makefile.inc
cvs rdiff -u -r1.4 -r0 src/lib/csu/arch/earm/crtbegin.S
cvs rdiff -u -r0 -r1.1 src/lib/csu/arch/earm/crtbegin.h
cvs rdiff -u -r1.1 -r1.2 src/lib/csu/arch/powerpc/Makefile.inc \
src/lib/csu/arch/powerpc/crtend.S
cvs rdiff -u -r1.2 -r0 src/lib/csu/arch/powerpc/crtbegin.S
cvs rdiff -u -r0 -r1.1 src/lib/csu/arch/powerpc/crtbegin.h
cvs rdiff -u -r0 -r1.1 src/lib/csu/arch/vax/crtbegin.h
cvs rdiff -u -r1.11 -r1.12 src/lib/csu/common/Makefile.inc
cvs rdiff -u -r1.2 -r1.3 src/lib/csu/common/crtbegin.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/csu/arch/arm/Makefile.inc
diff -u src/lib/csu/arch/arm/Makefile.inc:1.5 src/lib/csu/arch/arm/Makefile.inc:1.6
--- src/lib/csu/arch/arm/Makefile.inc:1.5	Mon Apr 29 07:21:59 2013
+++ src/lib/csu/arch/arm/Makefile.inc	Thu Jun 27 21:24:39 2013
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile.inc,v 1.5 2013/04/29 07:21:59 skrll Exp $
+# $NetBSD: Makefile.inc,v 1.6 2013/06/27 21:24:39 matt Exp $
 
-CPPFLAGS+=	-DELFSIZE=32
+CPPFLAGS+=	-I${ARCHDIR}
 .if (!empty(CPUFLAGS)  ${CPUFLAGS:M-mabi=aapcs*} != )
 CPPFLAGS+=  -DHAVE_INITFINI_ARRAY
 .endif

Index: src/lib/csu/arch/earm/Makefile.inc
diff -u src/lib/csu/arch/earm/Makefile.inc:1.1 src/lib/csu/arch/earm/Makefile.inc:1.2
--- src/lib/csu/arch/earm/Makefile.inc:1.1	Mon Aug 13 02:49:04 2012
+++ src/lib/csu/arch/earm/Makefile.inc	Thu Jun 27 21:24:39 2013
@@ -1,5 +1,5 @@
-# $NetBSD: Makefile.inc,v 1.1 2012/08/13 02:49:04 matt Exp $
+# $NetBSD: Makefile.inc,v 1.2 2013/06/27 21:24:39 matt Exp $
 
-CPPFLAGS+=	-DELFSIZE=32
+CPPFLAGS+=	-I${ARCHDIR}
 CPPFLAGS+=	-DHAVE_INITFINI_ARRAY
 

Index: src/lib/csu/arch/powerpc/Makefile.inc
diff -u src/lib/csu/arch/powerpc/Makefile.inc:1.1 src/lib/csu/arch/powerpc/Makefile.inc:1.2
--- src/lib/csu/arch/powerpc/Makefile.inc:1.1	Tue Feb  8 02:02:25 2011
+++ src/lib/csu/arch/powerpc/Makefile.inc	Thu Jun 27 21:24:39 2013
@@ -1,5 +1,3 @@
-# $NetBSD: Makefile.inc,v 1.1 2011/02/08 02:02:25 matt Exp $
-
-CPPFLAGS+=	-DELFSIZE=32
-
+# $NetBSD: Makefile.inc,v 1.2 2013/06/27 21:24:39 matt Exp $
 
+CPPFLAGS+=	-I${ARCHDIR}
Index: src/lib/csu/arch/powerpc/crtend.S
diff -u src/lib/csu/arch/powerpc/crtend.S:1.1 src/lib/csu/arch/powerpc/crtend.S:1.2
--- src/lib/csu/arch/powerpc/crtend.S:1.1	Tue Feb  8 02:02:25 2011
+++ src/lib/csu/arch/powerpc/crtend.S	Thu Jun 27 21:24:39 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: crtend.S,v 1.1 2011/02/08 02:02:25 matt Exp $	*/
+/*	$NetBSD: crtend.S,v 1.2 2013/06/27 21:24:39 matt Exp $	*/
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -30,7 +30,7 @@
 
 #include powerpc/asm.h
 
-RCSID($NetBSD: crtend.S,v 1.1 2011/02/08 02:02:25 matt Exp $)
+RCSID($NetBSD: crtend.S,v 1.2 2013/06/27 21:24:39 matt Exp $)
 
 	.section	.ctors, aw, @progbits
 	.p2align 2
@@ -41,6 +41,9 @@ __CTOR_LIST_END__:
 
 	.section	.dtors, aw, @progbits
 	.p2align 2
+	.global		__DTOR_LIST_END__
+	.hidden 	__DTOR_LIST_END__
+__DTOR_LIST_END__:
 	.long 0
 
 	.section	.eh_frame, a, @progbits

Index: src/lib/csu/common/Makefile.inc
diff -u src/lib/csu/common/Makefile.inc:1.11 src/lib/csu/common/Makefile.inc:1.12
--- src/lib/csu/common/Makefile.inc:1.11	Thu Jun 27 03:37:21 2013
+++ src/lib/csu/common/Makefile.inc	Thu Jun 27 21:24:39 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.11 2013/06/27 03:37:21 matt Exp $
+#	$NetBSD: Makefile.inc,v 1.12 2013/06/27 21:24:39 matt Exp $
 
 .include bsd.own.mk
 
@@ -19,7 +19,7 @@ crtbegin.o: crtbegin.S
 .else
 crtbegin.o: crtbegin.c crtbegin.h
 	${_MKTARGET_COMPILE}
-	${COMPILE.c} ${COMMON_DIR}/crtbegin.c -o ${.TARGET}.o
+	${COMPILE.c} -fpie ${COMMON_DIR}/crtbegin.c -o ${.TARGET}.o
 .endif
 	${LD} -x -r -o ${.TARGET} ${.TARGET}.o
 	rm -f ${.TARGET}.o

Index: src/lib/csu/common/crtbegin.c
diff -u src/lib/csu/common/crtbegin.c:1.2 src/lib/csu/common/crtbegin.c:1.3
--- src/lib/csu/common/crtbegin.c:1.2	Mon Jun 24 14:49:13 2013
+++ src/lib/csu/common/crtbegin.c	Thu Jun 27 21:24:39 2013
@@ -27,79 +27,105 @@
  * 

CVS commit: src/usr.bin/man

2013-06-27 Thread Julian Fagir
Module Name:src
Committed By:   jdf
Date:   Thu Jun 27 21:55:10 UTC 2013

Modified Files:
src/usr.bin/man: man.conf.5

Log Message:
 * adjust indentation of list block
 * fix capitalization
 * remove superfluous word ('The')

Patch supplied by Bug Hunting.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/usr.bin/man/man.conf.5

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/man/man.conf.5
diff -u src/usr.bin/man/man.conf.5:1.22 src/usr.bin/man/man.conf.5:1.23
--- src/usr.bin/man/man.conf.5:1.22	Sun Apr 29 03:46:43 2012
+++ src/usr.bin/man/man.conf.5	Thu Jun 27 21:55:10 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: man.conf.5,v 1.22 2012/04/29 03:46:43 christos Exp $
+.\	$NetBSD: man.conf.5,v 1.23 2013/06/27 21:55:10 jdf Exp $
 .\
 .\ Copyright (c) 1989, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -81,9 +81,9 @@ Control keywords must start with the
 .Dq _
 character.
 The following control keywords are currently defined:
-.Bl -tag -width _version
+.Bl -tag -width _\*[Lt]machine\*[Gt]
 .It _build
-identifies the set of suffixes used for manual pages that must be
+Identifies the set of suffixes used for manual pages that must be
 formatted for display and the command that should be used to format
 them.
 Manual file names, regardless of their format, are expected to end in a
@@ -103,7 +103,7 @@ There should be exactly one occurrence o
 in the shell command line, and it will
 be replaced by the name of the file which is being formatted.
 .It _crunch
-used by
+Used by
 .Xr catman 8
 to determine how to crunch formatted pages
 which originally were compressed man pages: The first field lists a suffix
@@ -115,9 +115,9 @@ There should be exactly one occurrence o
 in the shell command line, and it will
 be replaced by the name of the output file.
 .It _default
-contains the system-wide default man path used to search for man pages.
+Contains the system-wide default man path used to search for man pages.
 .It _subdir
-contains the list (in search order) of section subdirectories which will
+Contains the list (in search order) of section subdirectories which will
 be searched in any man path directory named with a trailing slash
 .Pq Dq /
 character.
@@ -141,9 +141,9 @@ Each suffix may contain the normal shell
 including curly braces
 .Pq Dq {} ) .
 .It _version
-contains the version of the configuration file.
+Contains the version of the configuration file.
 .It _whatdb
-defines the full pathname (not just a directory path) for a database to
+Defines the full pathname (not just a directory path) for a database to
 be used
 by the
 .Xr apropos 1
@@ -157,7 +157,7 @@ to escape a shell globbing character,
 precede it with a backslash
 .Pq Dq \e .
 .It _\*[Lt]machine\*[Gt]
-The defines additional paths to be searched for the particular
+Defines additional paths to be searched for the particular
 .Dv machine
 whose literal value is taken from
 .Xr uname 1



CVS commit: xsrc/external/mit/libXi/dist/src

2013-06-27 Thread Thomas Klausner
Module Name:xsrc
Committed By:   wiz
Date:   Thu Jun 27 21:57:21 UTC 2013

Modified Files:
xsrc/external/mit/libXi/dist/src: XGetFCtl.c

Log Message:
Remove check that can never be true.

clang warns:
warning: comparison of constant 268435455 with expression of type
'CARD16' (aka 'unsigned short') is always false

Sent upstream, will probably be merged soon.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 xsrc/external/mit/libXi/dist/src/XGetFCtl.c

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

Modified files:

Index: xsrc/external/mit/libXi/dist/src/XGetFCtl.c
diff -u xsrc/external/mit/libXi/dist/src/XGetFCtl.c:1.2 xsrc/external/mit/libXi/dist/src/XGetFCtl.c:1.3
--- xsrc/external/mit/libXi/dist/src/XGetFCtl.c:1.2	Thu Jun  6 06:46:32 2013
+++ xsrc/external/mit/libXi/dist/src/XGetFCtl.c	Thu Jun 27 21:57:21 2013
@@ -125,9 +125,6 @@ XGetFeedbackControl(
 	case StringFeedbackClass:
 	{
 		xStringFeedbackState *strf = (xStringFeedbackState *) f;
-
-		if (strf-num_syms_supported = (INT_MAX / sizeof(KeySym)))
-		goto out;
 		size += sizeof(XStringFeedbackState) +
 		(strf-num_syms_supported * sizeof(KeySym));
 	}



CVS commit: src/bin/sh

2013-06-27 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Thu Jun 27 23:22:04 UTC 2013

Modified Files:
src/bin/sh: eval.c redir.c

Log Message:
fix descriptor leaks.  PR/47805

this fix was taken from FreeBSD SVN rev 199953 (Jilles Tjoelker)

r199953 | jilles | 2009-11-30 07:33:59 +0900 (Mon, 30 Nov 2009) | 16 lines

Fix some cases where file descriptors from redirections leak to programs.

- Redirecting fds that were not open before kept two copies of the
  redirected file.
sh -c '{ :; } 7/dev/null; fstat -p $$; true'
(both fd 7 and 10 remained open)
- File descriptors used to restore things after redirection were not
  set close-on-exec, instead they were explicitly closed before executing
  a program normally and before executing a shell procedure. The latter
  must remain but the former is replaced by close-on-exec.
sh -c 'exec 7/; { exec fstat -p $$; } 7/dev/null; true'
(fd 10 remained open)

The examples above are simpler than the testsuite because I do not want to
use fstat or procstat in the testsuite.


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/bin/sh/eval.c
cvs rdiff -u -r1.34 -r1.35 src/bin/sh/redir.c

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

Modified files:

Index: src/bin/sh/eval.c
diff -u src/bin/sh/eval.c:1.106 src/bin/sh/eval.c:1.107
--- src/bin/sh/eval.c:1.106	Sat Mar  2 22:02:32 2013
+++ src/bin/sh/eval.c	Thu Jun 27 23:22:04 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: eval.c,v 1.106 2013/03/02 22:02:32 christos Exp $	*/
+/*	$NetBSD: eval.c,v 1.107 2013/06/27 23:22:04 yamt Exp $	*/
 
 /*-
  * Copyright (c) 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = @(#)eval.c	8.9 (Berkeley) 6/8/95;
 #else
-__RCSID($NetBSD: eval.c,v 1.106 2013/03/02 22:02:32 christos Exp $);
+__RCSID($NetBSD: eval.c,v 1.107 2013/06/27 23:22:04 yamt Exp $);
 #endif
 #endif /* not lint */
 
@@ -1053,7 +1053,6 @@ normal_fork:
 #ifdef DEBUG
 		trputs(normal command:  );  trargs(argv);
 #endif
-		clearredir(vforked);
 		redirect(cmd-ncmd.redirect, vforked ? REDIR_VFORK : 0);
 		if (!vforked)
 			for (sp = varlist.list ; sp ; sp = sp-next)

Index: src/bin/sh/redir.c
diff -u src/bin/sh/redir.c:1.34 src/bin/sh/redir.c:1.35
--- src/bin/sh/redir.c:1.34	Wed Jun 12 01:36:52 2013
+++ src/bin/sh/redir.c	Thu Jun 27 23:22:04 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: redir.c,v 1.34 2013/06/12 01:36:52 yamt Exp $	*/
+/*	$NetBSD: redir.c,v 1.35 2013/06/27 23:22:04 yamt Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = @(#)redir.c	8.2 (Berkeley) 5/4/95;
 #else
-__RCSID($NetBSD: redir.c,v 1.34 2013/06/12 01:36:52 yamt Exp $);
+__RCSID($NetBSD: redir.c,v 1.35 2013/06/27 23:22:04 yamt Exp $);
 #endif
 #endif /* not lint */
 
@@ -67,6 +67,7 @@ __RCSID($NetBSD: redir.c,v 1.34 2013/06
 
 
 #define EMPTY -2		/* marks an unused slot in redirtab */
+#define	CLOSED -1		/* fd was not open before redir */
 #ifndef PIPE_BUF
 # define PIPESIZE 4096		/* amount of buffering in a pipe */
 #else
@@ -109,7 +110,6 @@ redirect(union node *redir, int flags)
 	struct redirtab *sv = NULL;
 	int i;
 	int fd;
-	int try;
 	char memory[10];	/* file descriptors to write to memory */
 
 	for (i = 10 ; --i = 0 ; )
@@ -127,41 +127,32 @@ redirect(union node *redir, int flags)
 	}
 	for (n = redir ; n ; n = n-nfile.next) {
 		fd = n-nfile.fd;
-		try = 0;
 		if ((n-nfile.type == NTOFD || n-nfile.type == NFROMFD) 
 		n-ndup.dupfd == fd)
 			continue; /* redirect from/to same file descriptor */
 
 		if ((flags  REDIR_PUSH)  sv-renamed[fd] == EMPTY) {
 			INTOFF;
-again:
 			if ((i = fcntl(fd, F_DUPFD, 10)) == -1) {
 switch (errno) {
 case EBADF:
-	if (!try) {
-		openredirect(n, memory, flags);
-		try++;
-		goto again;
-	}
-	/* FALLTHROUGH*/
+	i = CLOSED;
+	break;
 default:
 	INTON;
 	error(%d: %s, fd, strerror(errno));
 	/* NOTREACHED */
 }
-			}
-			if (!try) {
-sv-renamed[fd] = i;
-close(fd);
-			}
+			} else
+(void)fcntl(i, F_SETFD, FD_CLOEXEC);
+			sv-renamed[fd] = i;
 			INTON;
 		} else {
 			close(fd);
 		}
 if (fd == 0)
 fd0_redirected++;
-		if (!try)
-			openredirect(n, memory, flags);
+		openredirect(n, memory, flags);
 	}
 	if (memory[1])
 		out1 = memout;



CVS commit: src/sys/arch/arm/omap

2013-06-27 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Jun 28 00:50:23 UTC 2013

Modified Files:
src/sys/arch/arm/omap: omap3_sdhc.c omap3_sdmmcreg.h

Log Message:
Add TIAM335X SDMMC BASE definitions


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/omap/omap3_sdhc.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/omap/omap3_sdmmcreg.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/omap/omap3_sdhc.c
diff -u src/sys/arch/arm/omap/omap3_sdhc.c:1.11 src/sys/arch/arm/omap/omap3_sdhc.c:1.12
--- src/sys/arch/arm/omap/omap3_sdhc.c:1.11	Tue Jun 18 15:04:53 2013
+++ src/sys/arch/arm/omap/omap3_sdhc.c	Fri Jun 28 00:50:22 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: omap3_sdhc.c,v 1.11 2013/06/18 15:04:53 matt Exp $	*/
+/*	$NetBSD: omap3_sdhc.c,v 1.12 2013/06/28 00:50:22 matt Exp $	*/
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: omap3_sdhc.c,v 1.11 2013/06/18 15:04:53 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: omap3_sdhc.c,v 1.12 2013/06/28 00:50:22 matt Exp $);
 
 #include opt_omap.h
 
@@ -89,9 +89,9 @@ struct am335x_sdhc {
 
 static const struct am335x_sdhc am335x_sdhc[] = {
 	/* XXX All offset by 0x100 because of the am335x's mmc registers.  */
-	{ MMCHS0,	0x48060100, 64, { AM335X_PRCM_CM_PER, 0x3c } },
-	{ MMC1,	0x481d8100, 28, { AM335X_PRCM_CM_PER, 0xf4 } },
-	{ MMCHS2,	0x47810100, 29, { AM335X_PRCM_CM_WKUP, 0xf8 } },
+	{ MMCHS0, SDMMC1_BASE_TIAM335X, 64, { AM335X_PRCM_CM_PER, 0x3c } },
+	{ MMC1,   SDMMC2_BASE_TIAM335X, 28, { AM335X_PRCM_CM_PER, 0xf4 } },
+	{ MMCHS2, SDMMC3_BASE_TIAM335X, 29, { AM335X_PRCM_CM_WKUP, 0xf8 } },
 };
 #endif
 

Index: src/sys/arch/arm/omap/omap3_sdmmcreg.h
diff -u src/sys/arch/arm/omap/omap3_sdmmcreg.h:1.5 src/sys/arch/arm/omap/omap3_sdmmcreg.h:1.6
--- src/sys/arch/arm/omap/omap3_sdmmcreg.h:1.5	Tue Jun 18 15:04:53 2013
+++ src/sys/arch/arm/omap/omap3_sdmmcreg.h	Fri Jun 28 00:50:23 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: omap3_sdmmcreg.h,v 1.5 2013/06/18 15:04:53 matt Exp $	*/
+/*	$NetBSD: omap3_sdmmcreg.h,v 1.6 2013/06/28 00:50:23 matt Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -45,6 +45,10 @@
 #define SDMMC4_BASE_4430	0x480D1000	// same for omap5
 #define SDMMC5_BASE_4430	0x480D5000	// same for omap5
 
+#define	SDMMC1_BASE_TIAM335X	0x48006100
+#define	SDMMC2_BASE_TIAM335X	0x481d8100
+#define	SDMMC3_BASE_TIAM335X	0x47810100
+
 #define	OMAP3_SDMMC_SDHC_OFFSET	0x100
 #define	OMAP3_SDMMC_SDHC_SIZE	0x100
 



CVS commit: src/sys/arch/evbarm/conf

2013-06-27 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Jun 28 00:52:02 UTC 2013

Modified Files:
src/sys/arch/evbarm/conf: BEAGLEBONE

Log Message:
Remove -d from BOOT_ARGS
Remove HWCLOCK definitions


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/evbarm/conf/BEAGLEBONE

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/BEAGLEBONE
diff -u src/sys/arch/evbarm/conf/BEAGLEBONE:1.16 src/sys/arch/evbarm/conf/BEAGLEBONE:1.17
--- src/sys/arch/evbarm/conf/BEAGLEBONE:1.16	Mon Jun 17 00:40:18 2013
+++ src/sys/arch/evbarm/conf/BEAGLEBONE	Fri Jun 28 00:52:02 2013
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: BEAGLEBONE,v 1.16 2013/06/17 00:40:18 matt Exp $
+#	$NetBSD: BEAGLEBONE,v 1.17 2013/06/28 00:52:02 matt Exp $
 #
 #	BEAGLEBONE -- TI AM335x board Kernel
 #
@@ -154,7 +154,7 @@ options UHUB_DEBUG
 #  memorydisk=n	Set memorydisk size to n KB
 #  quiet		Show aprint_naive output
 #  verbose		Show aprint_normal and aprint_verbose output
-options		BOOT_ARGS=\-d -v\
+options		BOOT_ARGS=\-v\
 
 config		netbsd		root on ? type ?
 
@@ -282,12 +282,6 @@ pseudo-device	wsfont
 cpsw*		at obio0 addr 0x4a10 size 0x8000 intrbase 40
 ukphy*		at mii?
 
-# Hardware clocking and power management
-
-options		HWCLOCK
-options		HWCLOCK_MACHINE=arch/arm/omap/hwclock_omap1.h
-options		OMAP_CK_REF_SPEED=1200
-
 # Pseudo-Devices
 
 # disk/mass storage pseudo-devices



CVS commit: src/sys/arch/evbarm/beagle

2013-06-27 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Jun 28 00:53:04 UTC 2013

Modified Files:
src/sys/arch/evbarm/beagle: beagle_machdep.c

Log Message:
Add code to make eMMC 8-bit (disabled) since it still needs code in omap3_sdhc
to actually enable 8-bit mode.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/evbarm/beagle/beagle_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/evbarm/beagle/beagle_machdep.c
diff -u src/sys/arch/evbarm/beagle/beagle_machdep.c:1.50 src/sys/arch/evbarm/beagle/beagle_machdep.c:1.51
--- src/sys/arch/evbarm/beagle/beagle_machdep.c:1.50	Thu Jun 27 14:58:55 2013
+++ src/sys/arch/evbarm/beagle/beagle_machdep.c	Fri Jun 28 00:53:04 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: beagle_machdep.c,v 1.50 2013/06/27 14:58:55 matt Exp $ */
+/*	$NetBSD: beagle_machdep.c,v 1.51 2013/06/28 00:53:04 matt Exp $ */
 
 /*
  * Machine dependent functions for kernel setup for TI OSK5912 board.
@@ -125,7 +125,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: beagle_machdep.c,v 1.50 2013/06/27 14:58:55 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: beagle_machdep.c,v 1.51 2013/06/28 00:53:04 matt Exp $);
 
 #include opt_machdep.h
 #include opt_ddb.h
@@ -136,6 +136,7 @@ __KERNEL_RCSID(0, $NetBSD: beagle_machd
 #include opt_omap.h
 #include prcm.h
 #include com.h
+#include sdhc.h
 
 #include sys/param.h
 #include sys/systm.h
@@ -180,7 +181,11 @@ __KERNEL_RCSID(0, $NetBSD: beagle_machd
 #include arm/omap/omap2_prcm.h
 #include arm/omap/omap2_gpio.h
 #ifdef TI_AM335X
-#  include arm/omap/am335x_prcm.h
+# include arm/omap/am335x_prcm.h
+# if NSDHC  0
+#  include arm/omap/omap2_obiovar.h
+#  include arm/omap/omap3_sdmmcreg.h
+# endif
 #endif
 
 #ifdef CPU_CORTEXA9
@@ -480,6 +485,9 @@ initarm(void *arg)
 	OMAP_L4_PERIPHERAL_VBASE - OMAP_L4_PERIPHERAL_BASE;
 	arml2cc_init(omap_bs_tag, pl310_bh, 0);
 #endif
+#if defined(TI_AM335X)
+	am335x_cpu_clk();		// find our CPU speed.
+#endif
 #if 1
 	beagle_putchar('h');
 #endif
@@ -1019,6 +1027,11 @@ beagle_device_register(device_t self, vo
 		prop_dictionary_set_uint32(dict, clkmask, 0);
 		prop_dictionary_set_bool(dict, 8bit, true);
 #endif
+#if defined(TI_AM335X)  0	// doesn't work
+		struct obio_attach_args * const obio = aux;
+		if (obio-obio_addr == SDMMC2_BASE_TIAM335X)
+			prop_dictionary_set_bool(dict, 8bit, true);
+#endif
 		return;
 	}
 



CVS commit: src/sys/arch/vax/boot

2013-06-27 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Jun 28 01:13:40 UTC 2013

Modified Files:
src/sys/arch/vax/boot/boot: conf.c
src/sys/arch/vax/boot/xxboot: bootxx.c

Log Message:
ufs - ffsv1 (ffsv2 is commentout due to size limitations)


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/vax/boot/boot/conf.c
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/vax/boot/xxboot/bootxx.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/vax/boot/boot/conf.c
diff -u src/sys/arch/vax/boot/boot/conf.c:1.15 src/sys/arch/vax/boot/boot/conf.c:1.16
--- src/sys/arch/vax/boot/boot/conf.c:1.15	Wed Mar 18 16:00:15 2009
+++ src/sys/arch/vax/boot/boot/conf.c	Fri Jun 28 01:13:40 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: conf.c,v 1.15 2009/03/18 16:00:15 cegger Exp $ */
+/*	$NetBSD: conf.c,v 1.16 2013/06/28 01:13:40 matt Exp $ */
 /*
  * Copyright (c) 1994 Ludd, University of Lule}, Sweden.
  * All rights reserved.
@@ -88,13 +88,14 @@ int	cnvtab[] = {
 int ndevs = (sizeof(devsw)/sizeof(devsw[0]));
 
 struct fs_ops file_system[] = {
-	FS_OPS(ufs),
+	FS_OPS(ffsv1),
+	//FS_OPS(ffsv2),
 	FS_OPS(nfs),
 	FS_OPS(cd9660),
 	FS_OPS(ustarfs),
 };
 
-int nfsys = (sizeof(file_system) / sizeof(struct fs_ops));
+int nfsys = __arraycount(file_system);
 
 int
 nostrategy(void *f, int func, daddr_t dblk,

Index: src/sys/arch/vax/boot/xxboot/bootxx.c
diff -u src/sys/arch/vax/boot/xxboot/bootxx.c:1.36 src/sys/arch/vax/boot/xxboot/bootxx.c:1.37
--- src/sys/arch/vax/boot/xxboot/bootxx.c:1.36	Fri Sep 18 21:40:09 2009
+++ src/sys/arch/vax/boot/xxboot/bootxx.c	Fri Jun 28 01:13:40 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: bootxx.c,v 1.36 2009/09/18 21:40:09 mhitch Exp $ */
+/* $NetBSD: bootxx.c,v 1.37 2013/06/28 01:13:40 matt Exp $ */
 
 /*-
  * Copyright (c) 1982, 1986 The Regents of the University of California.
@@ -186,7 +186,8 @@ die:
  */
 struct fs_ops file_system[] = {
 #ifdef NEED_UFS
-	{ ufs_open, 0, ufs_read, 0, 0, ufs_stat },
+	{ ffsv1_open, 0, ffsv1_read, 0, 0, ffsv1_stat },
+	//{ ffsv2_open, 0, ffsv2_read, 0, 0, ffsv2_stat },
 #endif
 #ifdef NEED_CD9660
 	{ cd9660_open, 0, cd9660_read, 0, 0, cd9660_stat },
@@ -196,7 +197,7 @@ struct fs_ops file_system[] = {
 #endif
 };
 
-int nfsys = (sizeof(file_system) / sizeof(struct fs_ops));
+int nfsys = __arraycount(file_system);
 
 #if 0
 int tar_open(char *path, struct open_file *f);



CVS commit: src/sys/kern

2013-06-27 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Jun 28 01:21:06 UTC 2013

Modified Files:
src/sys/kern: sys_pipe.c

Log Message:
Make page loaning in pipes color aware.


To generate a diff of this commit:
cvs rdiff -u -r1.136 -r1.137 src/sys/kern/sys_pipe.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/sys_pipe.c
diff -u src/sys/kern/sys_pipe.c:1.136 src/sys/kern/sys_pipe.c:1.137
--- src/sys/kern/sys_pipe.c:1.136	Wed May 16 09:41:11 2012
+++ src/sys/kern/sys_pipe.c	Fri Jun 28 01:21:06 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_pipe.c,v 1.136 2012/05/16 09:41:11 martin Exp $	*/
+/*	$NetBSD: sys_pipe.c,v 1.137 2013/06/28 01:21:06 matt Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sys_pipe.c,v 1.136 2012/05/16 09:41:11 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: sys_pipe.c,v 1.137 2013/06/28 01:21:06 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -503,6 +503,7 @@ again:
 
 #ifndef PIPE_NODIRECT
 		if ((rpipe-pipe_state  PIPE_DIRECTR) != 0) {
+			struct pipemapping * const rmap = rpipe-pipe_map;
 			/*
 			 * Direct copy, bypassing a kernel buffer.
 			 */
@@ -511,12 +512,12 @@ again:
 
 			KASSERT(rpipe-pipe_state  PIPE_DIRECTW);
 
-			size = rpipe-pipe_map.cnt;
+			size = rmap-cnt;
 			if (size  uio-uio_resid)
 size = uio-uio_resid;
 
-			va = (char *)rpipe-pipe_map.kva + rpipe-pipe_map.pos;
-			gen = rpipe-pipe_map.egen;
+			va = (char *)rmap-kva + rmap-pos;
+			gen = rmap-egen;
 			mutex_exit(lock);
 
 			/*
@@ -529,9 +530,9 @@ again:
 			if (error)
 break;
 			nread += size;
-			rpipe-pipe_map.pos += size;
-			rpipe-pipe_map.cnt -= size;
-			if (rpipe-pipe_map.cnt == 0) {
+			rmap-pos += size;
+			rmap-cnt -= size;
+			if (rmap-cnt == 0) {
 rpipe-pipe_state = ~PIPE_DIRECTR;
 cv_broadcast(rpipe-pipe_wcv);
 			}
@@ -633,20 +634,19 @@ unlocked_error:
 static int
 pipe_loan_alloc(struct pipe *wpipe, int npages)
 {
-	vsize_t len;
+	struct pipemapping * const wmap = wpipe-pipe_map;
+	const vsize_t len = ptoa(npages);
 
-	len = (vsize_t)npages  PAGE_SHIFT;
 	atomic_add_int(amountpipekva, len);
-	wpipe-pipe_map.kva = uvm_km_alloc(kernel_map, len, 0,
-	UVM_KMF_VAONLY | UVM_KMF_WAITVA);
-	if (wpipe-pipe_map.kva == 0) {
+	wmap-kva = uvm_km_alloc(kernel_map, len, 0,
+	UVM_KMF_COLORMATCH | UVM_KMF_VAONLY | UVM_KMF_WAITVA);
+	if (wmap-kva == 0) {
 		atomic_add_int(amountpipekva, -len);
 		return (ENOMEM);
 	}
 
-	wpipe-pipe_map.npages = npages;
-	wpipe-pipe_map.pgs = kmem_alloc(npages * sizeof(struct vm_page *),
-	KM_SLEEP);
+	wmap-npages = npages;
+	wmap-pgs = kmem_alloc(npages * sizeof(struct vm_page *), KM_SLEEP);
 	return (0);
 }
 
@@ -656,16 +656,20 @@ pipe_loan_alloc(struct pipe *wpipe, int 
 static void
 pipe_loan_free(struct pipe *wpipe)
 {
-	vsize_t len;
+	struct pipemapping * const wmap = wpipe-pipe_map;
+	const vsize_t len = ptoa(wmap-npages);
 
-	len = (vsize_t)wpipe-pipe_map.npages  PAGE_SHIFT;
-	uvm_emap_remove(wpipe-pipe_map.kva, len);	/* XXX */
-	uvm_km_free(kernel_map, wpipe-pipe_map.kva, len, UVM_KMF_VAONLY);
-	wpipe-pipe_map.kva = 0;
+	uvm_emap_remove(wmap-kva, len);	/* XXX */
+	uvm_km_free(kernel_map, wmap-kva, len, UVM_KMF_VAONLY);
+	wmap-kva = 0;
 	atomic_add_int(amountpipekva, -len);
-	kmem_free(wpipe-pipe_map.pgs,
-	wpipe-pipe_map.npages * sizeof(struct vm_page *));
-	wpipe-pipe_map.pgs = NULL;
+	kmem_free(wmap-pgs, wmap-npages * sizeof(struct vm_page *));
+	wmap-pgs = NULL;
+#if 0
+	wmap-npages = 0;
+	wmap-pos = 0;
+	wmap-cnt = 0;
+#endif
 }
 
 /*
@@ -681,15 +685,17 @@ pipe_loan_free(struct pipe *wpipe)
 static int
 pipe_direct_write(file_t *fp, struct pipe *wpipe, struct uio *uio)
 {
+	struct pipemapping * const wmap = wpipe-pipe_map;
+	kmutex_t * const lock = wpipe-pipe_lock;
 	struct vm_page **pgs;
 	vaddr_t bbase, base, bend;
 	vsize_t blen, bcnt;
 	int error, npages;
 	voff_t bpos;
-	kmutex_t *lock = wpipe-pipe_lock;
+	u_int starting_color;
 
 	KASSERT(mutex_owned(wpipe-pipe_lock));
-	KASSERT(wpipe-pipe_map.cnt == 0);
+	KASSERT(wmap-cnt == 0);
 
 	mutex_exit(lock);
 
@@ -710,18 +716,19 @@ pipe_direct_write(file_t *fp, struct pip
 	} else {
 		bcnt = uio-uio_iov-iov_len;
 	}
-	npages = blen  PAGE_SHIFT;
+	npages = atop(blen);
+	starting_color = atop(base)  uvmexp.colormask;
 
 	/*
 	 * Free the old kva if we need more pages than we have
 	 * allocated.
 	 */
-	if (wpipe-pipe_map.kva != 0  npages  wpipe-pipe_map.npages)
+	if (wmap-kva != 0  starting_color + npages  wmap-npages)
 		pipe_loan_free(wpipe);
 
 	/* Allocate new kva. */
-	if (wpipe-pipe_map.kva == 0) {
-		error = pipe_loan_alloc(wpipe, npages);
+	if (wmap-kva == 0) {
+		error = pipe_loan_alloc(wpipe, starting_color + npages);
 		if (error) {
 			mutex_enter(lock);
 			return (error);
@@ -729,7 +736,7 @@ pipe_direct_write(file_t *fp, struct pip
 	}
 
 	/* 

CVS commit: src/sys/kern

2013-06-27 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Jun 28 01:21:45 UTC 2013

Modified Files:
src/sys/kern: kern_timeout.c

Log Message:
Convert a KASSERT to a KASSERTMSG


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/kern/kern_timeout.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_timeout.c
diff -u src/sys/kern/kern_timeout.c:1.45 src/sys/kern/kern_timeout.c:1.46
--- src/sys/kern/kern_timeout.c:1.45	Sat Dec 18 01:36:19 2010
+++ src/sys/kern/kern_timeout.c	Fri Jun 28 01:21:45 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_timeout.c,v 1.45 2010/12/18 01:36:19 rmind Exp $	*/
+/*	$NetBSD: kern_timeout.c,v 1.46 2013/06/28 01:21:45 matt Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_timeout.c,v 1.45 2010/12/18 01:36:19 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_timeout.c,v 1.46 2013/06/28 01:21:45 matt Exp $);
 
 /*
  * Timeouts are kept in a hierarchical timing wheel.  The c_time is the
@@ -311,7 +311,9 @@ callout_destroy(callout_t *cs)
 	 */
 	KASSERT((c-c_flags  CALLOUT_PENDING) == 0);
 	KASSERT(c-c_cpu-cc_lwp == curlwp || c-c_cpu-cc_active != c);
-	KASSERT(c-c_magic == CALLOUT_MAGIC);
+	KASSERTMSG(c-c_magic == CALLOUT_MAGIC,
+	callout %p: c_magic (%#x) != CALLOUT_MAGIC (%#x),
+	c, c-c_magic, CALLOUT_MAGIC);
 	c-c_magic = 0;
 }
 



CVS commit: src/sys/kern

2013-06-27 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Jun 28 01:23:38 UTC 2013

Modified Files:
src/sys/kern: uipc_socket2.c

Log Message:
Make sbdrop panic more verbose


To generate a diff of this commit:
cvs rdiff -u -r1.111 -r1.112 src/sys/kern/uipc_socket2.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/uipc_socket2.c
diff -u src/sys/kern/uipc_socket2.c:1.111 src/sys/kern/uipc_socket2.c:1.112
--- src/sys/kern/uipc_socket2.c:1.111	Thu Jun 27 18:53:17 2013
+++ src/sys/kern/uipc_socket2.c	Fri Jun 28 01:23:38 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_socket2.c,v 1.111 2013/06/27 18:53:17 christos Exp $	*/
+/*	$NetBSD: uipc_socket2.c,v 1.112 2013/06/28 01:23:38 matt Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uipc_socket2.c,v 1.111 2013/06/27 18:53:17 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: uipc_socket2.c,v 1.112 2013/06/28 01:23:38 matt Exp $);
 
 #include opt_mbuftrace.h
 #include opt_sb_max.h
@@ -1235,7 +1235,8 @@ sbdrop(struct sockbuf *sb, int len)
 	while (len  0) {
 		if (m == 0) {
 			if (next == 0)
-panic(sbdrop);
+panic(sbdrop(%p,%d): cc=%lu,
+sb, len, sb-sb_cc);
 			m = next;
 			next = m-m_nextpkt;
 			continue;



CVS commit: src/sys/kern

2013-06-27 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Jun 28 01:23:05 UTC 2013

Modified Files:
src/sys/kern: uipc_mbuf.c

Log Message:
Make m_copydata panics more verbose


To generate a diff of this commit:
cvs rdiff -u -r1.150 -r1.151 src/sys/kern/uipc_mbuf.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/uipc_mbuf.c
diff -u src/sys/kern/uipc_mbuf.c:1.150 src/sys/kern/uipc_mbuf.c:1.151
--- src/sys/kern/uipc_mbuf.c:1.150	Thu Jun 27 17:47:18 2013
+++ src/sys/kern/uipc_mbuf.c	Fri Jun 28 01:23:05 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_mbuf.c,v 1.150 2013/06/27 17:47:18 christos Exp $	*/
+/*	$NetBSD: uipc_mbuf.c,v 1.151 2013/06/28 01:23:05 matt Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2001 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uipc_mbuf.c,v 1.150 2013/06/27 17:47:18 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: uipc_mbuf.c,v 1.151 2013/06/28 01:23:05 matt Exp $);
 
 #include opt_mbuftrace.h
 #include opt_nmbclusters.h
@@ -865,12 +865,17 @@ m_copydata(struct mbuf *m, int off, int 
 {
 	unsigned	count;
 	void *		cp = vp;
+	struct mbuf	*m0 = m;
+	int		len0 = len;
+	int		off0 = off;
+	void		*vp0 = vp;
 
 	if (off  0 || len  0)
 		panic(m_copydata: off %d, len %d, off, len);
 	while (off  0) {
 		if (m == NULL)
-			panic(m_copydata: m == NULL, off %d, off);
+			panic(m_copydata(%p,%d,%d,%p): m=NULL, off=%d (%d),
+			m0, len0, off0, vp0, off, off0 - off);
 		if (off  m-m_len)
 			break;
 		off -= m-m_len;
@@ -878,7 +883,10 @@ m_copydata(struct mbuf *m, int off, int 
 	}
 	while (len  0) {
 		if (m == NULL)
-			panic(m_copydata: m == NULL, len %d, len);
+			panic(m_copydata(%p,%d,%d,%p): 
+			m=NULL, off=%d (%d), len=%d (%d),
+			m0, len0, off0, vp0,
+			off, off0 - off, len, len0 - len);
 		count = min(m-m_len - off, len);
 		memcpy(cp, mtod(m, char *) + off, count);
 		len -= count;



CVS commit: src/sys/arch/arm/omap

2013-06-27 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Jun 28 02:31:16 UTC 2013

Modified Files:
src/sys/arch/arm/omap: am335x_prcm.c am335x_prcm.h

Log Message:
Add a routine to set the mpu multiplier.  (not used yet)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/omap/am335x_prcm.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/omap/am335x_prcm.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/omap/am335x_prcm.c
diff -u src/sys/arch/arm/omap/am335x_prcm.c:1.1 src/sys/arch/arm/omap/am335x_prcm.c:1.2
--- src/sys/arch/arm/omap/am335x_prcm.c:1.1	Tue Dec 11 18:53:26 2012
+++ src/sys/arch/arm/omap/am335x_prcm.c	Fri Jun 28 02:31:16 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: am335x_prcm.c,v 1.1 2012/12/11 18:53:26 riastradh Exp $	*/
+/*	$NetBSD: am335x_prcm.c,v 1.2 2013/06/28 02:31:16 matt Exp $	*/
 
 /*
  * TI OMAP Power, Reset, and Clock Management on the AM335x
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: am335x_prcm.c,v 1.1 2012/12/11 18:53:26 riastradh Exp $);
+__KERNEL_RCSID(0, $NetBSD: am335x_prcm.c,v 1.2 2013/06/28 02:31:16 matt Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -93,3 +93,33 @@ prcm_module_disable(const struct omap_mo
 	prcm_write_4(cm_module, clkctrl_reg, clkctrl);
 	am335x_prcm_check_clkctrl(cm_module, clkctrl_reg, clkctrl);
 }
+
+void
+prcm_mpu_pll_config(u_int mpupll_m)
+{
+	uint32_t clkmode = prcm_read_4(AM335X_PRCM_CM_WKUP, AM335X_PRCM_CM_CLKMODE_DPLL_MPU);
+	uint32_t clksel = prcm_read_4(AM335X_PRCM_CM_WKUP, AM335X_PRCM_CM_CLKSEL_DPLL_MPU);
+	//uint32_t div_m2 = prcm_read_4(AM335X_PRCM_CM_WKUP, AM335X_PRCM_CM_DIV_M2_DPLL_MPU);
+
+	/* Request the DPLL to be put into bypass mode */
+	prcm_write_4(AM335X_PRCM_CM_WKUP, AM335X_PRCM_CM_CLKMODE_DPLL_MPU, AM335X_PRCM_CM_CLKMODE_DPLL_MN_BYP_MODE);
+
+	/* Wait for it to be put into bypass */
+	while (prcm_read_4(AM335X_PRCM_CM_WKUP, AM335X_PRCM_CM_IDLEST_DPLL_MPU) != AM335X_PRCM_CM_IDLEST_DPLL_ST_DPLL_CLK_MN_BYPASS) {
+		/* nothing */
+	}
+
+	/* Replace multipler */
+	clksel = ~AM335X_PRCM_CM_CLKSEL_DPLL_MULT;
+	clksel |= __SHIFTIN(mpupll_m, AM335X_PRCM_CM_CLKSEL_DPLL_MULT);
+	prcm_write_4(AM335X_PRCM_CM_WKUP, AM335X_PRCM_CM_CLKSEL_DPLL_MPU, clksel);
+
+	/* Exit bypass mode */
+	clkmode |= AM335X_PRCM_CM_CLKMODE_DPLL_LOCK_MODE; 
+	prcm_write_4(AM335X_PRCM_CM_WKUP, AM335X_PRCM_CM_CLKMODE_DPLL_MPU, clkmode);
+
+	/* Wait for the DPLL to lock */
+	while (prcm_read_4(AM335X_PRCM_CM_WKUP, AM335X_PRCM_CM_IDLEST_DPLL_MPU) != AM335X_PRCM_CM_IDLEST_DPLL_ST_DPLL_CLK_LOCKED) {
+		/* nothing */
+	}
+}

Index: src/sys/arch/arm/omap/am335x_prcm.h
diff -u src/sys/arch/arm/omap/am335x_prcm.h:1.2 src/sys/arch/arm/omap/am335x_prcm.h:1.3
--- src/sys/arch/arm/omap/am335x_prcm.h:1.2	Thu Dec 13 02:12:15 2012
+++ src/sys/arch/arm/omap/am335x_prcm.h	Fri Jun 28 02:31:16 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: am335x_prcm.h,v 1.2 2012/12/13 02:12:15 jakllsch Exp $	*/
+/*	$NetBSD: am335x_prcm.h,v 1.3 2013/06/28 02:31:16 matt Exp $	*/
 
 /*
  * TI OMAP Power, Reset, and Clock Management on the AM335x
@@ -61,8 +61,24 @@ struct omap_module {
 #define AM335X_PRCM_PRM_GFX	0x1100
 #define AM335X_PRCM_PRM_CEFUSE	0x1200
 
+/* In CM_WKUP */
+#define	AM335X_PRCM_CM_IDLEST_DPLL_MPU	0x20
+#define  AM335X_PRCM_CM_IDLEST_DPLL_ST_DPLL_CLK_MN_BYPASS	__BIT(8)
+#define  AM335X_PRCM_CM_IDLEST_DPLL_ST_DPLL_CLK_LOCKED		__BIT(0)
+#define	AM335X_PRCM_CM_CLKSEL_DPLL_MPU	0x2c
+#define  AM335X_PRCM_CM_CLKSEL_DPLL_BYPASS	__BITS(23)
+#define  AM335X_PRCM_CM_CLKSEL_DPLL_MULT	__BITS(18,8)
+#define  AM335X_PRCM_CM_CLKSEL_DPLL_DIV		__BITS(6,0)
+#define	AM335X_PRCM_CM_CLKMODE_DPLL_MPU	0x88
+#define  AM335X_PRCM_CM_CLKMODE_DPLL_MN_BYP_MODE	4
+#define  AM335X_PRCM_CM_CLKMODE_DPLL_LOCK_MODE		7
+#define	AM335X_PRCM_CM_DIV_M2_DPLL_MPU	0xa8
+
+
 #define PRM_RSTCTRL		0x00	/* offset from AM335X_PRCM_PRM_DEVICE */
 #define RST_GLOBAL_WARM_SW	__BIT(0)
 #define RST_GLOBAL_COLD_SW	__BIT(1)
 
+void prcm_mpu_pll_config(u_int);
+
 #endif  /* _ARM_OMAP_AM335X_PRCM_H_ */



CVS commit: src/sys/fs/udf

2013-06-27 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Thu Jun 27 09:38:08 UTC 2013

Modified Files:
src/sys/fs/udf: udf_vnops.c

Log Message:
Since UDF volumes are always mounted async, the simple UBC purging with
VOP_PUTPAGES() was never triggered resulting in far too much data in the UBC
that needed to be written out. This could result in instability on small
memory machines.


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/sys/fs/udf/udf_vnops.c

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



CVS commit: src/sys/dev/pci

2013-06-27 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Jun 27 09:57:49 UTC 2013

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

Log Message:
 Move the location of wm_check_mng_mode() and wm_get_wakeup() in wm_attach().
Those functions access EEPROM, so they have to call after identifying EEPROM
access type. This modification may change the behavior of BMC(IPMI).


To generate a diff of this commit:
cvs rdiff -u -r1.260 -r1.261 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.



CVS commit: src/libexec/httpd

2013-06-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 27 10:01:31 UTC 2013

Modified Files:
src/libexec/httpd: bozohttpd.c bozohttpd.h cgi-bozo.c

Log Message:
Redo previous (fixing a memory leak introduced), and while there rework
virtual server support - in daemonized mode mixed virtual and main
server usage would alter the virtual hostname depending on order of
requests.
To fix, move the effective virtual hostname into the request structure
and leave the httpd server description static.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/libexec/httpd/bozohttpd.c
cvs rdiff -u -r1.23 -r1.24 src/libexec/httpd/bozohttpd.h
cvs rdiff -u -r1.20 -r1.21 src/libexec/httpd/cgi-bozo.c

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



CVS commit: src/libexec/httpd

2013-06-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 27 11:02:20 UTC 2013

Modified Files:
src/libexec/httpd: bozohttpd.c

Log Message:
After handling a request by sending a redirect, do not proceed with the normal
request handling (which would typically add error output after the end
of the redirect message).


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/libexec/httpd/bozohttpd.c

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



CVS commit: src/libexec/httpd

2013-06-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 27 12:20:08 UTC 2013

Modified Files:
src/libexec/httpd: bozohttpd.c

Log Message:
Fix copypasto in debug output


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/libexec/httpd/bozohttpd.c

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



CVS commit: xsrc/external/mit/fontconfig/dist/src

2013-06-27 Thread Thomas Klausner
Module Name:xsrc
Committed By:   wiz
Date:   Thu Jun 27 12:44:11 UTC 2013

Modified Files:
xsrc/external/mit/fontconfig/dist/src: fcname.c

Log Message:
Fix a comparison of constant warning with clang

From upstream:
commit 9acc14c34a372b54f9075ec3611588298fb2a501
Author: Akira TAGOH ak...@tagoh.org
Date:   Wed Jun 26 12:03:38 2013 +0900


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 xsrc/external/mit/fontconfig/dist/src/fcname.c

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



CVS commit: src/external/mit/xorg/lib/fontconfig/src

2013-06-27 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu Jun 27 12:44:58 UTC 2013

Modified Files:
src/external/mit/xorg/lib/fontconfig/src: Makefile

Log Message:
Remove clang workaround, problem was fixed using upstream commit.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/external/mit/xorg/lib/fontconfig/src/Makefile

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



CVS commit: src/libexec/httpd

2013-06-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 27 13:00:43 UTC 2013

Modified Files:
src/libexec/httpd: bozohttpd.c

Log Message:
Fix debug output for redirects


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/libexec/httpd/bozohttpd.c

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



CVS commit: src/libexec/httpd

2013-06-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 27 13:11:11 UTC 2013

Modified Files:
src/libexec/httpd: bozohttpd.c

Log Message:
Check for needed authentication even before redirecting.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/libexec/httpd/bozohttpd.c

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



CVS commit: src/external/gpl3/gcc/usr.bin/gcc/arch

2013-06-27 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Jun 27 14:43:29 UTC 2013

Removed Files:
src/external/gpl3/gcc/usr.bin/gcc/arch/earm: insn-modes.h
src/external/gpl3/gcc/usr.bin/gcc/arch/earmeb: insn-modes.h
src/external/gpl3/gcc/usr.bin/gcc/arch/earmhf: insn-modes.h

Log Message:
delete generated by our build files that break r/o builds.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r0 \
src/external/gpl3/gcc/usr.bin/gcc/arch/earm/insn-modes.h
cvs rdiff -u -r1.2 -r0 \
src/external/gpl3/gcc/usr.bin/gcc/arch/earmeb/insn-modes.h
cvs rdiff -u -r1.2 -r0 \
src/external/gpl3/gcc/usr.bin/gcc/arch/earmhf/insn-modes.h

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



CVS commit: src/external/gpl3/gcc/dist/gcc

2013-06-27 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Jun 27 14:44:22 UTC 2013

Modified Files:
src/external/gpl3/gcc/dist/gcc: Makefile.in

Log Message:
export ENABLE_SHARED again, for mknative.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gcc/dist/gcc/Makefile.in

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



CVS commit: src/distrib/utils/embedded

2013-06-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 27 14:51:30 UTC 2013

Modified Files:
src/distrib/utils/embedded: mkimage

Log Message:
SSD cards is stupid.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/distrib/utils/embedded/mkimage

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



CVS commit: src/share/examples/npf

2013-06-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 27 14:52:58 UTC 2013

Removed Files:
src/share/examples/npf: l2tp-gw.conf

Log Message:
remove file that did not go before.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r0 src/share/examples/npf/l2tp-gw.conf

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



CVS commit: src/sys/arch/evbarm/beagle

2013-06-27 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jun 27 14:58:55 UTC 2013

Modified Files:
src/sys/arch/evbarm/beagle: beagle_machdep.c

Log Message:
Only print CBAR on those cortex with CBAR


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/evbarm/beagle/beagle_machdep.c

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



CVS commit: src/sys/arch/sparc64/sparc64

2013-06-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun 27 15:27:46 UTC 2013

Modified Files:
src/sys/arch/sparc64/sparc64: syscall.c

Log Message:
Simplify with sy_invoke()


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/sparc64/sparc64/syscall.c

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



CVS commit: src/usr.sbin/rtadvd

2013-06-27 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Jun 27 15:46:40 UTC 2013

Modified Files:
src/usr.sbin/rtadvd: rtadvd.c

Log Message:
Check valid lengths of RDNSS and DNSSL options when rtadvd receives RA/RS.
rtadvd doesn't actually look into the option itself, but it may do in the
future to warn about consistency.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/usr.sbin/rtadvd/rtadvd.c

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



CVS commit: src/sys

2013-06-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 27 17:47:18 UTC 2013

Modified Files:
src/sys/kern: uipc_mbuf.c
src/sys/net80211: ieee80211_netbsd.c ieee80211_netbsd.h
src/sys/sys: mbuf.h

Log Message:
- add m_add() that puts an mbuf to end of a chain
- m_append() and m_align() with their family
- remove parameters from prototypes


To generate a diff of this commit:
cvs rdiff -u -r1.149 -r1.150 src/sys/kern/uipc_mbuf.c
cvs rdiff -u -r1.23 -r1.24 src/sys/net80211/ieee80211_netbsd.c
cvs rdiff -u -r1.17 -r1.18 src/sys/net80211/ieee80211_netbsd.h
cvs rdiff -u -r1.151 -r1.152 src/sys/sys/mbuf.h

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



CVS commit: src/sys

2013-06-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 27 18:53:18 UTC 2013

Modified Files:
src/sys/kern: uipc_socket2.c
src/sys/sys: socketvar.h

Log Message:
Introduce a more general method of sbcreatecontrol, sbcreatecontrol1 that
can take flags (M_WAITOK), and allocate large messages if needed. It also
returns the allocated pointer instead of copying the data to the passed
pointer. Implement sbcreatecontrol() using that.


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/sys/kern/uipc_socket2.c
cvs rdiff -u -r1.129 -r1.130 src/sys/sys/socketvar.h

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



CVS commit: src/sys/kern

2013-06-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 27 18:54:31 UTC 2013

Modified Files:
src/sys/kern: uipc_usrreq.c

Log Message:
use sbcreatecontrol1() and m_add() instead of open-coding everything, and
getting it slightly wrong.


To generate a diff of this commit:
cvs rdiff -u -r1.141 -r1.142 src/sys/kern/uipc_usrreq.c

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



CVS commit: src/sys/netinet

2013-06-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 27 19:38:16 UTC 2013

Modified Files:
src/sys/netinet: in.h in_pcb.h ip_input.c ip_output.c

Log Message:
implement IP_PKTINFO and IP_RECVPKTINFO.


To generate a diff of this commit:
cvs rdiff -u -r1.88 -r1.89 src/sys/netinet/in.h
cvs rdiff -u -r1.50 -r1.51 src/sys/netinet/in_pcb.h
cvs rdiff -u -r1.305 -r1.306 src/sys/netinet/ip_input.c
cvs rdiff -u -r1.222 -r1.223 src/sys/netinet/ip_output.c

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



CVS commit: src/tests/net/net

2013-06-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 27 20:01:24 UTC 2013

Modified Files:
src/tests/net/net: Makefile
Added Files:
src/tests/net/net: t_pktinfo.c

Log Message:
add a pktinfo test


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/net/net/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/net/net/t_pktinfo.c

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



CVS commit: src/distrib/sets/lists

2013-06-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 27 20:03:36 UTC 2013

Modified Files:
src/distrib/sets/lists/debug: mi
src/distrib/sets/lists/tests: mi

Log Message:
add pktinfo tests


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.536 -r1.537 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.



CVS commit: src/share/man/man4

2013-06-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 27 20:14:25 UTC 2013

Modified Files:
src/share/man/man4: ip.4

Log Message:
add pktinfo stuff


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/share/man/man4/ip.4

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



CVS commit: src/sys/netinet

2013-06-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 27 20:17:36 UTC 2013

Modified Files:
src/sys/netinet: ip_input.c

Log Message:
flip src/dst


To generate a diff of this commit:
cvs rdiff -u -r1.306 -r1.307 src/sys/netinet/ip_input.c

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



CVS commit: src/sys/arch/acorn26/acorn26

2013-06-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 27 21:16:20 UTC 2013

Modified Files:
src/sys/arch/acorn26/acorn26: cpu.c

Log Message:
move assignment outside setjmp, because static analyzers are not smart enough
to know that it is impossible for id to be uninitialized.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/acorn26/acorn26/cpu.c

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



CVS commit: src/sys/arch/alpha/eisa

2013-06-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 27 21:21:05 UTC 2013

Modified Files:
src/sys/arch/alpha/eisa: eisa_machdep.c

Log Message:
don't forget to insert the io to the list
http://M00nBSD.net/ae123a9bae03f7dde5c6d654412daf5a.html


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/alpha/eisa/eisa_machdep.c

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



CVS commit: src/sys/arch/ia64/stand/common

2013-06-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 27 21:22:16 UTC 2013

Modified Files:
src/sys/arch/ia64/stand/common: fileload.c

Log Message:
fix uninitialized variable
http://M00nBSD.net/ae123a9bae03f7dde5c6d654412daf5a.html


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/stand/common/fileload.c

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



CVS commit: src/share/man/man4

2013-06-27 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu Jun 27 21:22:46 UTC 2013

Modified Files:
src/share/man/man4: ip.4

Log Message:
New sentence, new line. Fix typo. Remove 'i'.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/share/man/man4/ip.4

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



CVS commit: src/sys/arch/mipsco/stand/installboot

2013-06-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 27 21:23:21 UTC 2013

Modified Files:
src/sys/arch/mipsco/stand/installboot: installboot.c

Log Message:
free boot_code
http://M00nBSD.net/ae123a9bae03f7dde5c6d654412daf5a.html


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/mipsco/stand/installboot/installboot.c

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



CVS commit: src/lib/csu

2013-06-27 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jun 27 21:24:39 UTC 2013

Modified Files:
src/lib/csu/arch/arm: Makefile.inc
src/lib/csu/arch/earm: Makefile.inc
src/lib/csu/arch/powerpc: Makefile.inc crtend.S
src/lib/csu/common: Makefile.inc crtbegin.c
Added Files:
src/lib/csu/arch/arm: crtbegin.h
src/lib/csu/arch/earm: crtbegin.h
src/lib/csu/arch/powerpc: crtbegin.h
src/lib/csu/arch/vax: crtbegin.h
Removed Files:
src/lib/csu/arch/arm: crtbegin.S
src/lib/csu/arch/earm: crtbegin.S
src/lib/csu/arch/powerpc: crtbegin.S

Log Message:
Switch arm, earm, powerpc to use crtbegin.c
Use -fpie for crtbegin.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/csu/arch/arm/Makefile.inc
cvs rdiff -u -r1.6 -r0 src/lib/csu/arch/arm/crtbegin.S
cvs rdiff -u -r0 -r1.1 src/lib/csu/arch/arm/crtbegin.h
cvs rdiff -u -r1.1 -r1.2 src/lib/csu/arch/earm/Makefile.inc
cvs rdiff -u -r1.4 -r0 src/lib/csu/arch/earm/crtbegin.S
cvs rdiff -u -r0 -r1.1 src/lib/csu/arch/earm/crtbegin.h
cvs rdiff -u -r1.1 -r1.2 src/lib/csu/arch/powerpc/Makefile.inc \
src/lib/csu/arch/powerpc/crtend.S
cvs rdiff -u -r1.2 -r0 src/lib/csu/arch/powerpc/crtbegin.S
cvs rdiff -u -r0 -r1.1 src/lib/csu/arch/powerpc/crtbegin.h
cvs rdiff -u -r0 -r1.1 src/lib/csu/arch/vax/crtbegin.h
cvs rdiff -u -r1.11 -r1.12 src/lib/csu/common/Makefile.inc
cvs rdiff -u -r1.2 -r1.3 src/lib/csu/common/crtbegin.c

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



CVS commit: src/sys/arch/sgimips/stand/sgivol

2013-06-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 27 21:24:08 UTC 2013

Modified Files:
src/sys/arch/sgimips/stand/sgivol: sgivol.c

Log Message:
close fp
http://M00nBSD.net/ae123a9bae03f7dde5c6d654412daf5a.html


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/sgimips/stand/sgivol/sgivol.c

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



CVS commit: src/usr.bin/man

2013-06-27 Thread Julian Fagir
Module Name:src
Committed By:   jdf
Date:   Thu Jun 27 21:55:10 UTC 2013

Modified Files:
src/usr.bin/man: man.conf.5

Log Message:
 * adjust indentation of list block
 * fix capitalization
 * remove superfluous word ('The')

Patch supplied by Bug Hunting.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/usr.bin/man/man.conf.5

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



CVS commit: xsrc/external/mit/libXi/dist/src

2013-06-27 Thread Thomas Klausner
Module Name:xsrc
Committed By:   wiz
Date:   Thu Jun 27 21:57:21 UTC 2013

Modified Files:
xsrc/external/mit/libXi/dist/src: XGetFCtl.c

Log Message:
Remove check that can never be true.

clang warns:
warning: comparison of constant 268435455 with expression of type
'CARD16' (aka 'unsigned short') is always false

Sent upstream, will probably be merged soon.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 xsrc/external/mit/libXi/dist/src/XGetFCtl.c

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



CVS commit: src/bin/sh

2013-06-27 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Thu Jun 27 23:22:04 UTC 2013

Modified Files:
src/bin/sh: eval.c redir.c

Log Message:
fix descriptor leaks.  PR/47805

this fix was taken from FreeBSD SVN rev 199953 (Jilles Tjoelker)

r199953 | jilles | 2009-11-30 07:33:59 +0900 (Mon, 30 Nov 2009) | 16 lines

Fix some cases where file descriptors from redirections leak to programs.

- Redirecting fds that were not open before kept two copies of the
  redirected file.
sh -c '{ :; } 7/dev/null; fstat -p $$; true'
(both fd 7 and 10 remained open)
- File descriptors used to restore things after redirection were not
  set close-on-exec, instead they were explicitly closed before executing
  a program normally and before executing a shell procedure. The latter
  must remain but the former is replaced by close-on-exec.
sh -c 'exec 7/; { exec fstat -p $$; } 7/dev/null; true'
(fd 10 remained open)

The examples above are simpler than the testsuite because I do not want to
use fstat or procstat in the testsuite.


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/bin/sh/eval.c
cvs rdiff -u -r1.34 -r1.35 src/bin/sh/redir.c

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



CVS commit: src/sys/arch/arm/omap

2013-06-27 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Jun 28 00:50:23 UTC 2013

Modified Files:
src/sys/arch/arm/omap: omap3_sdhc.c omap3_sdmmcreg.h

Log Message:
Add TIAM335X SDMMC BASE definitions


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/omap/omap3_sdhc.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/omap/omap3_sdmmcreg.h

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



CVS commit: src/sys/arch/evbarm/conf

2013-06-27 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Jun 28 00:52:02 UTC 2013

Modified Files:
src/sys/arch/evbarm/conf: BEAGLEBONE

Log Message:
Remove -d from BOOT_ARGS
Remove HWCLOCK definitions


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/evbarm/conf/BEAGLEBONE

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



CVS commit: src/sys/arch/evbarm/beagle

2013-06-27 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Jun 28 00:53:04 UTC 2013

Modified Files:
src/sys/arch/evbarm/beagle: beagle_machdep.c

Log Message:
Add code to make eMMC 8-bit (disabled) since it still needs code in omap3_sdhc
to actually enable 8-bit mode.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/evbarm/beagle/beagle_machdep.c

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



CVS commit: src/sys/arch/vax/boot

2013-06-27 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Jun 28 01:13:40 UTC 2013

Modified Files:
src/sys/arch/vax/boot/boot: conf.c
src/sys/arch/vax/boot/xxboot: bootxx.c

Log Message:
ufs - ffsv1 (ffsv2 is commentout due to size limitations)


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/vax/boot/boot/conf.c
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/vax/boot/xxboot/bootxx.c

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



CVS commit: src/sys/kern

2013-06-27 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Jun 28 01:21:45 UTC 2013

Modified Files:
src/sys/kern: kern_timeout.c

Log Message:
Convert a KASSERT to a KASSERTMSG


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/kern/kern_timeout.c

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



CVS commit: src/sys/kern

2013-06-27 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Jun 28 01:21:06 UTC 2013

Modified Files:
src/sys/kern: sys_pipe.c

Log Message:
Make page loaning in pipes color aware.


To generate a diff of this commit:
cvs rdiff -u -r1.136 -r1.137 src/sys/kern/sys_pipe.c

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



CVS commit: src/sys/kern

2013-06-27 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Jun 28 01:23:38 UTC 2013

Modified Files:
src/sys/kern: uipc_socket2.c

Log Message:
Make sbdrop panic more verbose


To generate a diff of this commit:
cvs rdiff -u -r1.111 -r1.112 src/sys/kern/uipc_socket2.c

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



CVS commit: src/sys/kern

2013-06-27 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Jun 28 01:23:05 UTC 2013

Modified Files:
src/sys/kern: uipc_mbuf.c

Log Message:
Make m_copydata panics more verbose


To generate a diff of this commit:
cvs rdiff -u -r1.150 -r1.151 src/sys/kern/uipc_mbuf.c

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



CVS commit: src/sys/arch/arm/omap

2013-06-27 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Jun 28 02:31:16 UTC 2013

Modified Files:
src/sys/arch/arm/omap: am335x_prcm.c am335x_prcm.h

Log Message:
Add a routine to set the mpu multiplier.  (not used yet)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/omap/am335x_prcm.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/omap/am335x_prcm.h

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