CVS commit: [nick-hppapmap] src/sys/arch/hppa/hppa

2009-04-25 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Apr 25 07:56:03 UTC 2009

Modified Files:
src/sys/arch/hppa/hppa [nick-hppapmap]: trap.S

Log Message:
Turn off TLB_STATS_{PRE,AFT}


To generate a diff of this commit:
cvs rdiff -u -r1.26.2.10 -r1.26.2.11 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/hppa/hppa/trap.S
diff -u src/sys/arch/hppa/hppa/trap.S:1.26.2.10 src/sys/arch/hppa/hppa/trap.S:1.26.2.11
--- src/sys/arch/hppa/hppa/trap.S:1.26.2.10	Sat Apr 25 07:45:37 2009
+++ src/sys/arch/hppa/hppa/trap.S	Sat Apr 25 07:56:03 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.S,v 1.26.2.10 2009/04/25 07:45:37 skrll Exp $	*/
+/*	$NetBSD: trap.S,v 1.26.2.11 2009/04/25 07:56:03 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -1244,7 +1244,7 @@
 	dep	sp, 31, 16, t		/* put in the space id */	! \
 	depi	1, 0, 1, t		/* and set the valid bit */
 
-#if 1
+#if 0
 	.section .bss
 	.export	dtlb_c, data
 	.export	tlbd_c, data



CVS commit: src/sys/ufs/ffs

2009-04-25 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Sat Apr 25 08:32:32 UTC 2009

Modified Files:
src/sys/ufs/ffs: ffs_alloc.c

Log Message:
Fix random 'filesystem full' messages by trapping a couple of 32-bit
overflow areas missed in rev 1.110 and switching cgbase().

Kudos to rump_ffs!


To generate a diff of this commit:
cvs rdiff -u -r1.122 -r1.123 src/sys/ufs/ffs/ffs_alloc.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/ufs/ffs/ffs_alloc.c
diff -u src/sys/ufs/ffs/ffs_alloc.c:1.122 src/sys/ufs/ffs/ffs_alloc.c:1.123
--- src/sys/ufs/ffs/ffs_alloc.c:1.122	Sun Feb 22 20:28:06 2009
+++ src/sys/ufs/ffs/ffs_alloc.c	Sat Apr 25 08:32:32 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs_alloc.c,v 1.122 2009/02/22 20:28:06 ad Exp $	*/
+/*	$NetBSD: ffs_alloc.c,v 1.123 2009/04/25 08:32:32 sborrill Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ffs_alloc.c,v 1.122 2009/02/22 20:28:06 ad Exp $);
+__KERNEL_RCSID(0, $NetBSD: ffs_alloc.c,v 1.123 2009/04/25 08:32:32 sborrill Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_ffs.h
@@ -1138,7 +1138,7 @@
 	ufs_add32(cgp-cg_frsum[allocsiz], -1, needswap);
 	if (frags != allocsiz)
 		ufs_add32(cgp-cg_frsum[allocsiz - frags], 1, needswap);
-	blkno = cg * fs-fs_fpg + bno;
+	blkno = cgbase(fs, cg) + bno;
 	ACTIVECG_CLR(fs, cg);
 	mutex_exit(ump-um_lock);
 	bdwrite(bp);
@@ -1167,6 +1167,7 @@
 	struct ufsmount *ump;
 	struct fs *fs = ip-i_fs;
 	struct cg *cgp;
+	int cg;
 	daddr_t blkno;
 	int32_t bno;
 	u_int8_t *blksfree;
@@ -1225,7 +1226,8 @@
 		ufs_add32(old_cg_blktot(cgp, needswap)[cylno], -1, needswap);
 	}
 	fs-fs_fmod = 1;
-	blkno = ufs_rw32(cgp-cg_cgx, needswap) * fs-fs_fpg + bno;
+	cg = ufs_rw32(cgp-cg_cgx, needswap);
+	blkno = cgbase(fs, cg) + bno;
 	return (blkno);
 }
 



CVS commit: src/distrib/notes/common

2009-04-25 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Apr 25 09:10:55 UTC 2009

Modified Files:
src/distrib/notes/common: legal.common

Log Message:
Sync with (a close approximation of) reality.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/distrib/notes/common/legal.common

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/legal.common
diff -u src/distrib/notes/common/legal.common:1.51 src/distrib/notes/common/legal.common:1.52
--- src/distrib/notes/common/legal.common:1.51	Fri Sep  5 13:52:41 2008
+++ src/distrib/notes/common/legal.common	Sat Apr 25 09:10:55 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: legal.common,v 1.51 2008/09/05 13:52:41 tsutsui Exp $
+.\	$NetBSD: legal.common,v 1.52 2009/04/25 09:10:55 snj Exp $
 .\
 .\ Copyright (c) 1999-2004 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -55,15 +55,20 @@
 NetBSD Project.  See http://www.netbsd.org/ for
 information about NetBSD.
 .It
-This product contains software developed by Ignatios Souvatzis
-for the NetBSD project.
+This product contains software developed by Ignatios Souvatzis for
+the NetBSD project.
 .It
 This product contains software written by Ignatios Souvatzis and
 Michael L. Hitch for the NetBSD project.
 .It
+This product includes software developed by Intel Corporation and
+its contributors.
+.It
 This product contains software written by Michael L. Hitch for
 the NetBSD project.
 .It
+This product includes software developed by Microsoft.
+.It
 This product includes cryptographic software written by
 Eric Young (e...@cryptsoft.com)
 .It
@@ -111,6 +116,9 @@
 .It
 This product includes software developed by Adam Glass.
 .It
+This product includes software developed by Adrian Portelli
+for the NetBSD project.
+.It
 This product includes software developed by Advanced Risc Machines
 Ltd.
 .It
@@ -124,7 +132,7 @@
 This product includes software developed by Alistair G. Crooks.
 for the NetBSD project.
 .It
-This product includes software developed by Allen Briggs
+This product includes software developed by Allen Briggs.
 .It
 This product includes software developed by Amancio Hasty and
 Roger Hardiman
@@ -148,6 +156,8 @@
 .It
 This product includes software developed by Brini.
 .It
+This product includes software developed by Bruce M. Simpson.
+.It
 This product includes software developed by Causality Limited.
 .It
 This product includes software developed by Charles D. Cranor
@@ -181,7 +191,7 @@
 .It
 This product includes software developed by Christian E. Hopps.
 .It
-This product includes software developed by Christian Limpach
+This product includes software developed by Christian Limpach.
 .It
 This product includes software developed by Christopher G. Demetriou
 for the NetBSD Project.
@@ -197,8 +207,7 @@
 .It
 This product includes software developed by Colin Wood.
 .It
-This product includes software developed by Cybernet Corporation
-and Nan Yang Computer Services Limited
+This product includes software developed by Daan Vreeken.
 .It
 This product includes software developed by Daishi Kato
 .It
@@ -228,6 +237,10 @@
 .It
 This product includes software developed by Eric Young (e...@mincom.oz.au)
 .It
+This product includes software developed by K. Kobayashi.
+.It
+This product includes software developed by K. Kobayashi and H. Shimokawa.
+.It
 This product includes software developed by Ezra Story and  by Kari
 Mettinen.
 .It
@@ -242,11 +255,15 @@
 .It
 This product includes software developed by Ezra Story.
 .It
+This product includes software developed by Florian Stoehr.
+.It
 This product includes software developed by Frank van der Linden for
 the NetBSD Project.
 .It
 This product includes software developed by Gardner Buchanan.
 .It
+This product includes software developed by Garrett D'Amore.
+.It
 This product includes software developed by Gary Thomas.
 .It
 This product includes software developed by Gordon Ross
@@ -255,15 +272,19 @@
 .It
 This product includes software developed by HAYAKAWA Koichi.
 .It
-This product includes software developed by Harvard University
-and its contributors.
+This product includes software developed by Harvard University and
+its contributors.
 .It
 This product includes software developed by Harvard University.
 .It
+This product includes software developed by Henrik Vestergaard Draboel.
+.It
 This product includes software developed by Herb Peyerl.
 .It
-This product includes software developed by Hubert Feyrer
-for the NetBSD Project.
+This product includes software developed by Hidetoshi Shimokawa.
+.It
+This product includes software developed by Hubert Feyrer for
+the NetBSD Project.
 .It
 This product includes software developed by Ian F. Darwin and others.
 .It
@@ -286,6 +307,9 @@
 This product includes software developed by Jason R. Thorpe
 for And Communications, http://www.and.com/
 .It
+This product includes software 

CVS commit: [nick-hppapmap] src/sys/arch/hppa/hppa

2009-04-25 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Apr 25 13:54:07 UTC 2009

Modified Files:
src/sys/arch/hppa/hppa [nick-hppapmap]: pmap.c

Log Message:
Put KASSERTs after DPRINTFs.


To generate a diff of this commit:
cvs rdiff -u -r1.43.8.46 -r1.43.8.47 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.43.8.46 src/sys/arch/hppa/hppa/pmap.c:1.43.8.47
--- src/sys/arch/hppa/hppa/pmap.c:1.43.8.46	Tue Apr 21 13:48:21 2009
+++ src/sys/arch/hppa/hppa/pmap.c	Sat Apr 25 13:54:07 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.43.8.46 2009/04/21 13:48:21 skrll Exp $	*/
+/*	$NetBSD: pmap.c,v 1.43.8.47 2009/04/25 13:54:07 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -64,7 +64,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.43.8.46 2009/04/21 13:48:21 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.43.8.47 2009/04/25 13:54:07 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -511,14 +511,14 @@
 	struct pv_entry *tpve;
 	u_int attrs;
 
-	/* we should only be looking if we're not PVF_NC */
-	KASSERT((pg-mdpage.pvh_attrs  PVF_NC) == 0);
-	KASSERT(mutex_owned(pg-mdpage.pvh_lock));
-
 	DPRINTF(PDB_FOLLOW|PDB_ALIAS,
 	(%s(%p, %p, 0x%x, %p)\n, __func__, pg, pve, (int)va,
 	ptep));
 
+	/* we should only be looking if we're not PVF_NC */
+	KASSERT((pg-mdpage.pvh_attrs  PVF_NC) == 0);
+	KASSERT(mutex_owned(pg-mdpage.pvh_lock));
+
 	if (ptep) {
 		attrs = pmap_pvh_attrs(*ptep);
 
@@ -632,11 +632,11 @@
 pmap_pv_enter(struct vm_page *pg, struct pv_entry *pve, pmap_t pm,
 vaddr_t va, struct vm_page *pdep, pt_entry_t *ptep)
 {
-	KASSERT(mutex_owned(pg-mdpage.pvh_lock));
-
 	DPRINTF(PDB_FOLLOW|PDB_PV, (%s(%p, %p, %p, 0x%x, %p)\n, __func__,
 	pg, pve, pm, (int)va, pdep));
 
+	KASSERT(mutex_owned(pg-mdpage.pvh_lock));
+
 	pve-pv_pmap = pm;
 	pve-pv_va = va;
 	pve-pv_ptp = pdep;



CVS commit: src/sys

2009-04-25 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Sat Apr 25 15:06:33 UTC 2009

Modified Files:
src/sys/kern: kern_exit.c kern_proc.c kern_prot.c subr_prf.c tty.c
src/sys/miscfs/specfs: spec_vnops.c
src/sys/sys: proc.h

Log Message:
- Rearrange pg_delete() and pg_remove() (renamed pg_free), thus
  proc_enterpgrp() with proc_leavepgrp() to free process group and/or
  session without proc_lock held.
- Rename SESSHOLD() and SESSRELE() to  to proc_sesshold() and
  proc_sessrele().  The later releases proc_lock now.

Quick OK by ad.


To generate a diff of this commit:
cvs rdiff -u -r1.219 -r1.220 src/sys/kern/kern_exit.c
cvs rdiff -u -r1.150 -r1.151 src/sys/kern/kern_proc.c
cvs rdiff -u -r1.108 -r1.109 src/sys/kern/kern_prot.c
cvs rdiff -u -r1.132 -r1.133 src/sys/kern/subr_prf.c
cvs rdiff -u -r1.230 -r1.231 src/sys/kern/tty.c
cvs rdiff -u -r1.123 -r1.124 src/sys/miscfs/specfs/spec_vnops.c
cvs rdiff -u -r1.287 -r1.288 src/sys/sys/proc.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/kern_exit.c
diff -u src/sys/kern/kern_exit.c:1.219 src/sys/kern/kern_exit.c:1.220
--- src/sys/kern/kern_exit.c:1.219	Sat Mar 28 21:38:55 2009
+++ src/sys/kern/kern_exit.c	Sat Apr 25 15:06:31 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_exit.c,v 1.219 2009/03/28 21:38:55 rmind Exp $	*/
+/*	$NetBSD: kern_exit.c,v 1.220 2009/04/25 15:06:31 rmind Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_exit.c,v 1.219 2009/03/28 21:38:55 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_exit.c,v 1.220 2009/04/25 15:06:31 rmind Exp $);
 
 #include opt_ktrace.h
 #include opt_perfctrs.h
@@ -378,8 +378,8 @@
 
 		if (vprevoke != NULL || vprele != NULL) {
 			if (vprevoke != NULL) {
-SESSRELE(sp);
-mutex_exit(proc_lock);
+/* Releases proc_lock. */
+proc_sessrele(sp);
 VOP_REVOKE(vprevoke, REVOKEALL);
 			} else
 mutex_exit(proc_lock);
@@ -890,12 +890,6 @@
 		return;
 	}
 
-	/*
-	 * Finally finished with old proc entry.  Unlink it from its process
-	 * group.
-	 */
-	leavepgrp(p);
-
 	sched_proc_exit(parent, p);
 
 	/*
@@ -933,7 +927,12 @@
 	 * Let pid be reallocated.
 	 */
 	proc_free_pid(p);
-	mutex_exit(proc_lock);
+
+	/*
+	 * Unlink process from its process group.
+	 * Releases the proc_lock.
+	 */
+	proc_leavepgrp(p);
 
 	/*
 	 * Delay release until after lwp_free.

Index: src/sys/kern/kern_proc.c
diff -u src/sys/kern/kern_proc.c:1.150 src/sys/kern/kern_proc.c:1.151
--- src/sys/kern/kern_proc.c:1.150	Thu Apr 16 14:56:41 2009
+++ src/sys/kern/kern_proc.c	Sat Apr 25 15:06:31 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_proc.c,v 1.150 2009/04/16 14:56:41 rmind Exp $	*/
+/*	$NetBSD: kern_proc.c,v 1.151 2009/04/25 15:06:31 rmind Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_proc.c,v 1.150 2009/04/16 14:56:41 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_proc.c,v 1.151 2009/04/25 15:06:31 rmind Exp $);
 
 #include opt_kstack.h
 #include opt_maxuprc.h
@@ -226,8 +226,9 @@
 	{ NULL		},
 };
 
-static void orphanpg(struct pgrp *);
-static void pg_delete(pid_t);
+static struct pgrp *	pg_remove(pid_t);
+static void		pg_delete(pid_t);
+static void		orphanpg(struct pgrp *);
 
 static specificdata_domain_t proc_specificdata_domain;
 
@@ -376,6 +377,41 @@
 }
 
 /*
+ * Session reference counting.
+ */
+
+void
+proc_sesshold(struct session *ss)
+{
+
+	KASSERT(mutex_owned(proc_lock));
+	ss-s_count++;
+}
+
+void
+proc_sessrele(struct session *ss)
+{
+
+	KASSERT(mutex_owned(proc_lock));
+	/*
+	 * We keep the pgrp with the same id as the session in order to
+	 * stop a process being given the same pid.  Since the pgrp holds
+	 * a reference to the session, it must be a 'zombie' pgrp by now.
+	 */
+	if (--ss-s_count == 0) {
+		struct pgrp *pg;
+
+		pg = pg_remove(ss-s_sid);
+		mutex_exit(proc_lock);
+
+		kmem_free(pg, sizeof(struct pgrp));
+		kmem_free(ss, sizeof(struct session));
+	} else {
+		mutex_exit(proc_lock);
+	}
+}
+
+/*
  * Check that the specified process group is in the session of the
  * specified process.
  * Treats -ve ids as process ids.
@@ -649,7 +685,7 @@
 }
 
 /*
- * Move p to a new or existing process group (and session)
+ * proc_enterpgrp: move p to a new or existing process group (and session).
  *
  * If we are creating a new pgrp, the pgid should equal
  * the calling process' pid.
@@ -660,7 +696,7 @@
  * Only called from sys_setsid and sys_setpgid.
  */
 int
-enterpgrp(struct proc *curp, pid_t pid, pid_t pgid, int mksess)
+proc_enterpgrp(struct proc *curp, pid_t pid, pid_t pgid, bool mksess)
 {
 	struct pgrp *new_pgrp, *pgrp;
 	struct session *sess;
@@ -668,10 +704,7 @@
 	int rval;
 	pid_t pg_id = NO_PGID;
 
-	if (mksess)
-		sess = kmem_alloc(sizeof(*sess), 

CVS commit: [nick-hppapmap] src/sys/arch/hp700/dev

2009-04-25 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Apr 25 15:09:14 UTC 2009

Modified Files:
src/sys/arch/hp700/dev [nick-hppapmap]: dino.c elroy.c

Log Message:
memset 0 pcibus_attach_args


To generate a diff of this commit:
cvs rdiff -u -r1.6.2.2 -r1.6.2.3 src/sys/arch/hp700/dev/dino.c
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/arch/hp700/dev/elroy.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/dev/dino.c
diff -u src/sys/arch/hp700/dev/dino.c:1.6.2.2 src/sys/arch/hp700/dev/dino.c:1.6.2.3
--- src/sys/arch/hp700/dev/dino.c:1.6.2.2	Sun Dec 28 16:07:54 2008
+++ src/sys/arch/hp700/dev/dino.c	Sat Apr 25 15:09:14 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: dino.c,v 1.6.2.2 2008/12/28 16:07:54 skrll Exp $ */
+/*	$NetBSD: dino.c,v 1.6.2.3 2009/04/25 15:09:14 skrll Exp $ */
 
 /*	$OpenBSD: dino.c,v 1.5 2004/02/13 20:39:31 mickey Exp $	*/
 
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: dino.c,v 1.6.2.2 2008/12/28 16:07:54 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: dino.c,v 1.6.2.3 2009/04/25 15:09:14 skrll Exp $);
 
 /* #include cardbus.h */
 
@@ -1690,12 +1690,12 @@
 	nca.ca_nmodules = MAXMODBUS;
 	pdc_scanbus(self, nca, dino_callback);
 
+	memset(pba, 0, sizeof(pba));
 	pba.pba_iot = sc-sc_iot;
 	pba.pba_memt = sc-sc_memt;
 	pba.pba_dmat = sc-sc_dmatag;
 	pba.pba_pc = sc-sc_pc;
 	pba.pba_bus = 0;
-	pba.pba_bridgetag = NULL;
 	pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED;
 	config_found_ia(self, pcibus, pba, pcibusprint);
 }

Index: src/sys/arch/hp700/dev/elroy.c
diff -u src/sys/arch/hp700/dev/elroy.c:1.1.2.2 src/sys/arch/hp700/dev/elroy.c:1.1.2.3
--- src/sys/arch/hp700/dev/elroy.c:1.1.2.2	Mon Jan 19 13:16:13 2009
+++ src/sys/arch/hp700/dev/elroy.c	Sat Apr 25 15:09:14 2009
@@ -1,6 +1,6 @@
-/*	$NetBSD: elroy.c,v 1.1.2.2 2009/01/19 13:16:13 skrll Exp $	*/
+/*	$NetBSD: elroy.c,v 1.1.2.3 2009/04/25 15:09:14 skrll Exp $	*/
 
-/*	$OpenBSD: elroy.c,v 1.4 2007/08/28 21:19:44 kettenis Exp $	*/
+/*	$OpenBSD: elroy.c,v 1.5 2009/03/30 21:24:57 kettenis Exp $	*/
 
 /*
  * Copyright (c) 2005 Michael Shalayeff
@@ -1275,12 +1275,12 @@
 	sc-sc_dmatag = elroy_dmat;
 	sc-sc_dmatag._cookie = sc;
 
+	memset(pba, 0, sizeof(pba));
 // 	pba.pba_busname = pci;
 	pba.pba_iot = sc-sc_iot;
 	pba.pba_memt = sc-sc_memt;
 	pba.pba_dmat = sc-sc_dmatag;
 	pba.pba_pc = sc-sc_pc;
-	pba.pba_bridgetag = NULL;
 // 	pba.pba_domain = pci_ndomains++;
 	pba.pba_bus = 0; /* (le32toh(elroy_read32(r-busnum))  0xff)  4; */
  	pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED;



CVS commit: [nick-hppapmap] src/sys/arch/hppa/hppa

2009-04-25 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Apr 25 15:26:28 UTC 2009

Modified Files:
src/sys/arch/hppa/hppa [nick-hppapmap]: pmap.c

Log Message:
Add a KASSERT to pmap_activate


To generate a diff of this commit:
cvs rdiff -u -r1.43.8.48 -r1.43.8.49 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.43.8.48 src/sys/arch/hppa/hppa/pmap.c:1.43.8.49
--- src/sys/arch/hppa/hppa/pmap.c:1.43.8.48	Sat Apr 25 14:45:06 2009
+++ src/sys/arch/hppa/hppa/pmap.c	Sat Apr 25 15:26:28 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.43.8.48 2009/04/25 14:45:06 skrll Exp $	*/
+/*	$NetBSD: pmap.c,v 1.43.8.49 2009/04/25 15:26:28 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -64,7 +64,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.43.8.48 2009/04/25 14:45:06 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.43.8.49 2009/04/25 15:26:28 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -1660,10 +1660,10 @@
 	pa_space_t space = pmap-pm_space;
 	struct pcb *pcb = l-l_addr-u_pcb;
 
+	KASSERT(pcb-pcb_uva == (vaddr_t)l-l_addr);
+	
 	/* space is cached for the copy{in,out}'s pleasure */
 	pcb-pcb_space = space;
-	/* XXXNH */
-// 	pcb-pcb_uva = (vaddr_t)p-p_addr;
 	fdcache(HPPA_SID_KERNEL, (vaddr_t)pcb, PAGE_SIZE);
 
 	if (p == curproc)



CVS commit: src/sys/dev/pci

2009-04-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Apr 25 15:29:18 UTC 2009

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

Log Message:
Tweak some Realtek re(4) device names.


To generate a diff of this commit:
cvs rdiff -u -r1.982 -r1.983 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.982 src/sys/dev/pci/pcidevs:1.983
--- src/sys/dev/pci/pcidevs:1.982	Tue Apr  7 18:40:39 2009
+++ src/sys/dev/pci/pcidevs	Sat Apr 25 15:29:18 2009
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.982 2009/04/07 18:40:39 msaitoh Exp $
+$NetBSD: pcidevs,v 1.983 2009/04/25 15:29:18 tsutsui Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -3483,12 +3483,12 @@
 product REALTEK RT8139D		0x8039	8139D 10/100 Ethernet
 product REALTEK RT8100		0x8100	8100 10/100 Ethernet
 product REALTEK RT8129		0x8129	8129 10/100 Ethernet
-product REALTEK RT8101E		0x8136	8101E 10/100 Ethernet
+product REALTEK RT8101E		0x8136	8100E/8101E/8102E 10/100 Ethernet
 product REALTEK RT8138		0x8138	8138 10/100 Ethernet
 product REALTEK RT8139		0x8139	8139 10/100 Ethernet
 product REALTEK RT8169SC	0x8167	8169SC/8110SC 10/100/1000 Ethernet
-product REALTEK RT8168		0x8168	8168B/8111B 10/100/1000 Ethernet
-product REALTEK RT8169		0x8169	8169/S/SB 10/100/1000 Ethernet
+product REALTEK RT8168		0x8168	8168/8111 10/100/1000 Ethernet
+product REALTEK RT8169		0x8169	8169/8110 10/100/1000 Ethernet
 product REALTEK RT8180		0x8180	8180 802.11b
 product REALTEK RT8185		0x8185	8185 802.11a/b/g
 



CVS commit: src/sys/dev/pci

2009-04-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Apr 25 17:04:40 UTC 2009

Modified Files:
src/sys/dev/pci: if_ale.c if_alereg.h

Log Message:
Add RCS Id.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/if_ale.c src/sys/dev/pci/if_alereg.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/if_ale.c
diff -u src/sys/dev/pci/if_ale.c:1.1 src/sys/dev/pci/if_ale.c:1.2
--- src/sys/dev/pci/if_ale.c:1.1	Mon Apr 20 20:10:23 2009
+++ src/sys/dev/pci/if_ale.c	Sat Apr 25 17:04:40 2009
@@ -1,3 +1,5 @@
+/*	$NetBSD: if_ale.c,v 1.2 2009/04/25 17:04:40 tsutsui Exp $	*/
+
 /*-
  * Copyright (c) 2008, Pyun YongHyeon yong...@freebsd.org
  * All rights reserved.
@@ -29,6 +31,9 @@
 
 /* Driver for Atheros AR8121/AR8113/AR8114 PCIe Ethernet. */
 
+#include sys/cdefs.h
+__KERNEL_RCSID(0, $NetBSD: if_ale.c,v 1.2 2009/04/25 17:04:40 tsutsui Exp $);
+
 #include bpfilter.h
 #include vlan.h
 
Index: src/sys/dev/pci/if_alereg.h
diff -u src/sys/dev/pci/if_alereg.h:1.1 src/sys/dev/pci/if_alereg.h:1.2
--- src/sys/dev/pci/if_alereg.h:1.1	Mon Apr 20 20:10:23 2009
+++ src/sys/dev/pci/if_alereg.h	Sat Apr 25 17:04:40 2009
@@ -1,4 +1,6 @@
+/*	$NetBSD: if_alereg.h,v 1.2 2009/04/25 17:04:40 tsutsui Exp $	*/
 /*	$OpenBSD: if_alereg.h,v 1.1 2009/02/25 03:05:32 kevlo Exp $	*/
+
 /*-
  * Copyright (c) 2008, Pyun YongHyeon yong...@freebsd.org
  * All rights reserved.



CVS commit: src/sys/dev/ic

2009-04-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Apr 25 18:27:39 UTC 2009

Modified Files:
src/sys/dev/ic: rtl81x9.c

Log Message:
Use roundup2() macro.


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/sys/dev/ic/rtl81x9.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/ic/rtl81x9.c
diff -u src/sys/dev/ic/rtl81x9.c:1.82 src/sys/dev/ic/rtl81x9.c:1.83
--- src/sys/dev/ic/rtl81x9.c:1.82	Fri Apr 25 11:27:19 2008
+++ src/sys/dev/ic/rtl81x9.c	Sat Apr 25 18:27:39 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtl81x9.c,v 1.82 2008/04/25 11:27:19 tsutsui Exp $	*/
+/*	$NetBSD: rtl81x9.c,v 1.83 2009/04/25 18:27:39 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1997, 1998
@@ -86,7 +86,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rtl81x9.c,v 1.82 2008/04/25 11:27:19 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: rtl81x9.c,v 1.83 2009/04/25 18:27:39 tsutsui Exp $);
 
 #include bpfilter.h
 #include rnd.h
@@ -1029,7 +1029,7 @@
 		else
 			new_rx = cur_rx + total_len;
 		/* Round up to 32-bit boundary. */
-		new_rx = ((new_rx + 3)  ~3) % RTK_RXBUFLEN;
+		new_rx = roundup2(new_rx, sizeof(uint32_t)) % RTK_RXBUFLEN;
 
 		/*
 		 * The RealTek chip includes the CRC with every



CVS commit: src/distrib/landisk/ramdisk

2009-04-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Apr 25 18:39:48 UTC 2009

Modified Files:
src/distrib/landisk/ramdisk: Makefile list
Removed Files:
src/distrib/landisk/ramdisk: termcap.mini

Log Message:
Use src/distrib/common/termcap.mini.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/distrib/landisk/ramdisk/Makefile
cvs rdiff -u -r1.7 -r1.8 src/distrib/landisk/ramdisk/list
cvs rdiff -u -r1.1 -r0 src/distrib/landisk/ramdisk/termcap.mini

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

Modified files:

Index: src/distrib/landisk/ramdisk/Makefile
diff -u src/distrib/landisk/ramdisk/Makefile:1.3 src/distrib/landisk/ramdisk/Makefile:1.4
--- src/distrib/landisk/ramdisk/Makefile:1.3	Tue Apr  7 11:49:17 2009
+++ src/distrib/landisk/ramdisk/Makefile	Sat Apr 25 18:39:47 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2009/04/07 11:49:17 joerg Exp $
+#	$NetBSD: Makefile,v 1.4 2009/04/25 18:39:47 tsutsui Exp $
 
 .include bsd.own.mk
 .include ${NETBSDSRCDIR}/distrib/common/Makefile.distrib
@@ -21,7 +21,8 @@
 		${NETBSDSRCDIR}/etc/group ${NETBSDSRCDIR}/etc/master.passwd \
 		${NETBSDSRCDIR}/etc/netconfig \
 		${NETBSDSRCDIR}/distrib/common/protocols \
-		${NETBSDSRCDIR}/distrib/common/services
+		${NETBSDSRCDIR}/distrib/common/services \
+		${NETBSDSRCDIR}/distrib/common/termcap.mini
 
 IMAGETAR_RELEASEDIR=	installation/netboot
 

Index: src/distrib/landisk/ramdisk/list
diff -u src/distrib/landisk/ramdisk/list:1.7 src/distrib/landisk/ramdisk/list:1.8
--- src/distrib/landisk/ramdisk/list:1.7	Sat Apr 25 18:38:32 2009
+++ src/distrib/landisk/ramdisk/list	Sat Apr 25 18:39:47 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: list,v 1.7 2009/04/25 18:38:32 tsutsui Exp $
+#	$NetBSD: list,v 1.8 2009/04/25 18:39:47 tsutsui Exp $
 
 SRCDIRS	bin sbin usr.bin usr.sbin
 
@@ -65,7 +65,7 @@
 COPY	${NETBSDSRCDIR}/distrib/common/services		etc/services
 
 # and the common installation tools
-COPY	${CURDIR}/termcap.mini			usr/share/misc/termcap
+COPY	${NETBSDSRCDIR}/distrib/common/termcap.mini	usr/share/misc/termcap
 
 # the disktab explanation file
 COPY	${CURDIR}/disktab.preinstall		etc/disktab.preinstall



CVS commit: src

2009-04-25 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Sat Apr 25 19:38:25 UTC 2009

Modified Files:
src/common/lib/libc/sys: cpuset.c
src/sys/sys: sched.h

Log Message:
- Add kcpuset_iszero().
- Fix kcpuset_match().


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/common/lib/libc/sys/cpuset.c
cvs rdiff -u -r1.69 -r1.70 src/sys/sys/sched.h

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

Modified files:

Index: src/common/lib/libc/sys/cpuset.c
diff -u src/common/lib/libc/sys/cpuset.c:1.14 src/common/lib/libc/sys/cpuset.c:1.15
--- src/common/lib/libc/sys/cpuset.c:1.14	Sun Mar 15 20:08:43 2009
+++ src/common/lib/libc/sys/cpuset.c	Sat Apr 25 19:38:25 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpuset.c,v 1.14 2009/03/15 20:08:43 rmind Exp $	*/
+/*	$NetBSD: cpuset.c,v 1.15 2009/04/25 19:38:25 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #ifndef _STANDALONE
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: cpuset.c,v 1.14 2009/03/15 20:08:43 rmind Exp $);
+__RCSID($NetBSD: cpuset.c,v 1.15 2009/04/25 19:38:25 rmind Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #include sys/param.h
@@ -284,12 +284,23 @@
 }
 
 bool
+kcpuset_iszero(const kcpuset_t *c)
+{
+	unsigned long j;
+
+	for (j = 0; j  cpuset_nentries; j++)
+		if (c-bits[j] != 0)
+			return false;
+	return true;
+}
+
+bool
 kcpuset_match(const kcpuset_t *c1, const kcpuset_t *c2)
 {
 	unsigned long j;
 
 	for (j = 0; j  cpuset_nentries; j++)
-		if ((c1-bits[0]  c2-bits[0]) != c2-bits[0])
+		if ((c1-bits[j]  c2-bits[j]) != c2-bits[j])
 			return false;
 	return true;
 }

Index: src/sys/sys/sched.h
diff -u src/sys/sys/sched.h:1.69 src/sys/sys/sched.h:1.70
--- src/sys/sys/sched.h:1.69	Sun Apr 19 22:15:39 2009
+++ src/sys/sys/sched.h	Sat Apr 25 19:38:25 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: sched.h,v 1.69 2009/04/19 22:15:39 rmind Exp $	*/
+/*	$NetBSD: sched.h,v 1.70 2009/04/25 19:38:25 rmind Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2007, 2008 The NetBSD Foundation, Inc.
@@ -111,6 +111,7 @@
 void	kcpuset_fill(kcpuset_t *);
 void	kcpuset_set(cpuid_t, kcpuset_t *);
 int	kcpuset_isset(cpuid_t, const kcpuset_t *);
+bool	kcpuset_iszero(const kcpuset_t *);
 bool	kcpuset_match(const kcpuset_t *, const kcpuset_t *);
 
 #else



CVS commit: src/sys/dev/ic

2009-04-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Apr 26 02:25:57 UTC 2009

Modified Files:
src/sys/dev/ic: rtl81x9.c rtl81x9var.h

Log Message:
- use (uint8_t *) for RX buffer
- remove unnecessary pointer casts


To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.84 src/sys/dev/ic/rtl81x9.c
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/ic/rtl81x9var.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/ic/rtl81x9.c
diff -u src/sys/dev/ic/rtl81x9.c:1.83 src/sys/dev/ic/rtl81x9.c:1.84
--- src/sys/dev/ic/rtl81x9.c:1.83	Sat Apr 25 18:27:39 2009
+++ src/sys/dev/ic/rtl81x9.c	Sun Apr 26 02:25:57 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtl81x9.c,v 1.83 2009/04/25 18:27:39 tsutsui Exp $	*/
+/*	$NetBSD: rtl81x9.c,v 1.84 2009/04/26 02:25:57 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1997, 1998
@@ -86,7 +86,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rtl81x9.c,v 1.83 2009/04/25 18:27:39 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: rtl81x9.c,v 1.84 2009/04/26 02:25:57 tsutsui Exp $);
 
 #include bpfilter.h
 #include rnd.h
@@ -463,7 +463,7 @@
 		return rval;
 	}
 
-	memset((char *)frame, 0, sizeof(frame));
+	memset(frame, 0, sizeof(frame));
 
 	frame.mii_phyaddr = phy;
 	frame.mii_regaddr = reg;
@@ -509,7 +509,7 @@
 		return;
 	}
 
-	memset((char *)frame, 0, sizeof(frame));
+	memset(frame, 0, sizeof(frame));
 
 	frame.mii_phyaddr = phy;
 	frame.mii_regaddr = reg;
@@ -768,7 +768,7 @@
  fail_3:
 	bus_dmamap_destroy(sc-sc_dmat, sc-recv_dmamap);
  fail_2:
-	bus_dmamem_unmap(sc-sc_dmat, (void *)sc-rtk_rx_buf,
+	bus_dmamem_unmap(sc-sc_dmat, sc-rtk_rx_buf,
 	RTK_RXBUFLEN + 16);
  fail_1:
 	bus_dmamem_free(sc-sc_dmat, sc-sc_dmaseg, sc-sc_dmanseg);
@@ -862,7 +862,7 @@
 			bus_dmamap_destroy(sc-sc_dmat, txd-txd_dmamap);
 	}
 	bus_dmamap_destroy(sc-sc_dmat, sc-recv_dmamap);
-	bus_dmamem_unmap(sc-sc_dmat, (void *)sc-rtk_rx_buf,
+	bus_dmamem_unmap(sc-sc_dmat, sc-rtk_rx_buf,
 	RTK_RXBUFLEN + 16);
 	bus_dmamem_free(sc-sc_dmat, sc-sc_dmaseg, sc-sc_dmanseg);
 
@@ -927,7 +927,7 @@
 {
 	struct mbuf *m;
 	struct ifnet *ifp;
-	char *rxbufpos, *dst;
+	uint8_t *rxbufpos, *dst;
 	u_int total_len, wrap;
 	uint32_t rxstat;
 	uint16_t cur_rx, new_rx;
@@ -948,7 +948,7 @@
 	rx_bytes = 0;
 
 	while ((CSR_READ_1(sc, RTK_COMMAND)  RTK_CMD_EMPTY_RXBUF) == 0) {
-		rxbufpos = (char *)sc-rtk_rx_buf + cur_rx;
+		rxbufpos = sc-rtk_rx_buf + cur_rx;
 		bus_dmamap_sync(sc-sc_dmat, sc-recv_dmamap, cur_rx,
 		RTK_RXSTAT_LEN, BUS_DMASYNC_POSTREAD);
 		rxstat = le32toh(*(uint32_t *)rxbufpos);
@@ -1013,7 +1013,7 @@
 		 * of the Rx area, if necessary.
 		 */
 		cur_rx = (cur_rx + RTK_RXSTAT_LEN) % RTK_RXBUFLEN;
-		rxbufpos = (char *)sc-rtk_rx_buf + cur_rx;
+		rxbufpos = sc-rtk_rx_buf + cur_rx;
 
 		/*
 		 * Compute the number of bytes at which the packet

Index: src/sys/dev/ic/rtl81x9var.h
diff -u src/sys/dev/ic/rtl81x9var.h:1.45 src/sys/dev/ic/rtl81x9var.h:1.46
--- src/sys/dev/ic/rtl81x9var.h:1.45	Sat Mar 21 10:05:28 2009
+++ src/sys/dev/ic/rtl81x9var.h	Sun Apr 26 02:25:57 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtl81x9var.h,v 1.45 2009/03/21 10:05:28 tsutsui Exp $	*/
+/*	$NetBSD: rtl81x9var.h,v 1.46 2009/04/26 02:25:57 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1997, 1998
@@ -199,7 +199,7 @@
 	int			sc_dmanseg;	/* for rtk(4) */
 
 	bus_dmamap_t 		recv_dmamap;	/* for rtk(4) */
-	void *			rtk_rx_buf;
+	uint8_t			*rtk_rx_buf;
 
 	struct rtk_tx_desc	rtk_tx_descs[RTK_TX_LIST_CNT];
 	SIMPLEQ_HEAD(, rtk_tx_desc) rtk_tx_free;



CVS commit: src/usr.sbin/ofctl

2009-04-25 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sun Apr 26 04:54:27 UTC 2009

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

Log Message:
Fix WARNS=4 issues (-Wcast-qual -Wsign-compare)
Fixes PR bin/41283


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/ofctl/ofctl.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/ofctl/ofctl.c
diff -u src/usr.sbin/ofctl/ofctl.c:1.9 src/usr.sbin/ofctl/ofctl.c:1.10
--- src/usr.sbin/ofctl/ofctl.c:1.9	Mon Jul 21 13:36:59 2008
+++ src/usr.sbin/ofctl/ofctl.c	Sun Apr 26 04:54:27 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ofctl.c,v 1.9 2008/07/21 13:36:59 lukem Exp $	*/
+/*	$NetBSD: ofctl.c,v 1.10 2009/04/26 04:54:27 lukem Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
 #ifndef lint
 __COPYRIGHT(@(#) Copyright (c) 2006, 2007\
  The NetBSD Foundation, Inc.  All rights reserved.);
-__RCSID($NetBSD: ofctl.c,v 1.9 2008/07/21 13:36:59 lukem Exp $);
+__RCSID($NetBSD: ofctl.c,v 1.10 2009/04/26 04:54:27 lukem Exp $);
 #endif /* not lint */
 
 #include stdio.h
@@ -55,7 +55,7 @@
 
 static void oflist(int, const char *, int, void *, size_t);
 static void ofprop(int);
-static void ofgetprop(int, char *);
+static void ofgetprop(int, const char *);
 #if 0
 static int isstrprint(const char *, size_t, int);
 #endif
@@ -91,11 +91,11 @@
 int OF_child(int);
 int OF_peer(int);
 int OF_finddevice(const char *);
-int OF_getproplen(int, char *);
-int OF_getprop(int, char *, void *, size_t);
-int OF_nextprop(int, char *, void *);
+int OF_getproplen(int, const char *);
+int OF_getprop(int, const char *, void *, size_t);
+int OF_nextprop(int, const char *, void *);
 
-struct of_prop *of_tree_getprop(int, char *);
+struct of_prop *of_tree_getprop(int, const char *);
 
 static void
 of_tree_mkprop(struct of_node *node, prop_dictionary_t propdict,
@@ -401,7 +401,7 @@
 }
 
 struct of_prop *
-of_tree_getprop(int nodeid, char *name)
+of_tree_getprop(int nodeid, const char *name)
 {
 	struct of_node *node;
 	struct of_prop *prop;
@@ -431,14 +431,14 @@
 }
 
 int
-OF_getproplen(int nodeid, char *name)
+OF_getproplen(int nodeid, const char *name)
 {
 	struct of_prop *prop = of_tree_getprop(nodeid, name);
-	return (prop != NULL) ? prop-prop_length : -1;
+	return (prop != NULL) ? (int)prop-prop_length : -1;
 }
 
 int
-OF_getprop(int nodeid, char *name, void *buf, size_t len)
+OF_getprop(int nodeid, const char *name, void *buf, size_t len)
 {
 	struct of_prop *prop = of_tree_getprop(nodeid, name);
 	if (prop == NULL)
@@ -450,7 +450,7 @@
 }
 
 int
-OF_nextprop(int nodeid, char *name, void *nextname)
+OF_nextprop(int nodeid, const char *name, void *nextname)
 {
 	struct of_prop *prop = of_tree_getprop(nodeid, name);
 	if (prop == NULL)
@@ -897,7 +897,7 @@
 };
 
 static void
-ofgetprop(int node, char *name)
+ofgetprop(int node, const char *name)
 {
 	u_int8_t of_buf[4097];
 	int len;



CVS commit: src/sbin/resize_ffs

2009-04-25 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sun Apr 26 05:57:48 UTC 2009

Modified Files:
src/sbin/resize_ffs: Makefile

Log Message:
set WARNS=3 -- too many -Wsign-compare issues in the kernel ffs code


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sbin/resize_ffs/Makefile

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

Modified files:

Index: src/sbin/resize_ffs/Makefile
diff -u src/sbin/resize_ffs/Makefile:1.1 src/sbin/resize_ffs/Makefile:1.2
--- src/sbin/resize_ffs/Makefile:1.1	Fri Feb 21 04:08:54 2003
+++ src/sbin/resize_ffs/Makefile	Sun Apr 26 05:57:48 2009
@@ -1,4 +1,6 @@
-#	$NetBSD: Makefile,v 1.1 2003/02/21 04:08:54 jtk Exp $
+#	$NetBSD: Makefile,v 1.2 2009/04/26 05:57:48 lukem Exp $
+
+WARNS?=	3	# XXX: sign-compare issues
 
 PROG=resize_ffs
 MAN=resize_ffs.8