CVS commit: src/sbin/gpt

2010-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  2 13:36:59 UTC 2010

Modified Files:
src/sbin/gpt: gpt.c

Log Message:
PR/43105: Peter Kerwien: Destroying a GPT partition with dd will cause gpt
destroy / create to fail. When reading the GPT label from the end of the disk
ignore errors if the GPT label at the beginning of the disk was not found.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sbin/gpt/gpt.c

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

Modified files:

Index: src/sbin/gpt/gpt.c
diff -u src/sbin/gpt/gpt.c:1.10 src/sbin/gpt/gpt.c:1.11
--- src/sbin/gpt/gpt.c:1.10	Sat Feb 20 03:47:10 2010
+++ src/sbin/gpt/gpt.c	Fri Apr  2 09:36:59 2010
@@ -31,7 +31,7 @@
 __FBSDID($FreeBSD: src/sbin/gpt/gpt.c,v 1.16 2006/07/07 02:44:23 marcel Exp $);
 #endif
 #ifdef __RCSID
-__RCSID($NetBSD: gpt.c,v 1.10 2010/02/20 08:47:10 mlelstv Exp $);
+__RCSID($NetBSD: gpt.c,v 1.11 2010/04/02 13:36:59 christos Exp $);
 #endif
 
 #include sys/param.h
@@ -561,7 +561,7 @@
 #endif
 
 static int
-gpt_gpt(int fd, off_t lba)
+gpt_gpt(int fd, off_t lba, int found)
 {
 	uuid_t type;
 	off_t size;
@@ -594,8 +594,15 @@
 
 	/* Use generic pointer to deal with hdr-hdr_entsz != sizeof(*ent). */
 	p = gpt_read(fd, le64toh(hdr-hdr_lba_table), blocks);
-	if (p == NULL)
-		return (-1);
+	if (p == NULL) {
+		if (found) {
+			if (verbose)
+warn(%s: Cannot read LBA table at sector %llu,
+device_name, le64toh(hdr-hdr_lba_table));
+			return (-1);
+		}
+		goto fail_hdr;
+	}
 
 	if (crc32(p, tblsz) != le32toh(hdr-hdr_crc_table)) {
 		if (verbose)
@@ -620,7 +627,7 @@
 		return (-1);
 
 	if (lba != 1)
-		return (0);
+		return (1);
 
 	for (i = 0; i  le32toh(hdr-hdr_entries); i++) {
 		ent = (void*)(p + i * le32toh(hdr-hdr_entsz));
@@ -644,7 +651,7 @@
 			return (-1);
 		m-map_index = i + 1;
 	}
-	return (0);
+	return (1);
 
  fail_ent:
 	free(p);
@@ -658,7 +665,7 @@
 gpt_open(const char *dev)
 {
 	struct stat sb;
-	int fd, mode;
+	int fd, mode, found;
 
 	mode = readonly ? O_RDONLY : O_RDWR|O_EXCL;
 
@@ -724,9 +731,9 @@
 
 	if (gpt_mbr(fd, 0LL) == -1)
 		goto close;
-	if (gpt_gpt(fd, 1LL) == -1)
+	if ((found = gpt_gpt(fd, 1LL, 1)) == -1)
 		goto close;
-	if (gpt_gpt(fd, mediasz / secsz - 1LL) == -1)
+	if (gpt_gpt(fd, mediasz / secsz - 1LL, found) == -1)
 		goto close;
 
 	return (fd);



CVS commit: src/sys/kern

2010-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  2 14:11:18 UTC 2010

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

Log Message:
fix debugging printf.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/kern/exec_elf.c

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

Modified files:

Index: src/sys/kern/exec_elf.c
diff -u src/sys/kern/exec_elf.c:1.19 src/sys/kern/exec_elf.c:1.20
--- src/sys/kern/exec_elf.c:1.19	Mon Mar 22 18:10:10 2010
+++ src/sys/kern/exec_elf.c	Fri Apr  2 10:11:18 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: exec_elf.c,v 1.19 2010/03/22 22:10:10 drochner Exp $	*/
+/*	$NetBSD: exec_elf.c,v 1.20 2010/04/02 14:11:18 christos Exp $	*/
 
 /*-
  * Copyright (c) 1994, 2000, 2005 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(1, $NetBSD: exec_elf.c,v 1.19 2010/03/22 22:10:10 drochner Exp $);
+__KERNEL_RCSID(1, $NetBSD: exec_elf.c,v 1.20 2010/04/02 14:11:18 christos Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_pax.h
@@ -144,8 +144,9 @@
 #ifdef PAX_ASLR_DEBUG
 		uprintf(r=0x%x l2=0x%zx PGSHIFT=0x%x Delta=0x%zx\n, r, l2,
 		PGSHIFT, delta);
-		uprintf(pax offset=0x%zx entry=0x%llx\n,
-		offset, (unsigned long long)eh-e_entry);
+		uprintf(pax offset=0x%llx entry=0x%llx\n,
+		(unsigned long long)offset,
+		(unsigned long long)eh-e_entry);
 #endif /* PAX_ASLR_DEBUG */
 	} else
 #endif /* PAX_ASLR */



CVS commit: src/bin/ls

2010-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  2 15:09:12 UTC 2010

Modified Files:
src/bin/ls: print.c

Log Message:
make it obvious to grep that we are checking ctime.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/bin/ls/print.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/ls/print.c
diff -u src/bin/ls/print.c:1.46 src/bin/ls/print.c:1.47
--- src/bin/ls/print.c:1.46	Thu Apr  1 18:23:27 2010
+++ src/bin/ls/print.c	Fri Apr  2 11:09:12 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: print.c,v 1.46 2010/04/01 22:23:27 christos Exp $	*/
+/*	$NetBSD: print.c,v 1.47 2010/04/02 15:09:12 christos Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993, 1994
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = @(#)print.c	8.5 (Berkeley) 7/28/94;
 #else
-__RCSID($NetBSD: print.c,v 1.46 2010/04/01 22:23:27 christos Exp $);
+__RCSID($NetBSD: print.c,v 1.47 2010/04/02 15:09:12 christos Exp $);
 #endif
 #endif /* not lint */
 
@@ -355,8 +355,7 @@
 	int i;
 	const char *longstring;
 
-	longstring = ctime(ftime);
-	if (longstring == NULL) {
+	if ((longstring = ctime(ftime)) == NULL) {
 			   /* 012345678901234567890123 */
 		longstring = ;
 	}



CVS commit: src/crypto/dist/ipsec-tools/src/libipsec

2010-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  2 15:13:27 UTC 2010

Modified Files:
src/crypto/dist/ipsec-tools/src/libipsec: pfkey_dump.c

Log Message:
handle ctime returning NULL.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 \
src/crypto/dist/ipsec-tools/src/libipsec/pfkey_dump.c

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

Modified files:

Index: src/crypto/dist/ipsec-tools/src/libipsec/pfkey_dump.c
diff -u src/crypto/dist/ipsec-tools/src/libipsec/pfkey_dump.c:1.16 src/crypto/dist/ipsec-tools/src/libipsec/pfkey_dump.c:1.17
--- src/crypto/dist/ipsec-tools/src/libipsec/pfkey_dump.c:1.16	Wed Jul 18 08:07:50 2007
+++ src/crypto/dist/ipsec-tools/src/libipsec/pfkey_dump.c	Fri Apr  2 11:13:26 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: pfkey_dump.c,v 1.16 2007/07/18 12:07:50 vanhu Exp $	*/
+/*	$NetBSD: pfkey_dump.c,v 1.17 2010/04/02 15:13:26 christos Exp $	*/
 
 /*	$KAME: pfkey_dump.c,v 1.45 2003/09/08 10:14:56 itojun Exp $	*/
 
@@ -774,8 +774,10 @@
 		for (;i  20;) buf[i++] = ' ';
 	} else {
 		char *t0;
-		t0 = ctime(t);
-		memcpy(buf, t0 + 4, 20);
+		if ((t0 = ctime(t)) == NULL)
+			memset(buf, '?', 20);
+		else
+			memcpy(buf, t0 + 4, 20);
 	}
 
 	buf[20] = '\0';



CVS commit: src/crypto/dist/ipsec-tools/src/racoon

2010-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  2 15:15:00 UTC 2010

Modified Files:
src/crypto/dist/ipsec-tools/src/racoon: backupsa.c

Log Message:
handle ctime returning NULL.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/crypto/dist/ipsec-tools/src/racoon/backupsa.c

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

Modified files:

Index: src/crypto/dist/ipsec-tools/src/racoon/backupsa.c
diff -u src/crypto/dist/ipsec-tools/src/racoon/backupsa.c:1.9 src/crypto/dist/ipsec-tools/src/racoon/backupsa.c:1.10
--- src/crypto/dist/ipsec-tools/src/racoon/backupsa.c:1.9	Wed Jul 18 08:07:51 2007
+++ src/crypto/dist/ipsec-tools/src/racoon/backupsa.c	Fri Apr  2 11:15:00 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: backupsa.c,v 1.9 2007/07/18 12:07:51 vanhu Exp $	*/
+/*	$NetBSD: backupsa.c,v 1.10 2010/04/02 15:15:00 christos Exp $	*/
 
 /*	$KAME: backupsa.c,v 1.16 2001/12/31 20:13:40 thorpej Exp $	*/
 
@@ -452,7 +452,7 @@
 	struct tm tm;
 	time_t t;
 	char *buf = Nov 24 18:22:48 1986 ;
-	char *p;
+	const char *p;
 
 	memset(tm, 0, sizeof(tm));
 	p = str2tmx(buf, tm);
@@ -460,7 +460,8 @@
 	t = mktime(tm);
 	if (t == -1)
 		printf(mktime failed.);
-	p = ctime(t);
+	if ((p = ctime(t)) == NULL)
+		p = ?;
 	printf([%s]\n, p);
 
 	exit(0);



CVS commit: src/crypto/dist/heimdal/appl/ftp/ftpd

2010-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  2 15:17:53 UTC 2010

Modified Files:
src/crypto/dist/heimdal/appl/ftp/ftpd: kauth.c

Log Message:
handle ctime returning NULL.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/crypto/dist/heimdal/appl/ftp/ftpd/kauth.c

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

Modified files:

Index: src/crypto/dist/heimdal/appl/ftp/ftpd/kauth.c
diff -u src/crypto/dist/heimdal/appl/ftp/ftpd/kauth.c:1.2 src/crypto/dist/heimdal/appl/ftp/ftpd/kauth.c:1.3
--- src/crypto/dist/heimdal/appl/ftp/ftpd/kauth.c:1.2	Sat Mar 22 04:36:50 2008
+++ src/crypto/dist/heimdal/appl/ftp/ftpd/kauth.c	Fri Apr  2 11:17:52 2010
@@ -34,7 +34,7 @@
 #include ftpd_locl.h
 
 __RCSID($Heimdal: kauth.c 15666 2005-07-19 17:08:11Z lha $
-$NetBSD: kauth.c,v 1.2 2008/03/22 08:36:50 mlelstv Exp $);
+$NetBSD: kauth.c,v 1.3 2010/04/02 15:17:52 christos Exp $);
 
 #if defined(KRB4) || defined(KRB5)
 
@@ -238,8 +238,9 @@
 char *cp;
 time_t t = (time_t)dp;
 
-if (t == (time_t)(-1L)) return ***  Never  *** ;
-cp = ctime(t) + 4;
+if (t == (time_t)(-1L) || (cp = ctime(t)) == NULL)
+	return ***  Never  *** ;
+cp += 4;
 cp[15] = '\0';
 return (cp);
 }



CVS commit: src/crypto/dist/heimdal/appl/otp

2010-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  2 15:19:03 UTC 2010

Modified Files:
src/crypto/dist/heimdal/appl/otp: otp.c

Log Message:
make it obvious what ctime is used for.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/crypto/dist/heimdal/appl/otp/otp.c

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

Modified files:

Index: src/crypto/dist/heimdal/appl/otp/otp.c
diff -u src/crypto/dist/heimdal/appl/otp/otp.c:1.5 src/crypto/dist/heimdal/appl/otp/otp.c:1.6
--- src/crypto/dist/heimdal/appl/otp/otp.c:1.5	Sat Mar 22 04:36:55 2008
+++ src/crypto/dist/heimdal/appl/otp/otp.c	Fri Apr  2 11:19:02 2010
@@ -35,7 +35,7 @@
 #include getarg.h
 
 __RCSID($Heimdal: otp.c 12753 2003-09-03 09:37:03Z lha $
-$NetBSD: otp.c,v 1.5 2008/03/22 08:36:55 mlelstv Exp $);
+$NetBSD: otp.c,v 1.6 2010/04/02 15:19:02 christos Exp $);
 
 static int listp;
 static int deletep;
@@ -234,9 +234,7 @@
 		%s\totp-%s %d %s,
 		ctx.user, ctx.alg-name, ctx.n, ctx.seed);
 	if (ctx.lock_time)
-	fprintf(stdout,
-		\tlocked since %s,
-		ctime(ctx.lock_time));
+	fprintf(stdout, \tlocked since %s, ctime(ctx.lock_time));
 	else
 	fprintf(stdout, \n);
 }



CVS commit: src/crypto/dist/heimdal/kuser

2010-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  2 15:23:18 UTC 2010

Modified Files:
src/crypto/dist/heimdal/kuser: klist.c

Log Message:
handle ctime returning NULL.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/crypto/dist/heimdal/kuser/klist.c

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

Modified files:

Index: src/crypto/dist/heimdal/kuser/klist.c
diff -u src/crypto/dist/heimdal/kuser/klist.c:1.9 src/crypto/dist/heimdal/kuser/klist.c:1.10
--- src/crypto/dist/heimdal/kuser/klist.c:1.9	Sat Mar 22 04:37:03 2008
+++ src/crypto/dist/heimdal/kuser/klist.c	Fri Apr  2 11:23:17 2010
@@ -35,24 +35,32 @@
 #include rtbl.h
 
 __RCSID($Heimdal: klist.c 20516 2007-04-22 10:40:41Z lha $
-$NetBSD: klist.c,v 1.9 2008/03/22 08:37:03 mlelstv Exp $);
+$NetBSD: klist.c,v 1.10 2010/04/02 15:23:17 christos Exp $);
 
 static char*
-printable_time(time_t t)
+printable_time_internal(time_t t, int x)
 {
 static char s[128];
-strlcpy(s, ctime(t)+ 4, sizeof(s));
-s[15] = 0;
+char *p = ctime(t);
+if (p == NULL)
+	strlcpy(s, ?, sizeof(s));
+else {
+	strlcpy(s, p + 4, sizeof(s));
+	s[x] = 0;
+}
 return s;
 }
 
 static char*
+printable_time(time_t t)
+{
+return printable_time_internal(t, 15);
+}
+
+static char*
 printable_time_long(time_t t)
 {
-static char s[128];
-strlcpy(s, ctime(t)+ 4, sizeof(s));
-s[20] = 0;
-return s;
+return printable_time_internal(t, 20);
 }
 
 #define COL_ISSUED		  Issued



CVS commit: src/sys/arch/hp700/hp700

2010-04-02 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Apr  2 15:24:18 UTC 2010

Modified Files:
src/sys/arch/hp700/hp700: mainbus.c

Log Message:
Change #ifdef DIAGNOSITC tests+panic to KASSERTs.


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/sys/arch/hp700/hp700/mainbus.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/hp700/hp700/mainbus.c
diff -u src/sys/arch/hp700/hp700/mainbus.c:1.63 src/sys/arch/hp700/hp700/mainbus.c:1.64
--- src/sys/arch/hp700/hp700/mainbus.c:1.63	Thu Apr  1 12:21:41 2010
+++ src/sys/arch/hp700/hp700/mainbus.c	Fri Apr  2 15:24:18 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: mainbus.c,v 1.63 2010/04/01 12:21:41 skrll Exp $	*/
+/*	$NetBSD: mainbus.c,v 1.64 2010/04/02 15:24:18 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.63 2010/04/01 12:21:41 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.64 2010/04/02 15:24:18 skrll Exp $);
 
 #include locators.h
 #include power.h
@@ -954,10 +954,7 @@
 	map-dm_mapsize = 0;
 	map-dm_nsegs = 0;
 
-#ifdef DIAGNOSTIC
-	if ((m0-m_flags  M_PKTHDR) == 0)
-		panic(_bus_dmamap_load_mbuf: no packet header);
-#endif	/* DIAGNOSTIC */
+	KASSERT(m0-m_flags  M_PKTHDR);
 
 	if (m0-m_pkthdr.len  map-_dm_size)
 		return (EINVAL);
@@ -1318,15 +1315,10 @@
 	int i;
 
 	for (i = 0; i  nsegs; i++) {
-#ifdef DIAGNOSTIC
-		if (off  PGOFSET)
-			panic(_bus_dmamem_mmap: offset unaligned);
-		if (segs[i].ds_addr  PGOFSET)
-			panic(_bus_dmamem_mmap: segment unaligned);
-		if (segs[i].ds_len  PGOFSET)
-			panic(_bus_dmamem_mmap: segment size not multiple
-			 of page size);
-#endif	/* DIAGNOSTIC */
+		KASSERT((off  PGOFSET) == 0);
+		KASSERT((segs[i].ds_addr  PGOFSET) == 0);
+		KASSERT((segs[i].ds_len  PGOFSET) == 0);
+
 		if (off = segs[i].ds_len) {
 			off -= segs[i].ds_len;
 			continue;



CVS commit: src/crypto/dist/heimdal/kuser

2010-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  2 15:25:04 UTC 2010

Modified Files:
src/crypto/dist/heimdal/kuser: klist.c

Log Message:
make it obvious to grep that ctime is being checked.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/crypto/dist/heimdal/kuser/klist.c

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

Modified files:

Index: src/crypto/dist/heimdal/kuser/klist.c
diff -u src/crypto/dist/heimdal/kuser/klist.c:1.10 src/crypto/dist/heimdal/kuser/klist.c:1.11
--- src/crypto/dist/heimdal/kuser/klist.c:1.10	Fri Apr  2 11:23:17 2010
+++ src/crypto/dist/heimdal/kuser/klist.c	Fri Apr  2 11:25:04 2010
@@ -35,14 +35,14 @@
 #include rtbl.h
 
 __RCSID($Heimdal: klist.c 20516 2007-04-22 10:40:41Z lha $
-$NetBSD: klist.c,v 1.10 2010/04/02 15:23:17 christos Exp $);
+$NetBSD: klist.c,v 1.11 2010/04/02 15:25:04 christos Exp $);
 
 static char*
 printable_time_internal(time_t t, int x)
 {
 static char s[128];
-char *p = ctime(t);
-if (p == NULL)
+char *p;
+if ((p = ctime(t)) == NULL)
 	strlcpy(s, ?, sizeof(s));
 else {
 	strlcpy(s, p + 4, sizeof(s));



CVS commit: src/sys/arch/hppa/hppa

2010-04-02 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Apr  2 15:25:51 UTC 2010

Modified Files:
src/sys/arch/hppa/hppa: pmap.c

Log Message:
Pull across pmap_remove fix from OpenBSD.

Fix user-after-free bug in pmap_remove().  Page table pages are freed as soon
as the last page table entry that was actually used is cleared.  So make sure
we check the page table page is still there for every page we remove.
Otherwise we will bring back the tlb entry and cache lines when we touch the
freed page, and we will create an illegal alias (non-equivalent mapping)
as soon as the page gets re-used.


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/sys/arch/hppa/hppa/pmap.c

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

Modified files:

Index: src/sys/arch/hppa/hppa/pmap.c
diff -u src/sys/arch/hppa/hppa/pmap.c:1.74 src/sys/arch/hppa/hppa/pmap.c:1.75
--- src/sys/arch/hppa/hppa/pmap.c:1.74	Fri Mar 19 07:35:29 2010
+++ src/sys/arch/hppa/hppa/pmap.c	Fri Apr  2 15:25:51 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.74 2010/03/19 07:35:29 skrll Exp $	*/
+/*	$NetBSD: pmap.c,v 1.75 2010/04/02 15:25:51 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.74 2010/03/19 07:35:29 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.75 2010/04/02 15:25:51 skrll Exp $);
 
 #include opt_cputype.h
 
@@ -1279,15 +1279,13 @@
 
 	PMAP_LOCK(pmap);
 
-	for (batch = 0, pdemask = 1; sva  eva; sva += PAGE_SIZE) {
-		if (pdemask != (sva  PDE_MASK)) {
-			pdemask = sva  PDE_MASK;
-			if (!(pde = pmap_pde_get(pmap-pm_pdir, sva))) {
-sva = pdemask + PDE_SIZE - PAGE_SIZE;
-continue;
-			}
-			batch = pdemask == sva  sva + PDE_SIZE = eva;
+	for (batch = 0; sva  eva; sva += PAGE_SIZE) {
+		pdemask = sva  PDE_MASK;
+		if (!(pde = pmap_pde_get(pmap-pm_pdir, sva))) {
+			sva = pdemask + PDE_SIZE - PAGE_SIZE;
+			continue;
 		}
+		batch = pdemask == sva  sva + PDE_SIZE = eva;
 
 		if ((pte = pmap_pte_get(pde, sva))) {
 



CVS commit: src/crypto/dist/heimdal/lib/hx509

2010-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  2 15:26:17 UTC 2010

Modified Files:
src/crypto/dist/heimdal/lib/hx509: revoke.c

Log Message:
handle ctime returning NULL.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/crypto/dist/heimdal/lib/hx509/revoke.c

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

Modified files:

Index: src/crypto/dist/heimdal/lib/hx509/revoke.c
diff -u src/crypto/dist/heimdal/lib/hx509/revoke.c:1.1 src/crypto/dist/heimdal/lib/hx509/revoke.c:1.2
--- src/crypto/dist/heimdal/lib/hx509/revoke.c:1.1	Sat Mar 22 05:42:41 2008
+++ src/crypto/dist/heimdal/lib/hx509/revoke.c	Fri Apr  2 11:26:17 2010
@@ -51,7 +51,7 @@
 
 #include hx_locl.h
 __RCSID($Heimdal: revoke.c 22275 2007-12-11 11:02:11Z lha $
-$NetBSD: revoke.c,v 1.1 2008/03/22 09:42:41 mlelstv Exp $);
+$NetBSD: revoke.c,v 1.2 2010/04/02 15:26:17 christos Exp $);
 
 struct revoke_crl {
 char *path;
@@ -1049,8 +1049,13 @@
 printable_time(time_t t)
 {
 static char s[128];
-strlcpy(s, ctime(t)+ 4, sizeof(s));
-s[20] = 0;
+char *p;
+if ((p = ctime(t)) == NULL)
+	strlcpy(s, ?, sizeof(s));
+else {
+	strlcpy(s, p + 4, sizeof(s));
+	s[20] = 0;
+}
 return s;
 }
 



CVS commit: src/crypto/external/bsd/netpgp/dist/src/lib

2010-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  2 15:28:16 UTC 2010

Modified Files:
src/crypto/external/bsd/netpgp/dist/src/lib: misc.c

Log Message:
make it obvious what ctime it is used for.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/crypto/external/bsd/netpgp/dist/src/lib/misc.c

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

Modified files:

Index: src/crypto/external/bsd/netpgp/dist/src/lib/misc.c
diff -u src/crypto/external/bsd/netpgp/dist/src/lib/misc.c:1.27 src/crypto/external/bsd/netpgp/dist/src/lib/misc.c:1.28
--- src/crypto/external/bsd/netpgp/dist/src/lib/misc.c:1.27	Fri Mar  5 11:01:09 2010
+++ src/crypto/external/bsd/netpgp/dist/src/lib/misc.c	Fri Apr  2 11:28:16 2010
@@ -57,7 +57,7 @@
 
 #if defined(__NetBSD__)
 __COPYRIGHT(@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.);
-__RCSID($NetBSD: misc.c,v 1.27 2010/03/05 16:01:09 agc Exp $);
+__RCSID($NetBSD: misc.c,v 1.28 2010/04/02 15:28:16 christos Exp $);
 #endif
 
 #include sys/types.h
@@ -1248,12 +1248,10 @@
 	va_list	 vp;
 	time_t	 t;
 	char	 buf[BUFSIZ * 2];
-	char	*cp;
 	int	 cc;
 
 	(void) time(t);
-	cp = ctime(t);
-	cc = snprintf(buf, sizeof(buf), %.24s: netpgp: , cp);
+	cc = snprintf(buf, sizeof(buf), %.24s: netpgp: , ctime(t));
 	va_start(vp, fmt);
 	(void) vsnprintf(buf[cc], sizeof(buf) - (size_t)cc, fmt, vp);
 	va_end(vp);



CVS commit: src/distrib/utils/tls

2010-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  2 15:34:16 UTC 2010

Modified Files:
src/distrib/utils/tls: tls.c

Log Message:
handle ctime returning NULL.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/distrib/utils/tls/tls.c

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

Modified files:

Index: src/distrib/utils/tls/tls.c
diff -u src/distrib/utils/tls/tls.c:1.3 src/distrib/utils/tls/tls.c:1.4
--- src/distrib/utils/tls/tls.c:1.3	Wed Oct 21 19:12:09 2009
+++ src/distrib/utils/tls/tls.c	Fri Apr  2 11:34:16 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: tls.c,v 1.3 2009/10/21 23:12:09 snj Exp $	*/
+/*	$NetBSD: tls.c,v 1.4 2010/04/02 15:34:16 christos Exp $	*/
 
 /*
  * Copyright (c) 1995 Gordon W. Ross
@@ -126,10 +126,13 @@
 	}
 
 	/* date */
-	date = ctime(st.st_mtime);
-	date += 4;	/* skip day-of-week */
-	date[12] = '\0';	/* to the minute */
-	printf(%s , date);
+	if ((date = ctime(st.st_mtime)) == NULL)
+		printf(? );
+	else {
+		date += 4;	/* skip day-of-week */
+		date[12] = '\0';	/* to the minute */
+		printf(%s , date);
+	}
 
 	/* name */
 	printf(%s, fname);



CVS commit: src/games/battlestar

2010-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  2 15:35:32 UTC 2010

Modified Files:
src/games/battlestar: command6.c

Log Message:
handle ctime returning NULL.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/games/battlestar/command6.c

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

Modified files:

Index: src/games/battlestar/command6.c
diff -u src/games/battlestar/command6.c:1.5 src/games/battlestar/command6.c:1.6
--- src/games/battlestar/command6.c:1.5	Wed Aug 12 01:20:38 2009
+++ src/games/battlestar/command6.c	Fri Apr  2 11:35:32 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: command6.c,v 1.5 2009/08/12 05:20:38 dholland Exp $	*/
+/*	$NetBSD: command6.c,v 1.6 2010/04/02 15:35:32 christos Exp $	*/
 
 /*
  * Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = @(#)com6.c	8.2 (Berkeley) 4/28/95;
 #else
-__RCSID($NetBSD: command6.c,v 1.5 2009/08/12 05:20:38 dholland Exp $);
+__RCSID($NetBSD: command6.c,v 1.6 2010/04/02 15:35:32 christos Exp $);
 #endif
 #endif/* not lint */
 
@@ -120,17 +120,14 @@
 post(int ch)
 {
 	time_t tv;
-	char   *date;
 	sigset_t isigset, osigset;
 
 	sigemptyset(isigset);
 	sigaddset(isigset, SIGINT);
 	sigprocmask(SIG_BLOCK, isigset, osigset);
 	tv = time(NULL);
-	date = ctime(tv);
-	date[24] = '\0';
 	if (score_fp != NULL) {
-		fprintf(score_fp, %s  %8s  %c%20s, date, username, 
+		fprintf(score_fp, %24.24s  %8s  %c%20s, ctime(t), username, 
 		ch, rate());
 		if (wiz)
 			fprintf(score_fp,wizard\n);



CVS commit: src/dist/ntp/util

2010-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  2 15:38:05 UTC 2010

Modified Files:
src/dist/ntp/util: ntptime.c

Log Message:
remove bogus cast that hides bugs if tv_sec is non POSIX compliant.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/dist/ntp/util/ntptime.c

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

Modified files:

Index: src/dist/ntp/util/ntptime.c
diff -u src/dist/ntp/util/ntptime.c:1.4 src/dist/ntp/util/ntptime.c:1.5
--- src/dist/ntp/util/ntptime.c:1.4	Sat Mar 18 03:09:03 2006
+++ src/dist/ntp/util/ntptime.c	Fri Apr  2 11:38:05 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntptime.c,v 1.4 2006/03/18 08:09:03 kardel Exp $	*/
+/*	$NetBSD: ntptime.c,v 1.5 2010/04/02 15:38:05 christos Exp $	*/
 
 /*
  * NTP test program
@@ -301,7 +301,7 @@
 		printf(  ntptime=%x.%x unixtime=%x.%0*d %s,
 		(unsigned int) ts.l_ui, (unsigned int) ts.l_uf,
 		(int) ntv.time.tv_sec, fdigits, (int) time_frac,
-		ctime((const time_t *) ntv.time.tv_sec));
+		ctime(ntv.time.tv_sec));
 #if NTP_API  3
 		printf(, TAI offset %ld\n, (long)ntv.tai);
 #else



CVS commit: src/dist/pppd/pppd

2010-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  2 15:40:14 UTC 2010

Modified Files:
src/dist/pppd/pppd: utils.c

Log Message:
handle ctime returning NULL.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/dist/pppd/pppd/utils.c

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

Modified files:

Index: src/dist/pppd/pppd/utils.c
diff -u src/dist/pppd/pppd/utils.c:1.3 src/dist/pppd/pppd/utils.c:1.4
--- src/dist/pppd/pppd/utils.c:1.3	Sun Nov  5 04:16:20 2006
+++ src/dist/pppd/pppd/utils.c	Fri Apr  2 11:40:14 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: utils.c,v 1.3 2006/11/05 09:16:20 martin Exp $	*/
+/*	$NetBSD: utils.c,v 1.4 2010/04/02 15:40:14 christos Exp $	*/
 
 /*
  * utils.c - various utility functions used in pppd.
@@ -35,7 +35,7 @@
 #if 0
 #define RCSID	Id: utils.c,v 1.24 2004/11/04 10:02:26 paulus Exp
 #else
-__RCSID($NetBSD: utils.c,v 1.3 2006/11/05 09:16:20 martin Exp $);
+__RCSID($NetBSD: utils.c,v 1.4 2010/04/02 15:40:14 christos Exp $);
 #endif
 #endif
 
@@ -271,9 +271,12 @@
 #endif
 	case 't':
 	time(t);
-	str = ctime(t);
-	str += 4;		/* chop off the day name */
-	str[15] = 0;	/* chop off year and newline */
+	if ((str = ctime(t)) == NULL)
+		strlcpy(str = num, ?, sizeof(num);
+	else {
+		str += 4;		/* chop off the day name */
+		str[15] = 0;	/* chop off year and newline */
+	}
 	break;
 	case 'v':		/* visible string */
 	case 'q':		/* quoted string */



CVS commit: src/sys/arch/sparc64

2010-04-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Apr  2 18:34:16 UTC 2010

Modified Files:
src/sys/arch/sparc64/include: bootinfo.h
src/sys/arch/sparc64/sparc64: autoconf.c

Log Message:
Add a bootinfo node to allow the loader to override the boot device


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/sparc64/include/bootinfo.h
cvs rdiff -u -r1.173 -r1.174 src/sys/arch/sparc64/sparc64/autoconf.c

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

Modified files:

Index: src/sys/arch/sparc64/include/bootinfo.h
diff -u src/sys/arch/sparc64/include/bootinfo.h:1.4 src/sys/arch/sparc64/include/bootinfo.h:1.5
--- src/sys/arch/sparc64/include/bootinfo.h:1.4	Mon Apr 28 20:23:36 2008
+++ src/sys/arch/sparc64/include/bootinfo.h	Fri Apr  2 18:34:16 2010
@@ -1,4 +1,4 @@
-/*   $NetBSD: bootinfo.h,v 1.4 2008/04/28 20:23:36 martin Exp $*/
+/*   $NetBSD: bootinfo.h,v 1.5 2010/04/02 18:34:16 martin Exp $*/
 
 /*-
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -97,6 +97,7 @@
 #define BTINFO_DTLB			102
 #define BTINFO_ITLB			103
 #define BTINFO_KERNEND			104
+#define BTINFO_BOOTDEV			105
 
 #define LOOKUP_BOOTINFO(btp, info) \
 do { \
@@ -125,4 +126,9 @@
 	uint64_t addr;
 };
 
+struct btinfo_bootdev {
+	struct btinfo_common common;
+	char name[1];
+};
+
 #endif /* _BOOTINFO_H_ */

Index: src/sys/arch/sparc64/sparc64/autoconf.c
diff -u src/sys/arch/sparc64/sparc64/autoconf.c:1.173 src/sys/arch/sparc64/sparc64/autoconf.c:1.174
--- src/sys/arch/sparc64/sparc64/autoconf.c:1.173	Thu Mar 11 03:54:56 2010
+++ src/sys/arch/sparc64/sparc64/autoconf.c	Fri Apr  2 18:34:16 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.173 2010/03/11 03:54:56 mrg Exp $ */
+/*	$NetBSD: autoconf.c,v 1.174 2010/04/02 18:34:16 martin Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -48,7 +48,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.173 2010/03/11 03:54:56 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.174 2010/04/02 18:34:16 martin Exp $);
 
 #include opt_ddb.h
 #include opt_kgdb.h
@@ -346,17 +346,24 @@
 static void
 get_bootpath_from_prom(void)
 {
+	struct btinfo_bootdev *bdev = NULL;
 	char sbuf[OFPATHLEN], *cp;
 	int chosen;
 
 	/*
 	 * Grab boot path from PROM
 	 */
-	if ((chosen = OF_finddevice(/chosen)) == -1 ||
-	OF_getprop(chosen, bootpath, sbuf, sizeof(sbuf))  0)
+	if ((chosen = OF_finddevice(/chosen)) == -1)
 		return;
 
-	strcpy(ofbootpath, sbuf);
+	LOOKUP_BOOTINFO(bdev, BTINFO_BOOTDEV);
+	if (bdev) {
+		strcpy(ofbootpath, bdev-name);
+	} else {
+		if (OF_getprop(chosen, bootpath, sbuf, sizeof(sbuf))  0)
+			return;
+		strcpy(ofbootpath, sbuf);
+	}
 	DPRINTF(ACDB_BOOTDEV, (bootpath: %s\n, ofbootpath));
 	ofbootpackage = prom_finddevice(ofbootpath);
 



CVS commit: src/sys/arch/sparc/stand/ofwboot

2010-04-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Apr  2 18:39:44 UTC 2010

Modified Files:
src/sys/arch/sparc/stand/ofwboot: Makefile boot.c ofdev.c

Log Message:
Add support for /boot.cfg. Implement a single command for now: override
the boot partition, which will be used for bootable CDs. Add cd9660
support.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/sparc/stand/ofwboot/Makefile
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/sparc/stand/ofwboot/boot.c
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/sparc/stand/ofwboot/ofdev.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/sparc/stand/ofwboot/Makefile
diff -u src/sys/arch/sparc/stand/ofwboot/Makefile:1.22 src/sys/arch/sparc/stand/ofwboot/Makefile:1.23
--- src/sys/arch/sparc/stand/ofwboot/Makefile:1.22	Fri Nov 27 11:14:23 2009
+++ src/sys/arch/sparc/stand/ofwboot/Makefile	Fri Apr  2 18:39:44 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.22 2009/11/27 11:14:23 tsutsui Exp $
+#	$NetBSD: Makefile,v 1.23 2010/04/02 18:39:44 martin Exp $
 
 CURDIR=	${.CURDIR}
 S=	${CURDIR}/../../../..
@@ -59,7 +59,7 @@
 CPPFLAGS+=	-DSPARC_BOOT_ELF
 CPPFLAGS+=	-DSPARC_BOOT_UFS
 CPPFLAGS+=	-DSPARC_BOOT_NFS
-#CPPFLAGS+=	-DSPARC_BOOT_CD9660
+CPPFLAGS+=	-DSPARC_BOOT_CD9660
 
 ### find out what to use for libkern
 KERN_AS=	library

Index: src/sys/arch/sparc/stand/ofwboot/boot.c
diff -u src/sys/arch/sparc/stand/ofwboot/boot.c:1.21 src/sys/arch/sparc/stand/ofwboot/boot.c:1.22
--- src/sys/arch/sparc/stand/ofwboot/boot.c:1.21	Wed Jan 27 22:18:37 2010
+++ src/sys/arch/sparc/stand/ofwboot/boot.c	Fri Apr  2 18:39:44 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: boot.c,v 1.21 2010/01/27 22:18:37 martin Exp $	*/
+/*	$NetBSD: boot.c,v 1.22 2010/04/02 18:39:44 martin Exp $	*/
 
 /*
  * Copyright (c) 1997, 1999 Eduardo E. Horvath.  All rights reserved.
@@ -89,6 +89,8 @@
 };
 
 char bootdev[PROM_MAX_PATH];
+bool root_fs_quickseekable = true;	/* unset for tftp boots */
+static bool bootinfo_pass_bootdev = false;
 
 int debug  = 0;
 int compatmode = 0;
@@ -272,6 +274,17 @@
 	bi_add(bi_sym, BTINFO_SYMTAB, sizeof(bi_sym));
 	bi_kend.addr= bootinfo + BOOTINFO_SIZE;
 	bi_add(bi_kend, BTINFO_KERNEND, sizeof(bi_kend));
+	if (bootinfo_pass_bootdev) {
+		struct {
+			struct btinfo_common common;
+			char name[256];
+		} info;
+		
+		strcpy(info.name, bootdev);
+		bi_add(info, BTINFO_BOOTDEV, strlen(bootdev)
+			+sizeof(struct btinfo_bootdev));
+	}
+
 	sparc64_finalize_tlb(marks[MARK_DATA]);
 	sparc64_bi_add();
 
@@ -383,6 +396,95 @@
 		  disk:a netbsd -s\n);
 }
 
+static void
+do_config_command(const char *cmd, const char *arg)
+{
+	DPRINTF((do_config_command: %s\n, cmd));
+	if (strcmp(cmd, bootpartition) == 0) {
+		char *c;
+
+		DPRINTF((switching boot partition to %s from %s\n,
+		arg, bootdev));
+		c = strrchr(bootdev, ':');
+		if (!c) return;
+		if (c[1] == 0) return;
+		if (strlen(arg)  strlen(c)) return;
+		strcpy(c, arg);
+		DPRINTF((new boot device: %s\n, bootdev));
+		bootinfo_pass_bootdev = true;
+	}
+}
+
+static void
+parse_boot_config(char *cfg, size_t len)
+{
+	const char *cmd = NULL, *arg = NULL;
+
+	while (len) {
+		if (isspace(*cfg)) {
+			cfg++; len--; continue;
+		}
+		if (*cfg == ';' || *cfg == '#') {
+			while (len  *cfg != '\r'  *cfg != '\n') {
+cfg++; len--;
+			}
+			continue;
+		}
+		cmd = cfg;
+		while (len  !isspace(*cfg)) {
+			cfg++; len--;
+		}
+		*cfg = 0;
+		if (len  0) {
+			cfg++; len--;
+			while (isspace(*cfg)  len) {
+cfg++; len--;
+			}
+			if (len  0 ) {
+arg = cfg;
+while (len  !isspace(*cfg)) {
+	cfg++; len--;
+}
+*cfg = 0;
+			}
+		}
+		do_config_command(cmd, arg);
+		if (len  0) {
+			cfg++; len--;
+		}
+	}
+}
+
+static void
+check_boot_config(void)
+{
+	int fd, err, off, len;
+	struct stat st;
+	char *bc;
+
+	if (!root_fs_quickseekable) return;
+	DPRINTF((checking for /boot.cfg...\n));
+	fd = open(/boot.cfg, 0);
+	if (fd  0) return;
+	DPRINTF((found /boot.cfg\n));
+	if (fstat(fd, st) == -1 || st.st_size  32*1024) {
+		close(fd);
+		return;
+	}
+	bc = alloc(st.st_size+1);
+	off = 0;
+	do {
+		len = read(fd, bc+off, 1024);
+		if (len = 0)
+			break;
+		off += len;
+	} while (len  0);
+	bc[off] = 0;
+	close(fd);
+
+	parse_boot_config(bc, off);
+}
+
 void
 main(void *ofw)
 {
@@ -438,6 +540,7 @@
 			boothowto |= RB_ASKNAME;
 		}
 
+		check_boot_config();
 		start_kernel(kernel, bootline, ofw);
 
 		/*

Index: src/sys/arch/sparc/stand/ofwboot/ofdev.c
diff -u src/sys/arch/sparc/stand/ofwboot/ofdev.c:1.26 src/sys/arch/sparc/stand/ofwboot/ofdev.c:1.27
--- src/sys/arch/sparc/stand/ofwboot/ofdev.c:1.26	Wed Feb 17 15:50:06 2010
+++ src/sys/arch/sparc/stand/ofwboot/ofdev.c	Fri Apr  2 18:39:44 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: ofdev.c,v 1.26 2010/02/17 15:50:06 eeh Exp $	*/
+/*	$NetBSD: ofdev.c,v 1.27 2010/04/02 18:39:44 martin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -58,6 +58,7 @@
 

CVS commit: src/sys/arch/sparc/stand/ofwboot

2010-04-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Apr  2 18:41:52 UTC 2010

Modified Files:
src/sys/arch/sparc/stand/ofwboot: version

Log Message:
Bump version


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/sparc/stand/ofwboot/version

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/sparc/stand/ofwboot/version
diff -u src/sys/arch/sparc/stand/ofwboot/version:1.18 src/sys/arch/sparc/stand/ofwboot/version:1.19
--- src/sys/arch/sparc/stand/ofwboot/version:1.18	Wed Jan 27 22:18:37 2010
+++ src/sys/arch/sparc/stand/ofwboot/version	Fri Apr  2 18:41:52 2010
@@ -1,4 +1,4 @@
-$NetBSD: version,v 1.18 2010/01/27 22:18:37 martin Exp $
+$NetBSD: version,v 1.19 2010/04/02 18:41:52 martin Exp $
 
 NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE.  The format of this
 file is important - make sure the entries are appended on end, last item
@@ -19,3 +19,4 @@
 1.13:	Deal with kernels missing a separate read-only text segment
 1.14:	Make 3 attempts at BOOTP/DHCP for to allow for bridges and clear prior data read
 1.15:	Properly close the firmware handle before starting the kernel
+1.16:	Add support to boot with root on cd9660



CVS commit: src/sys/miscfs/syncfs

2010-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  2 19:25:21 UTC 2010

Modified Files:
src/sys/miscfs/syncfs: sync_subr.c

Log Message:
starttime needs to be time_t (Izumi Tsutsui)


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/miscfs/syncfs/sync_subr.c

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

Modified files:

Index: src/sys/miscfs/syncfs/sync_subr.c
diff -u src/sys/miscfs/syncfs/sync_subr.c:1.41 src/sys/miscfs/syncfs/sync_subr.c:1.42
--- src/sys/miscfs/syncfs/sync_subr.c:1.41	Wed Sep 16 11:23:04 2009
+++ src/sys/miscfs/syncfs/sync_subr.c	Fri Apr  2 15:25:21 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: sync_subr.c,v 1.41 2009/09/16 15:23:04 pooka Exp $	*/
+/*	$NetBSD: sync_subr.c,v 1.42 2010/04/02 19:25:21 christos Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sync_subr.c,v 1.41 2009/09/16 15:23:04 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: sync_subr.c,v 1.42 2010/04/02 19:25:21 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -224,7 +224,7 @@
 {
 	struct synclist *slp;
 	struct vnode *vp;
-	long starttime;
+	time_t starttime;
 	bool synced;
 
 	updateproc = curlwp;



CVS commit: src/sbin/gpt

2010-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  2 19:33:09 UTC 2010

Modified Files:
src/sbin/gpt: gpt.c

Log Message:
fix printf format.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sbin/gpt/gpt.c

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

Modified files:

Index: src/sbin/gpt/gpt.c
diff -u src/sbin/gpt/gpt.c:1.11 src/sbin/gpt/gpt.c:1.12
--- src/sbin/gpt/gpt.c:1.11	Fri Apr  2 09:36:59 2010
+++ src/sbin/gpt/gpt.c	Fri Apr  2 15:33:09 2010
@@ -31,7 +31,7 @@
 __FBSDID($FreeBSD: src/sbin/gpt/gpt.c,v 1.16 2006/07/07 02:44:23 marcel Exp $);
 #endif
 #ifdef __RCSID
-__RCSID($NetBSD: gpt.c,v 1.11 2010/04/02 13:36:59 christos Exp $);
+__RCSID($NetBSD: gpt.c,v 1.12 2010/04/02 19:33:09 christos Exp $);
 #endif
 
 #include sys/param.h
@@ -598,7 +598,8 @@
 		if (found) {
 			if (verbose)
 warn(%s: Cannot read LBA table at sector %llu,
-device_name, le64toh(hdr-hdr_lba_table));
+device_name, (unsigned long long)
+le64toh(hdr-hdr_lba_table));
 			return (-1);
 		}
 		goto fail_hdr;



CVS commit: src/sys/arch

2010-04-02 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Apr  2 19:33:17 UTC 2010

Modified Files:
src/sys/arch/hp700/hp700: genassym.cf
src/sys/arch/hp700/include: cpu.h
src/sys/arch/hppa/hppa: trap.S

Log Message:
Per-cpu physical trap save area.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/hp700/hp700/genassym.cf
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/hp700/include/cpu.h
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/hppa/hppa/trap.S

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

Modified files:

Index: src/sys/arch/hp700/hp700/genassym.cf
diff -u src/sys/arch/hp700/hp700/genassym.cf:1.23 src/sys/arch/hp700/hp700/genassym.cf:1.24
--- src/sys/arch/hp700/hp700/genassym.cf:1.23	Wed Mar 31 12:56:14 2010
+++ src/sys/arch/hp700/hp700/genassym.cf	Fri Apr  2 19:33:16 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: genassym.cf,v 1.23 2010/03/31 12:56:14 skrll Exp $
+#	$NetBSD: genassym.cf,v 1.24 2010/04/02 19:33:16 skrll Exp $
 
 #	$OpenBSD: genassym.cf,v 1.18 2001/09/20 18:31:14 mickey Exp $
 
@@ -91,6 +91,7 @@
 #define	CI_SOFTLWPS		offsetof(struct cpu_info, ci_softlwps)
 define	CI_MTX_COUNT		offsetof(struct cpu_info, ci_mtx_count)
 #define	CI_CURLWP		offsetof(struct cpu_info, ci_curlwp)
+define	CI_TRAPSAVE		offsetof(struct cpu_info, ci_trapsave)
 
 define	MTX_IPL			offsetof(struct kmutex, mtx_ipl)
 define	MTX_LOCK		offsetof(struct kmutex, mtx_lock)
@@ -109,7 +110,6 @@
 # saved state fields
 struct	trapframe
 member	TF_FLAGS	tf_flags
-member	TF_PHYS		tf_sar
 member	TF_R1		tf_r1
 member	TF_R2		tf_rp
 member	TF_R3		tf_r3

Index: src/sys/arch/hp700/include/cpu.h
diff -u src/sys/arch/hp700/include/cpu.h:1.42 src/sys/arch/hp700/include/cpu.h:1.43
--- src/sys/arch/hp700/include/cpu.h:1.42	Wed Mar 31 12:56:14 2010
+++ src/sys/arch/hp700/include/cpu.h	Fri Apr  2 19:33:16 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.42 2010/03/31 12:56:14 skrll Exp $	*/
+/*	$NetBSD: cpu.h,v 1.43 2010/04/02 19:33:16 skrll Exp $	*/
 
 /*	$OpenBSD: cpu.h,v 1.55 2008/07/23 17:39:35 kettenis Exp $	*/
 
@@ -232,8 +232,11 @@
 	volatile int	ci_cpl;
 	volatile int	ci_ipending;	/* The pending interrupts. */
 	u_int		ci_intr_depth;	/* Nonzero iff running an interrupt. */
+
+	register_t	ci_trapsave[16];/* the phys part of frame */
 };
 
+
 extern struct cpu_info cpu_info_store;
 
 /*

Index: src/sys/arch/hppa/hppa/trap.S
diff -u src/sys/arch/hppa/hppa/trap.S:1.47 src/sys/arch/hppa/hppa/trap.S:1.48
--- src/sys/arch/hppa/hppa/trap.S:1.47	Tue Mar 16 16:20:19 2010
+++ src/sys/arch/hppa/hppa/trap.S	Fri Apr  2 19:33:16 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.S,v 1.47 2010/03/16 16:20:19 skrll Exp $	*/
+/*	$NetBSD: trap.S,v 1.48 2010/04/02 19:33:16 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -106,10 +106,6 @@
  */
 
 	.section .data
-	.align	64
-L$trap_tmp_save:
-	.block	TF_PHYS
-	.size	L$trap_tmp_save, .-L$trap_tmp_save
 
 	/* Normal stack alignment */
 	.align	64
@@ -422,13 +418,13 @@
 	mtctl	%r0, %eiem
 
 	/*
-	 * 1a. Copy a `phys' part of the frame into temp store
-	 *	(see a note for trapall)
-	 *	hopefully no page fault would happen on or after the copy,
-	 *	and interrupts are disabled.
+	 * Copy the `phys' part of the frame into CPU local temporary store (see
+	 * a note for trapall).  Hopefully no page fault would happen on or after
+	 * the copy, and interrupts are disabled.
 	 */
-	ldil	L%L$trap_tmp_save, %t2
-	ldo	R%L$trap_tmp_save(%t2), %t2
+	mfctl	CR_CURLWP, %t2
+	ldw	L_CPU(%t2), %t2
+	ldo	CI_TRAPSAVE(%t2), %t2
 
 	ldw  0(%t3), %r1 ! ldw  4(%t3), %t1 ! stw %r1,  0(%t2) ! stw %t1,  4(%t2)
 	ldw  8(%t3), %r1 ! ldw 12(%t3), %t1 ! stw %r1,  8(%t2) ! stw %t1, 12(%t2)
@@ -509,9 +505,12 @@
 #endif
 	ldw	TF_CR0(%sr3, %t3), %t1
 	mtctl	%t1, %rctr
+
 	ldw	TF_CR30(%sr3, %t3), %t1
 	mtctl	%t1, CR_FPPADDR
 
+	mfctl	CR_CURLWP, %t3
+	ldw	L_CPU(%sr3, %t3), %t3
 	/*
 	 * Clear the system mask, this puts us back into physical mode.  Reload
 	 * the trapframe pointer with the correspondent PA value.  %sp will be
@@ -519,9 +518,8 @@
 	 * anyway.
 	 */
 	ssm	0, %r0
-	ldil	L%L$trap_tmp_save, %t3
-	ldo	R%L$trap_tmp_save(%t3), %t3
-	nop ! nop ! nop ! nop ! nop
+	ldo	CI_TRAPSAVE(%t3), %t3
+	nop ! nop ! nop ! nop ! nop ! nop
 	rsm	RESET_PSW, %r0
 
 	/* finally we can restore the space and offset queues and the ipsw */
@@ -1913,14 +1911,15 @@
 	/* do not overwrite %tr4(%cr28) it contains the contents of r24 */
 	mtctl	%t3, %tr2
 
-	ldil	L%L$trap_tmp_save, %t3
-	ldo	R%L$trap_tmp_save(%t3), %t3
-	stw	%t1, TF_R22(%t3)	/* use ,bc */
-	stw	%t2, TF_R21(%t3)
+	mfctl	CR_CURLWP, %t3
+	ldw	L_CPU(%t3), %t3
+
+	stw	%t1, CI_TRAPSAVE + TF_R22(%t3)	/* use ,bc */
+	stw	%t2, CI_TRAPSAVE + TF_R21(%t3)
 
 	mfctl	%tr2, %t1
-	stw	%sp, TF_R30(%t3)	/* sp */
-	stw	%t1, TF_R20(%t3)	/* t3 */
+	stw	%sp, CI_TRAPSAVE + TF_R30(%t3)	/* sp */
+	stw	%t1, CI_TRAPSAVE + TF_R20(%t3)	/* t3 */
 
 	/*
 	 * Now, save away other volatile state that prevents us from turning

CVS commit: src/games/battlestar

2010-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  2 19:34:44 UTC 2010

Modified Files:
src/games/battlestar: command6.c

Log Message:
fix typo.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/games/battlestar/command6.c

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

Modified files:

Index: src/games/battlestar/command6.c
diff -u src/games/battlestar/command6.c:1.6 src/games/battlestar/command6.c:1.7
--- src/games/battlestar/command6.c:1.6	Fri Apr  2 11:35:32 2010
+++ src/games/battlestar/command6.c	Fri Apr  2 15:34:44 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: command6.c,v 1.6 2010/04/02 15:35:32 christos Exp $	*/
+/*	$NetBSD: command6.c,v 1.7 2010/04/02 19:34:44 christos Exp $	*/
 
 /*
  * Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = @(#)com6.c	8.2 (Berkeley) 4/28/95;
 #else
-__RCSID($NetBSD: command6.c,v 1.6 2010/04/02 15:35:32 christos Exp $);
+__RCSID($NetBSD: command6.c,v 1.7 2010/04/02 19:34:44 christos Exp $);
 #endif
 #endif/* not lint */
 
@@ -127,7 +127,7 @@
 	sigprocmask(SIG_BLOCK, isigset, osigset);
 	tv = time(NULL);
 	if (score_fp != NULL) {
-		fprintf(score_fp, %24.24s  %8s  %c%20s, ctime(t), username, 
+		fprintf(score_fp, %24.24s  %8s  %c%20s, ctime(tv), username, 
 		ch, rate());
 		if (wiz)
 			fprintf(score_fp,wizard\n);



CVS commit: src/bin/ksh

2010-04-02 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Fri Apr  2 20:19:40 UTC 2010

Modified Files:
src/bin/ksh: edit.c

Log Message:
-   int putbuf_func ARGS((const char *s, size_t len));
+   int (*putbuf_func) ARGS((const char *, size_t));

for pcc
 - did not recognise pointer to function
 - argument names shadowed other arguments


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/bin/ksh/edit.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/ksh/edit.c
diff -u src/bin/ksh/edit.c:1.23 src/bin/ksh/edit.c:1.24
--- src/bin/ksh/edit.c:1.23	Tue Nov 24 16:00:42 2009
+++ src/bin/ksh/edit.c	Fri Apr  2 20:19:40 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: edit.c,v 1.23 2009/11/24 16:00:42 seanb Exp $	*/
+/*	$NetBSD: edit.c,v 1.24 2010/04/02 20:19:40 plunky Exp $	*/
 
 /*
  * Command line editing - common code
@@ -7,7 +7,7 @@
 #include sys/cdefs.h
 
 #ifndef lint
-__RCSID($NetBSD: edit.c,v 1.23 2009/11/24 16:00:42 seanb Exp $);
+__RCSID($NetBSD: edit.c,v 1.24 2010/04/02 20:19:40 plunky Exp $);
 #endif
 
 
@@ -1065,7 +1065,7 @@
 x_escape(s, len, putbuf_func)
 	const char *s;
 	size_t len;
-	int putbuf_func ARGS((const char *s, size_t len));
+	int (*putbuf_func) ARGS((const char *, size_t));
 {
 	size_t add, wlen;
 	const char *ifs = str_val(local(IFS, 0));



CVS commit: src/sys/dev/pci

2010-04-02 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Fri Apr  2 20:32:16 UTC 2010

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
Add Intel 82855GM Host-AGP Bridge.


To generate a diff of this commit:
cvs rdiff -u -r1.1025 -r1.1026 src/sys/dev/pci/pcidevs

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/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1025 src/sys/dev/pci/pcidevs:1.1026
--- src/sys/dev/pci/pcidevs:1.1025	Sun Mar 14 03:13:04 2010
+++ src/sys/dev/pci/pcidevs	Fri Apr  2 20:32:15 2010
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1025 2010/03/14 03:13:04 mrg Exp $
+$NetBSD: pcidevs,v 1.1026 2010/04/02 20:32:15 jakllsch Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -2722,6 +2722,7 @@
 product INTEL 82830MP_IV	0x3577	82830MP Integrated Video
 product INTEL 82830MP_IO_2	0x3578	82830MP CPU to I/O Bridge 2
 product INTEL 82855GM_MCH	0x3580	82855GM Host-Hub Controller
+product INTEL 82855GM_AGP	0x3581	82855GM Host-AGP Bridge
 product INTEL 82855GM_IGD	0x3582	82855GM GMCH Integrated Graphics Device
 product INTEL 82855GM_MC	0x3584	82855GM GMCH Memory Controller
 product INTEL 82855GM_CP	0x3585	82855GM GMCH Configuration Process



CVS commit: src/sys/dev/pci

2010-04-02 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Fri Apr  2 20:34:10 UTC 2010

Modified Files:
src/sys/dev/pci: pcidevs.h pcidevs_data.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.1022 -r1.1023 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1021 -r1.1022 src/sys/dev/pci/pcidevs_data.h

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

Modified files:

Index: src/sys/dev/pci/pcidevs.h
diff -u src/sys/dev/pci/pcidevs.h:1.1022 src/sys/dev/pci/pcidevs.h:1.1023
--- src/sys/dev/pci/pcidevs.h:1.1022	Sun Mar 14 03:54:59 2010
+++ src/sys/dev/pci/pcidevs.h	Fri Apr  2 20:34:10 2010
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs.h,v 1.1022 2010/03/14 03:54:59 mrg Exp $	*/
+/*	$NetBSD: pcidevs.h,v 1.1023 2010/04/02 20:34:10 jakllsch Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.1025 2010/03/14 03:13:04 mrg Exp
+ *	NetBSD: pcidevs,v 1.1026 2010/04/02 20:32:15 jakllsch Exp
  */
 
 /*
@@ -2729,6 +2729,7 @@
 #define	PCI_PRODUCT_INTEL_82830MP_IV	0x3577		/* 82830MP Integrated Video */
 #define	PCI_PRODUCT_INTEL_82830MP_IO_2	0x3578		/* 82830MP CPU to I/O Bridge 2 */
 #define	PCI_PRODUCT_INTEL_82855GM_MCH	0x3580		/* 82855GM Host-Hub Controller */
+#define	PCI_PRODUCT_INTEL_82855GM_AGP	0x3581		/* 82855GM Host-AGP Bridge */
 #define	PCI_PRODUCT_INTEL_82855GM_IGD	0x3582		/* 82855GM GMCH Integrated Graphics Device */
 #define	PCI_PRODUCT_INTEL_82855GM_MC	0x3584		/* 82855GM GMCH Memory Controller */
 #define	PCI_PRODUCT_INTEL_82855GM_CP	0x3585		/* 82855GM GMCH Configuration Process */

Index: src/sys/dev/pci/pcidevs_data.h
diff -u src/sys/dev/pci/pcidevs_data.h:1.1021 src/sys/dev/pci/pcidevs_data.h:1.1022
--- src/sys/dev/pci/pcidevs_data.h:1.1021	Sun Mar 14 03:54:59 2010
+++ src/sys/dev/pci/pcidevs_data.h	Fri Apr  2 20:34:10 2010
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs_data.h,v 1.1021 2010/03/14 03:54:59 mrg Exp $	*/
+/*	$NetBSD: pcidevs_data.h,v 1.1022 2010/04/02 20:34:10 jakllsch Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.1025 2010/03/14 03:13:04 mrg Exp
+ *	NetBSD: pcidevs,v 1.1026 2010/04/02 20:32:15 jakllsch Exp
  */
 
 /*
@@ -4275,6 +4275,8 @@
 	17225, 2560, 6534, 7787, 6170, 6023, 0,
 	PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82855GM_MCH, 
 	17233, 16582, 6067, 0,
+	PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82855GM_AGP, 
+	17233, 16547, 6170, 0,
 	PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82855GM_IGD, 
 	17233, 17241, 692, 1716, 2443, 0,
 	PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82855GM_MC, 
@@ -8124,7 +8126,7 @@
 	ACCM\0 /* 1 refs @ 6153 */
 	2188\0 /* 1 refs @ 6158 */
 	VL-PCI\0 /* 3 refs @ 6163 */
-	Bridge\0 /* 494 refs @ 6170 */
+	Bridge\0 /* 495 refs @ 6170 */
 	2051\0 /* 2 refs @ 6177 */
 	Single\0 /* 5 refs @ 6182 */
 	Solution\0 /* 2 refs @ 6189 */
@@ -9573,7 +9575,7 @@
 	E7501\0 /* 1 refs @ 16531 */
 	E7505\0 /* 5 refs @ 16537 */
 	RAS\0 /* 1 refs @ 16543 */
-	Host-AGP\0 /* 4 refs @ 16547 */
+	Host-AGP\0 /* 5 refs @ 16547 */
 	Error\0 /* 2 refs @ 16556 */
 	Reporting\0 /* 2 refs @ 16562 */
 	82845G/GL\0 /* 3 refs @ 16572 */
@@ -9664,7 +9666,7 @@
 	Upstream\0 /* 1 refs @ 17205 */
 	Downstream\0 /* 3 refs @ 17214 */
 	82830MP\0 /* 4 refs @ 17225 */
-	82855GM\0 /* 4 refs @ 17233 */
+	82855GM\0 /* 5 refs @ 17233 */
 	GMCH\0 /* 3 refs @ 17241 */
 	Process\0 /* 1 refs @ 17246 */
 	E7525\0 /* 5 refs @ 17254 */



CVS commit: src/distrib/sparc64

2010-04-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Apr  2 21:29:30 UTC 2010

Modified Files:
src/distrib/sparc64/bootfs: Makefile list
src/distrib/sparc64/cdroms/installcd: Makefile
Added Files:
src/distrib/sparc64/bootfs: boot.cfg
src/distrib/sparc64/cdroms/installcd: dot.profile

Log Message:
Move install CDs over to / on cd9660 (instead of a memory disk image)


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/distrib/sparc64/bootfs/Makefile
cvs rdiff -u -r0 -r1.1 src/distrib/sparc64/bootfs/boot.cfg
cvs rdiff -u -r1.3 -r1.4 src/distrib/sparc64/bootfs/list
cvs rdiff -u -r1.1 -r1.2 src/distrib/sparc64/cdroms/installcd/Makefile
cvs rdiff -u -r0 -r1.1 src/distrib/sparc64/cdroms/installcd/dot.profile

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

Modified files:

Index: src/distrib/sparc64/bootfs/Makefile
diff -u src/distrib/sparc64/bootfs/Makefile:1.8 src/distrib/sparc64/bootfs/Makefile:1.9
--- src/distrib/sparc64/bootfs/Makefile:1.8	Fri Mar 12 23:07:13 2010
+++ src/distrib/sparc64/bootfs/Makefile	Fri Apr  2 21:29:30 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.8 2010/03/12 23:07:13 martin Exp $
+#	$NetBSD: Makefile,v 1.9 2010/04/02 21:29:30 martin Exp $
 #
 # boot.fs is the image for cdrom booting.
 #
@@ -15,7 +15,7 @@
 .include bsd.kernobj.mk
 
 IMAGE=		boot.fs
-IMAGESIZE=	9m
+IMAGESIZE=	1m
 IMAGEENDIAN=	be
 
 LISTS=		${.CURDIR}/list
@@ -26,9 +26,8 @@
 PRIMARYBOOT=	${DESTDIR}/usr/mdec/bootblk
 
 PARSELISTENV=	RAMDISKDIR=${RAMDISKDIR:Q}
-IMAGEDEPENDS=	${RAMDISKDIR}/netbsd-INSTALL.gz ${DESTDIR}/usr/mdec/ofwboot \
-		${PRIMARYBOOT}
-IMAGEPOSTBUILD=	${TOOL_INSTALLBOOT} -v -m ${MACHINE} ${IMAGE} ${PRIMARYBOOT} /boot
+IMAGEDEPENDS=	${DESTDIR}/usr/mdec/ofwboot ${PRIMARYBOOT}
+IMAGEPOSTBUILD=	${TOOL_INSTALLBOOT} -v -m ${MACHINE} ${IMAGE} ${PRIMARYBOOT}
 
 IMAGE_RELEASEDIR=	installation/misc
 

Index: src/distrib/sparc64/bootfs/list
diff -u src/distrib/sparc64/bootfs/list:1.3 src/distrib/sparc64/bootfs/list:1.4
--- src/distrib/sparc64/bootfs/list:1.3	Mon Nov 18 12:39:55 2002
+++ src/distrib/sparc64/bootfs/list	Fri Apr  2 21:29:30 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: list,v 1.3 2002/11/18 12:39:55 lukem Exp $
+#	$NetBSD: list,v 1.4 2010/04/02 21:29:30 martin Exp $
 
-COPY	${DESTDIR}/usr/mdec/ofwboot		ofwboot
-COPY	${RAMDISKDIR}/netbsd-INSTALL.gz		netbsd
+COPY	${DESTDIR}/usr/mdec/ofwboot			ofwboot
+COPY	${NETBSDSRCDIR}/distrib/sparc64/bootfs/boot.cfg	boot.cfg

Index: src/distrib/sparc64/cdroms/installcd/Makefile
diff -u src/distrib/sparc64/cdroms/installcd/Makefile:1.1 src/distrib/sparc64/cdroms/installcd/Makefile:1.2
--- src/distrib/sparc64/cdroms/installcd/Makefile:1.1	Tue Mar  6 21:57:24 2007
+++ src/distrib/sparc64/cdroms/installcd/Makefile	Fri Apr  2 21:29:30 2010
@@ -1,13 +1,72 @@
-#	$NetBSD: Makefile,v 1.1 2007/03/06 21:57:24 bouyer Exp $
+#	$NetBSD: Makefile,v 1.2 2010/04/02 21:29:30 martin Exp $
 CDBASE=		sparc64cd		# gives ${CDBASE}.iso
 CDRELEASE=	true			# include $RELEASEDIR/$MACHINE
 
 # for PRINTOBJDIR
 .include bsd.own.mk
 
+SYSINSTDIR!= cd ${.CURDIR}/../../../utils/sysinst/arch/${MACHINE}  ${PRINTOBJDIR}
+
+CDRELEASE_NOISOS=	true
 CDBOOTIMAGEDIR!= cd ${NETBSDSRCDIR}/distrib/sparc64/bootfs  ${PRINTOBJDIR}
 CDBOOTIMAGE=${CDBOOTIMAGEDIR}/boot.fs
 SUN_BOOT_ARGS:=  - - - - ${CDBOOTIMAGE}
+
+CDRUNTIME+=	./bin
+CDRUNTIME+=	./dev/MAKEDEV
+CDRUNTIME+=	./etc
+CDRUNTIME+=	./lib
+CDRUNTIME+=	./libexec
+CDRUNTIME+=	./mnt
+CDRUNTIME+=	./sbin
+# CDRUNTIME+=	./stand
+CDRUNTIME+=	./tmp
+CDRUNTIME+=	./usr/bin/ftp
+CDRUNTIME+=	./usr/bin/gzcat
+CDRUNTIME+=	./usr/bin/gzip
+CDRUNTIME+=	./usr/bin/gunzip
+CDRUNTIME+=	./usr/bin/grep
+CDRUNTIME+=	./usr/bin/less
+CDRUNTIME+=	./usr/bin/more
+CDRUNTIME+=	./usr/bin/netstat
+CDRUNTIME+=	./usr/bin/progress
+CDRUNTIME+=	./usr/bin/sed
+CDRUNTIME+=	./usr/bin/sort
+CDRUNTIME+=	./usr/bin/tip
+CDRUNTIME+=	./usr/bin/vmstat
+CDRUNTIME+=	./usr/lib/libbz2.so*
+CDRUNTIME+=	./usr/lib/libc.so*
+CDRUNTIME+=	./usr/lib/libcurses.so*
+CDRUNTIME+=	./usr/lib/libedit.so*
+CDRUNTIME+=	./usr/lib/libkvm.so*
+CDRUNTIME+=	./usr/lib/libterminfo.so*
+CDRUNTIME+=	./usr/lib/libutil.so*
+CDRUNTIME+=	./usr/lib/libz.so*
+CDRUNTIME+=	./usr/libexec/ld.elf_so
+CDRUNTIME+=	./usr/mdec
+CDRUNTIME+=	./usr/sbin/chat
+CDRUNTIME+=	./usr/sbin/chown
+CDRUNTIME+=	./usr/sbin/chroot
+CDRUNTIME+=	./usr/sbin/installboot
+CDRUNTIME+=	./usr/sbin/pppd
+CDRUNTIME+=	./usr/sbin/wiconfig
+CDRUNTIME+=	./usr/share/misc/terminfo.db
+CDRUNTIME+=	./usr/share/locale
+
+image_md_pre:
+	${MKDIR} cdrom/etc
+	${CP} ${.CURDIR}/dot.profile cdrom/etc/rc
+	${ECHO}   cdrom/etc/rc
+	${ECHO} # exit to single user mode  cdrom/etc/rc
+	${ECHO} exit 1  cdrom/etc/rc
+	${MKDIR} cdrom/mnt2 cdrom/targetroot
+	${CP} ${SYSINSTDIR}/sysinst cdrom
+	${CHMOD} ugo+rx cdrom/sysinst
+	${CP} ${SYSINSTDIR}/sysinstmsgs.?? cdrom
+	${MKDIR} cdrom/var
+	${MKDIR} cdrom/kern
+	${CP} ${RELEASEDIR}/sparc64/binary/kernel/netbsd-GENERIC.gz cdrom/netbsd
+
 

CVS commit: src/dist/ntp/ntpdate

2010-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  2 21:33:14 UTC 2010

Modified Files:
src/dist/ntp/ntpdate: ntptimeset.c

Log Message:
check ctime return


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/dist/ntp/ntpdate/ntptimeset.c

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

Modified files:

Index: src/dist/ntp/ntpdate/ntptimeset.c
diff -u src/dist/ntp/ntpdate/ntptimeset.c:1.5 src/dist/ntp/ntpdate/ntptimeset.c:1.6
--- src/dist/ntp/ntpdate/ntptimeset.c:1.5	Sun Jun 11 15:34:21 2006
+++ src/dist/ntp/ntpdate/ntptimeset.c	Fri Apr  2 17:33:14 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntptimeset.c,v 1.5 2006/06/11 19:34:21 kardel Exp $	*/
+/*	$NetBSD: ntptimeset.c,v 1.6 2010/04/02 21:33:14 christos Exp $	*/
 
 /*
  * ntptimeset - get/set the time via ntp
@@ -1505,6 +1505,7 @@
 	register struct server *server;
 	time_t tmp;
 	double dtemp;
+	const char *p;
 
 	/*
 	 * if setting time then print final analysis
@@ -1566,6 +1567,8 @@
 	LFPTOD(server-offset, dtemp);
 	step_systime(dtemp);
 	time(tmp);
+	if ((p = ctime(tmp)) == NULL)
+		p = ?;
 	fprintf(stdout,Time set to %.20s [%s %s %ld/%ld]\n,
 		ctime(tmp)+4,
 		ntoa(server-srcadr),



CVS commit: src/dist/tcpdump

2010-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  2 21:37:22 UTC 2010

Modified Files:
src/dist/tcpdump: print-radius.c

Log Message:
check ctime.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/dist/tcpdump/print-radius.c

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

Modified files:

Index: src/dist/tcpdump/print-radius.c
diff -u src/dist/tcpdump/print-radius.c:1.7 src/dist/tcpdump/print-radius.c:1.8
--- src/dist/tcpdump/print-radius.c:1.7	Tue Jul 24 07:53:46 2007
+++ src/dist/tcpdump/print-radius.c	Fri Apr  2 17:37:22 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: print-radius.c,v 1.7 2007/07/24 11:53:46 drochner Exp $	*/
+/*	$NetBSD: print-radius.c,v 1.8 2010/04/02 21:37:22 christos Exp $	*/
 
 /*
  * Copyright (C) 2000 Alfredo Andres Omella.  All rights reserved.
@@ -50,7 +50,7 @@
 static const char rcsid[] _U_ =
 Id: print-radius.c,v 1.27.2.1 2005/09/26 01:02:40 guy Exp;
 #else
-__RCSID($NetBSD: print-radius.c,v 1.7 2007/07/24 11:53:46 drochner Exp $);
+__RCSID($NetBSD: print-radius.c,v 1.8 2010/04/02 21:37:22 christos Exp $);
 #endif
 #endif
 
@@ -737,6 +737,7 @@
 {
time_t attr_time;
char string[26];
+   const char *p;
 
if (length != 4)
{
@@ -747,7 +748,9 @@
TCHECK2(data[0],4);
 
attr_time = EXTRACT_32BITS(data);
-   strlcpy(string, ctime(attr_time), sizeof(string));
+   if ((p = ctime(attr_time)) == NULL)
+	p = ?;
+   strlcpy(string, p, sizeof(string));
/* Get rid of the newline */
string[24] = '\0';
printf(%.24s, string);



CVS commit: src/games/larn

2010-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  2 21:40:00 UTC 2010

Modified Files:
src/games/larn: scores.c

Log Message:
ctime can return NULL.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/games/larn/scores.c

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

Modified files:

Index: src/games/larn/scores.c
diff -u src/games/larn/scores.c:1.18 src/games/larn/scores.c:1.19
--- src/games/larn/scores.c:1.18	Wed Aug 12 04:04:05 2009
+++ src/games/larn/scores.c	Fri Apr  2 17:40:00 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: scores.c,v 1.18 2009/08/12 08:04:05 dholland Exp $	*/
+/*	$NetBSD: scores.c,v 1.19 2010/04/02 21:40:00 christos Exp $	*/
 
 /*
  * scores.c			 Larn is copyrighted 1986 by Noah Morgan.
@@ -26,7 +26,7 @@
  */
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: scores.c,v 1.18 2009/08/12 08:04:05 dholland Exp $);
+__RCSID($NetBSD: scores.c,v 1.19 2010/04/02 21:40:00 christos Exp $);
 #endif/* not lint */
 #include sys/types.h
 #include sys/times.h
@@ -772,6 +772,7 @@
 {
 	intn;
 	char  *p;
+	static char  q[] = ?;
 	struct stat stbuf;
 	lcreat((char *) 0);
 	if (lopen(logfile)  0) {
@@ -784,9 +785,12 @@
 	}
 	for (n = stbuf.st_size / sizeof(struct log_fmt); n  0; --n) {
 		lrfill((char *) logg, sizeof(struct log_fmt));
-		p = ctime(logg.diedtime);
-		p[16] = '\n';
-		p[17] = 0;
+		if ((p = ctime(logg.diedtime)) == NULL)
+			p = q;
+		else {
+			p[16] = '\n';
+			p[17] = 0;
+		}
 		lprintf(Score: %ld, Diff: %ld,  %s %s on %ld at %s, (long) (logg.score), (long) (logg.diff), logg.who, logg.what, (long) (logg.cavelev), p + 4);
 #ifdef EXTRA
 		if (logg.moves = 0)



CVS commit: src/distrib/notes/common

2010-04-02 Thread S.P.Zeidler
Module Name:src
Committed By:   spz
Date:   Fri Apr  2 21:52:55 UTC 2010

Modified Files:
src/distrib/notes/common: main

Log Message:
update portmaster and releng lists


To generate a diff of this commit:
cvs rdiff -u -r1.461 -r1.462 src/distrib/notes/common/main

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

Modified files:

Index: src/distrib/notes/common/main
diff -u src/distrib/notes/common/main:1.461 src/distrib/notes/common/main:1.462
--- src/distrib/notes/common/main:1.461	Tue Mar 16 09:42:02 2010
+++ src/distrib/notes/common/main	Fri Apr  2 21:52:55 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: main,v 1.461 2010/03/16 09:42:02 sbd Exp $
+.\	$NetBSD: main,v 1.462 2010/04/02 21:52:55 spz Exp $
 .\
 .\ Copyright (c) 1999-2008 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -1017,50 +1017,40 @@
 .It Ta Simon BurgeTa Mt sim...@netbsd.org Ta Sy pmax
 .It Ta Simon BurgeTa Mt sim...@netbsd.org Ta Sy sbmips
 .It Ta Julian Coleman Ta Mtj...@netbsd.org Ta Sy atari
-.It Ta Marcus ComstedtTa Mt mar...@netbsd.org Ta Sy dreamcast
 .It Ta Andrew Doran   Ta Mt a...@netbsd.org Ta Sy amd64
 .It Ta Andrew Doran   Ta Mt a...@netbsd.org Ta Sy i386
 .It Ta Matthias Drochner  Ta Mt   droch...@netbsd.org Ta Sy cesfic
 .It Ta Gavan Fantom   Ta Mt  ga...@netbsd.org Ta Sy iyonix
 .It Ta Jaime A Fournier   Ta Mt   o...@netbsd.org Ta Sy zaurus
-.It Ta Matt Fredette  Ta Mt   frede...@netbsd.org Ta Sy sun2
-.It Ta Ichiro FUKUHARATa Mt ich...@netbsd.org Ta Sy hpcarm
-.It Ta Chris Gilbert  Ta Mt  ch...@netbsd.org Ta Sy cats
 .It Ta Ben Harris Ta Mt  bj...@netbsd.org Ta Sy acorn26
-.It Ta Ross HarveyTa Mt   r...@netbsd.org Ta Sy alpha
 .It Ta Nick HudsonTa Mt  sk...@netbsd.org Ta Sy hp700
 .It Ta Martin HusemannTa Mt mar...@netbsd.org Ta Sy sparc64
-.It Ta IWAMOTO Toshihiro  Ta Mt tos...@netbsd.org Ta Sy hpcarm
-.It Ta Darrin Jewell  Ta Mtd...@netbsd.org Ta Sy next68k
 .It Ta S\(/oren J\(/orvangTa Mt  so...@netbsd.org Ta Sy sgimips
-.It Ta Wayne Knowles  Ta Mtw...@netbsd.org Ta Sy mipsco
 .It Ta Takayoshi KochiTa Mt  ko...@netbsd.org Ta Sy ia64
-.It Ta Paul KranenburgTa Mt p...@netbsd.org Ta Sy sparc
 .It Ta Michael Lorenz Ta Mt   macal...@netbsd.org Ta Sy macppc
 .It Ta Anders Magnusson   Ta Mt  ra...@netbsd.org Ta Sy vax
-.It Ta Cherry G. Mathew   Ta Mt che...@netbsd.org Ta Sy ia64
-.It Ta NISHIMURA Takeshi  Ta Mtnsmr...@netbsd.org Ta Sy x68k
 .It Ta Tohru NishimuraTa Mt   nisim...@netbsd.org Ta Sy luna68k
 .It Ta Tohru NishimuraTa Mt   nisim...@netbsd.org Ta Sy sandpoint
-.It Ta Andrey Petrov  Ta Mt pet...@netbsd.org Ta Sy sparc64
 .It Ta Scott Reynolds Ta Mt sco...@netbsd.org Ta Sy mac68k
 .It Ta Tim Rightnour  Ta Mtgarb...@netbsd.org Ta Sy ofppc
 .It Ta Tim Rightnour  Ta Mtgarb...@netbsd.org Ta Sy prep
 .It Ta Tim Rightnour  Ta Mtgarb...@netbsd.org Ta Sy rs6000
 .It Ta Noriyuki Soda  Ta Mt   s...@netbsd.org Ta Sy arc
 .It Ta Ignatios Souvatzis Ta Mt i...@netbsd.org Ta Sy amiga
-.It Ta Jonathan Stone Ta Mt   jonat...@netbsd.org Ta Sy pmax
-.It Ta Shin Takemura  Ta Mt   takem...@netbsd.org Ta Sy hpcmips
+.It Ta Ignatios Souvatzis Ta Mt i...@netbsd.org Ta Sy amigappc
+.It Ta NISHIMURA Takeshi  Ta Mtnsmr...@netbsd.org Ta Sy x68k
 .It Ta Matt ThomasTa Mt   m...@netbsd.org Ta Sy alpha
+.It Ta Matt ThomasTa Mt   m...@netbsd.org Ta Sy ibmnws
 .It Ta Matt ThomasTa Mt   m...@netbsd.org Ta Sy netwinder
 .It Ta Jason Thorpe   Ta Mtthor...@netbsd.org Ta Sy algor
 .It Ta Jason Thorpe   Ta Mtthor...@netbsd.org Ta Sy evbarm
 .It Ta Jason Thorpe   Ta Mtthor...@netbsd.org Ta Sy shark
+.It Ta IWAMOTO Toshihiro  Ta Mt tos...@netbsd.org Ta Sy hpcarm
 .It Ta Izumi Tsutsui  Ta Mttsut...@netbsd.org Ta Sy ews4800mips
 .It Ta Izumi Tsutsui  Ta Mttsut...@netbsd.org Ta Sy hp300
 .It Ta Izumi Tsutsui  Ta Mttsut...@netbsd.org Ta Sy news68k
+.It Ta Valeriy E. Ushakov Ta Mtu...@netbsd.org Ta Sy hpcsh
 .It Ta Valeriy E. Ushakov Ta Mtu...@netbsd.org Ta Sy landisk
-.It Ta Nathan WilliamsTa Mtnath...@netbsd.org Ta Sy sun3
 .It Ta Steve Woodford Ta Mts...@netbsd.org Ta Sy evbppc
 .It Ta Steve Woodford Ta Mts...@netbsd.org Ta Sy 

CVS commit: src/distrib/sparc64/cdroms/installcd

2010-04-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Apr  2 21:58:47 UTC 2010

Modified Files:
src/distrib/sparc64/cdroms/installcd: dot.profile

Log Message:
Ooops, remove leftovers from the ramdisk /


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/distrib/sparc64/cdroms/installcd/dot.profile

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

Modified files:

Index: src/distrib/sparc64/cdroms/installcd/dot.profile
diff -u src/distrib/sparc64/cdroms/installcd/dot.profile:1.1 src/distrib/sparc64/cdroms/installcd/dot.profile:1.2
--- src/distrib/sparc64/cdroms/installcd/dot.profile:1.1	Fri Apr  2 21:29:30 2010
+++ src/distrib/sparc64/cdroms/installcd/dot.profile	Fri Apr  2 21:58:46 2010
@@ -1,4 +1,4 @@
-# $NetBSD: dot.profile,v 1.1 2010/04/02 21:29:30 martin Exp $
+# $NetBSD: dot.profile,v 1.2 2010/04/02 21:58:46 martin Exp $
 #
 # Copyright (c) 1997 Perry E. Metzger
 # Copyright (c) 1994 Christopher G. Demetriou
@@ -92,9 +92,6 @@
 	# hack to get around bugs in kernfs's rootdev/rrootdev lookup.
 	ls -l /dev/*  /dev/null 21
 
-	# mount the ramdisk read write
-	mount -t -r cd9660 -u /kern/rootdev /
-
 	# mount a few tempfs to allow modifications over the CD contents
 	mount -t tmpfs tmpfs /tmp
 	mount -t tmpfs tmpfs /var



CVS commit: src/sys/kern

2010-04-02 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Apr  2 23:31:42 UTC 2010

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

Log Message:
Use time_t (not long) to save time_second value.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/kern/kern_ntptime.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_ntptime.c
diff -u src/sys/kern/kern_ntptime.c:1.52 src/sys/kern/kern_ntptime.c:1.53
--- src/sys/kern/kern_ntptime.c:1.52	Sun Jan 11 21:00:11 2009
+++ src/sys/kern/kern_ntptime.c	Fri Apr  2 23:31:42 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_ntptime.c,v 1.52 2009/01/11 21:00:11 christos Exp $	*/
+/*	$NetBSD: kern_ntptime.c,v 1.53 2010/04/02 23:31:42 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
 
 #include sys/cdefs.h
 /* __FBSDID($FreeBSD: src/sys/kern/kern_ntptime.c,v 1.59 2005/05/28 14:34:41 rwatson Exp $); */
-__KERNEL_RCSID(0, $NetBSD: kern_ntptime.c,v 1.52 2009/01/11 21:00:11 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_ntptime.c,v 1.53 2010/04/02 23:31:42 tsutsui Exp $);
 
 #include opt_ntp.h
 
@@ -180,7 +180,7 @@
 static long time_precision = 1;		/* clock precision (ns) */
 static long time_maxerror = MAXPHASE / 1000; /* maximum error (us) */
 static long time_esterror = MAXPHASE / 1000; /* estimated error (us) */
-static long time_reftime;		/* time at last adjustment (s) */
+static time_t time_reftime;		/* time at last adjustment (s) */
 static l_fp time_offset;		/* time offset (ns) */
 static l_fp time_freq;			/* frequency offset (ns/s) */
 #endif /* NTP */



CVS commit: src/dist/pppd/pppd

2010-04-02 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Apr  3 02:08:31 UTC 2010

Modified Files:
src/dist/pppd/pppd: utils.c

Log Message:
Insert missing )


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/dist/pppd/pppd/utils.c

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

Modified files:

Index: src/dist/pppd/pppd/utils.c
diff -u src/dist/pppd/pppd/utils.c:1.4 src/dist/pppd/pppd/utils.c:1.5
--- src/dist/pppd/pppd/utils.c:1.4	Fri Apr  2 15:40:14 2010
+++ src/dist/pppd/pppd/utils.c	Sat Apr  3 02:08:30 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: utils.c,v 1.4 2010/04/02 15:40:14 christos Exp $	*/
+/*	$NetBSD: utils.c,v 1.5 2010/04/03 02:08:30 pgoyette Exp $	*/
 
 /*
  * utils.c - various utility functions used in pppd.
@@ -35,7 +35,7 @@
 #if 0
 #define RCSID	Id: utils.c,v 1.24 2004/11/04 10:02:26 paulus Exp
 #else
-__RCSID($NetBSD: utils.c,v 1.4 2010/04/02 15:40:14 christos Exp $);
+__RCSID($NetBSD: utils.c,v 1.5 2010/04/03 02:08:30 pgoyette Exp $);
 #endif
 #endif
 
@@ -272,7 +272,7 @@
 	case 't':
 	time(t);
 	if ((str = ctime(t)) == NULL)
-		strlcpy(str = num, ?, sizeof(num);
+		strlcpy(str = num, ?, sizeof(num));
 	else {
 		str += 4;		/* chop off the day name */
 		str[15] = 0;	/* chop off year and newline */



CVS commit: src/crypto/dist/ipsec-tools/src/libipsec

2010-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  2 15:13:27 UTC 2010

Modified Files:
src/crypto/dist/ipsec-tools/src/libipsec: pfkey_dump.c

Log Message:
handle ctime returning NULL.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 \
src/crypto/dist/ipsec-tools/src/libipsec/pfkey_dump.c

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



CVS commit: src/crypto/dist/heimdal/appl/ftp/ftpd

2010-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  2 15:17:53 UTC 2010

Modified Files:
src/crypto/dist/heimdal/appl/ftp/ftpd: kauth.c

Log Message:
handle ctime returning NULL.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/crypto/dist/heimdal/appl/ftp/ftpd/kauth.c

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



CVS commit: src/crypto/dist/heimdal/kuser

2010-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  2 15:23:18 UTC 2010

Modified Files:
src/crypto/dist/heimdal/kuser: klist.c

Log Message:
handle ctime returning NULL.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/crypto/dist/heimdal/kuser/klist.c

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



CVS commit: src/crypto/dist/heimdal/kuser

2010-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  2 15:25:04 UTC 2010

Modified Files:
src/crypto/dist/heimdal/kuser: klist.c

Log Message:
make it obvious to grep that ctime is being checked.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/crypto/dist/heimdal/kuser/klist.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/hppa/hppa

2010-04-02 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Apr  2 15:25:51 UTC 2010

Modified Files:
src/sys/arch/hppa/hppa: pmap.c

Log Message:
Pull across pmap_remove fix from OpenBSD.

Fix user-after-free bug in pmap_remove().  Page table pages are freed as soon
as the last page table entry that was actually used is cleared.  So make sure
we check the page table page is still there for every page we remove.
Otherwise we will bring back the tlb entry and cache lines when we touch the
freed page, and we will create an illegal alias (non-equivalent mapping)
as soon as the page gets re-used.


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/sys/arch/hppa/hppa/pmap.c

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



CVS commit: src/crypto/external/bsd/netpgp/dist/src/lib

2010-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  2 15:28:16 UTC 2010

Modified Files:
src/crypto/external/bsd/netpgp/dist/src/lib: misc.c

Log Message:
make it obvious what ctime it is used for.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/crypto/external/bsd/netpgp/dist/src/lib/misc.c

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



CVS commit: src/games/battlestar

2010-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  2 15:35:32 UTC 2010

Modified Files:
src/games/battlestar: command6.c

Log Message:
handle ctime returning NULL.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/games/battlestar/command6.c

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



CVS commit: src/dist/ntp/util

2010-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  2 15:38:05 UTC 2010

Modified Files:
src/dist/ntp/util: ntptime.c

Log Message:
remove bogus cast that hides bugs if tv_sec is non POSIX compliant.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/dist/ntp/util/ntptime.c

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



CVS commit: src/dist/pppd/pppd

2010-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  2 15:40:14 UTC 2010

Modified Files:
src/dist/pppd/pppd: utils.c

Log Message:
handle ctime returning NULL.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/dist/pppd/pppd/utils.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

2010-04-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Apr  2 18:34:16 UTC 2010

Modified Files:
src/sys/arch/sparc64/include: bootinfo.h
src/sys/arch/sparc64/sparc64: autoconf.c

Log Message:
Add a bootinfo node to allow the loader to override the boot device


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/sparc64/include/bootinfo.h
cvs rdiff -u -r1.173 -r1.174 src/sys/arch/sparc64/sparc64/autoconf.c

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



CVS commit: src/sys/arch/sparc/stand/ofwboot

2010-04-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Apr  2 18:41:52 UTC 2010

Modified Files:
src/sys/arch/sparc/stand/ofwboot: version

Log Message:
Bump version


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/sparc/stand/ofwboot/version

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



CVS commit: src/sys/miscfs/syncfs

2010-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  2 19:25:21 UTC 2010

Modified Files:
src/sys/miscfs/syncfs: sync_subr.c

Log Message:
starttime needs to be time_t (Izumi Tsutsui)


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/miscfs/syncfs/sync_subr.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

2010-04-02 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Apr  2 19:33:17 UTC 2010

Modified Files:
src/sys/arch/hp700/hp700: genassym.cf
src/sys/arch/hp700/include: cpu.h
src/sys/arch/hppa/hppa: trap.S

Log Message:
Per-cpu physical trap save area.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/hp700/hp700/genassym.cf
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/hp700/include/cpu.h
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/hppa/hppa/trap.S

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



CVS commit: src/games/battlestar

2010-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  2 19:34:44 UTC 2010

Modified Files:
src/games/battlestar: command6.c

Log Message:
fix typo.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/games/battlestar/command6.c

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



CVS commit: src/bin/ksh

2010-04-02 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Fri Apr  2 20:19:40 UTC 2010

Modified Files:
src/bin/ksh: edit.c

Log Message:
-   int putbuf_func ARGS((const char *s, size_t len));
+   int (*putbuf_func) ARGS((const char *, size_t));

for pcc
 - did not recognise pointer to function
 - argument names shadowed other arguments


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/bin/ksh/edit.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

2010-04-02 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Fri Apr  2 20:32:16 UTC 2010

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
Add Intel 82855GM Host-AGP Bridge.


To generate a diff of this commit:
cvs rdiff -u -r1.1025 -r1.1026 src/sys/dev/pci/pcidevs

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



CVS commit: src/dist/ntp/ntpdate

2010-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  2 21:33:14 UTC 2010

Modified Files:
src/dist/ntp/ntpdate: ntptimeset.c

Log Message:
check ctime return


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/dist/ntp/ntpdate/ntptimeset.c

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



CVS commit: src/distrib/notes/common

2010-04-02 Thread S.P.Zeidler
Module Name:src
Committed By:   spz
Date:   Fri Apr  2 21:52:55 UTC 2010

Modified Files:
src/distrib/notes/common: main

Log Message:
update portmaster and releng lists


To generate a diff of this commit:
cvs rdiff -u -r1.461 -r1.462 src/distrib/notes/common/main

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



CVS commit: src/distrib/sparc64/cdroms/installcd

2010-04-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Apr  2 21:58:47 UTC 2010

Modified Files:
src/distrib/sparc64/cdroms/installcd: dot.profile

Log Message:
Ooops, remove leftovers from the ramdisk /


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/distrib/sparc64/cdroms/installcd/dot.profile

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



CVS commit: src/sys/kern

2010-04-02 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Apr  2 23:31:42 UTC 2010

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

Log Message:
Use time_t (not long) to save time_second value.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/kern/kern_ntptime.c

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



CVS commit: src/dist/pppd/pppd

2010-04-02 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Apr  3 02:08:31 UTC 2010

Modified Files:
src/dist/pppd/pppd: utils.c

Log Message:
Insert missing )


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/dist/pppd/pppd/utils.c

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