CVS commit: src/sys/dev/pci

2009-06-14 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Sun Jun 14 06:24:14 UTC 2009

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

Log Message:
use __arraycount


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/dev/pci/if_nfe.c

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

Modified files:

Index: src/sys/dev/pci/if_nfe.c
diff -u src/sys/dev/pci/if_nfe.c:1.44 src/sys/dev/pci/if_nfe.c:1.45
--- src/sys/dev/pci/if_nfe.c:1.44	Wed Mar 18 15:14:30 2009
+++ src/sys/dev/pci/if_nfe.c	Sun Jun 14 06:24:14 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_nfe.c,v 1.44 2009/03/18 15:14:30 cegger Exp $	*/
+/*	$NetBSD: if_nfe.c,v 1.45 2009/06/14 06:24:14 cegger Exp $	*/
 /*	$OpenBSD: if_nfe.c,v 1.77 2008/02/05 16:52:50 brad Exp $	*/
 
 /*-
@@ -21,7 +21,7 @@
 /* Driver for NVIDIA nForce MCP Fast Ethernet and Gigabit Ethernet */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_nfe.c,v 1.44 2009/03/18 15:14:30 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_nfe.c,v 1.45 2009/06/14 06:24:14 cegger Exp $);
 
 #include opt_inet.h
 #include bpfilter.h
@@ -203,7 +203,7 @@
 	const struct nfe_product *np;
 	int i;
 
-	for (i = 0; i  sizeof(nfe_devices) / sizeof(nfe_devices[0]); i++) {
+	for (i = 0; i  __arraycount(nfe_devices); i++) {
 		np = nfe_devices[i];
 		if (PCI_VENDOR(pa-pa_id) == np-vendor 
 		PCI_PRODUCT(pa-pa_id) == np-product)



CVS commit: src/sys

2009-06-14 Thread Frank Kardel
Module Name:src
Committed By:   kardel
Date:   Sun Jun 14 13:16:32 UTC 2009

Modified Files:
src/sys/kern: kern_tc.c
src/sys/sys: timepps.h

Log Message:
Make PPS work with fast time counters ( 2GHz)
by making the pps count time stamp and the update
time stamp u_int64.
The time delta between two PPS events can now
be correctly calculated avoiding any unaccounted
for wraps with 32-bit counters.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/kern/kern_tc.c
cvs rdiff -u -r1.18 -r1.19 src/sys/sys/timepps.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_tc.c
diff -u src/sys/kern/kern_tc.c:1.39 src/sys/kern/kern_tc.c:1.40
--- src/sys/kern/kern_tc.c:1.39	Sat May 23 17:08:04 2009
+++ src/sys/kern/kern_tc.c	Sun Jun 14 13:16:32 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_tc.c,v 1.39 2009/05/23 17:08:04 ad Exp $ */
+/* $NetBSD: kern_tc.c,v 1.40 2009/06/14 13:16:32 kardel Exp $ */
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@
 
 #include sys/cdefs.h
 /* __FBSDID($FreeBSD: src/sys/kern/kern_tc.c,v 1.166 2005/09/19 22:16:31 andre Exp $); */
-__KERNEL_RCSID(0, $NetBSD: kern_tc.c,v 1.39 2009/05/23 17:08:04 ad Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_tc.c,v 1.40 2009/06/14 13:16:32 kardel Exp $);
 
 #include opt_ntp.h
 
@@ -87,16 +87,19 @@
 
 struct timehands {
 	/* These fields must be initialized by the driver. */
-	struct timecounter	*th_counter;
-	int64_t			th_adjustment;
-	u_int64_t		th_scale;
-	u_int	 		th_offset_count;
-	struct bintime		th_offset;
-	struct timeval		th_microtime;
-	struct timespec		th_nanotime;
+	struct timecounter	*th_counter; /* active timecounter */
+	int64_t			th_adjustment;   /* frequency adjustment */
+		 /* (NTP/adjtime) */
+	u_int64_t		th_scale;/* scale factor (counter */
+		 /* tick-time) */
+	u_int64_t 		th_offset_count; /* offset at last time */
+		 /* update (tc_windup()) */
+	struct bintime		th_offset;   /* bin (up)time at windup */
+	struct timeval		th_microtime;/* cached microtime */
+	struct timespec		th_nanotime; /* cached nanotime */
 	/* Fields not to be copied in tc_windup start with th_generation. */
-	volatile u_int		th_generation;
-	struct timehands	*th_next;
+	volatile u_int		th_generation;   /* current genration */
+	struct timehands	*th_next;/* next timehand */
 };
 
 static struct timehands th0;
@@ -732,7 +735,6 @@
 	else
 		ncount = 0;
 	th-th_offset_count += delta;
-	th-th_offset_count = th-th_counter-tc_counter_mask;
 	bintime_addx(th-th_offset, th-th_scale * delta);
 
 	/*
@@ -920,7 +922,7 @@
 	th = timehands;
 	pps-capgen = th-th_generation;
 	pps-capth = th;
-	pps-capcount = th-th_counter-tc_get_timecount(th-th_counter);
+	pps-capcount = (u_int64_t)tc_delta(th) + th-th_offset_count;
 	if (pps-capgen != th-th_generation)
 		pps-capgen = 0;
 }
@@ -930,7 +932,7 @@
 {
 	struct bintime bt;
 	struct timespec ts, *tsp, *osp;
-	u_int tcount, *pcount;
+	u_int64_t tcount, *pcount;
 	int foff, fhard;
 	pps_seq_t *pseq;
 
@@ -971,7 +973,6 @@
 
 	/* Convert the count to a timespec. */
 	tcount = pps-capcount - pps-capth-th_offset_count;
-	tcount = pps-capth-th_counter-tc_counter_mask;
 	bt = pps-capth-th_offset;
 	bintime_addx(bt, pps-capth-th_scale * tcount);
 	bintime_add(bt, timebasebin);

Index: src/sys/sys/timepps.h
diff -u src/sys/sys/timepps.h:1.18 src/sys/sys/timepps.h:1.19
--- src/sys/sys/timepps.h:1.18	Mon Apr 21 12:56:31 2008
+++ src/sys/sys/timepps.h	Sun Jun 14 13:16:32 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: timepps.h,v 1.18 2008/04/21 12:56:31 ad Exp $	*/
+/*	$NetBSD: timepps.h,v 1.19 2009/06/14 13:16:32 kardel Exp $	*/
 
 /*
  * Copyright (c) 1998 Jonathan Stone
@@ -139,7 +139,7 @@
 	/* Capture information. */
 	struct timehands *capth;
 	unsigned	capgen;
-	unsigned	capcount;
+	u_int64_t	capcount;
 
 	/* State information. */
 	pps_params_t	ppsparam;
@@ -147,7 +147,7 @@
 	int		kcmode;
 	int		ppscap;
 	struct timecounter *ppstc;
-	unsigned	ppscount[3];
+	u_int64_t	ppscount[3]; 
 };
 
 void pps_capture(struct pps_state *);



CVS commit: src/common/lib/libc/hash/sha2

2009-06-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Jun 14 14:04:07 UTC 2009

Modified Files:
src/common/lib/libc/hash/sha2: sha2.c

Log Message:
Fix copypaste errors


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/common/lib/libc/hash/sha2/sha2.c

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/hash/sha2/sha2.c
diff -u src/common/lib/libc/hash/sha2/sha2.c:1.14 src/common/lib/libc/hash/sha2/sha2.c:1.15
--- src/common/lib/libc/hash/sha2/sha2.c:1.14	Thu Jun 11 22:40:42 2009
+++ src/common/lib/libc/hash/sha2/sha2.c	Sun Jun 14 14:04:07 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: sha2.c,v 1.14 2009/06/11 22:40:42 joerg Exp $ */
+/* $NetBSD: sha2.c,v 1.15 2009/06/14 14:04:07 martin Exp $ */
 /*	$KAME: sha2.c,v 1.9 2003/07/20 00:28:38 itojun Exp $	*/
 
 /*
@@ -43,14 +43,14 @@
 #include sys/cdefs.h
 
 #if defined(_KERNEL) || defined(_STANDALONE)
-__KERNEL_RCSID(0, $NetBSD: sha2.c,v 1.14 2009/06/11 22:40:42 joerg Exp $);
+__KERNEL_RCSID(0, $NetBSD: sha2.c,v 1.15 2009/06/14 14:04:07 martin Exp $);
 
 #include lib/libkern/libkern.h
 
 #else
 
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: sha2.c,v 1.14 2009/06/11 22:40:42 joerg Exp $);
+__RCSID($NetBSD: sha2.c,v 1.15 2009/06/14 14:04:07 martin Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #include namespace.h
@@ -162,7 +162,7 @@
  * only.
  */
 static void SHA512_Last(SHA512_CTX *);
-void SHA224_Transform(SHA224_CTX *, const uint64_t*);
+void SHA224_Transform(SHA224_CTX *, const uint32_t*);
 void SHA256_Transform(SHA256_CTX *, const uint32_t*);
 void SHA384_Transform(SHA384_CTX *, const uint64_t*);
 void SHA512_Transform(SHA512_CTX *, const uint64_t*);
@@ -638,9 +638,9 @@
 }
 
 void
-SHA224_Transform(SHA224_CTX *context, const uint64_t *data)
+SHA224_Transform(SHA224_CTX *context, const uint32_t *data)
 {
-	SHA224_Transform((SHA256_CTX *)context, data);
+	SHA256_Transform((SHA256_CTX *)context, data);
 }
 
 int



CVS commit: src/crypto/dist/openssl/crypto/evp

2009-06-14 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sun Jun 14 14:18:35 UTC 2009

Modified Files:
src/crypto/dist/openssl/crypto/evp: m_sha1.c

Log Message:
Don't take short cuts and use the SHA224 functions to compute SHA224.
At least for Final it makes a difference in some situation.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.5 -r1.2 src/crypto/dist/openssl/crypto/evp/m_sha1.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/openssl/crypto/evp/m_sha1.c
diff -u src/crypto/dist/openssl/crypto/evp/m_sha1.c:1.1.1.5 src/crypto/dist/openssl/crypto/evp/m_sha1.c:1.2
--- src/crypto/dist/openssl/crypto/evp/m_sha1.c:1.1.1.5	Fri May  9 21:34:29 2008
+++ src/crypto/dist/openssl/crypto/evp/m_sha1.c	Sun Jun 14 14:18:35 2009
@@ -104,13 +104,12 @@
 	{ return SHA224_Init(ctx-md_data); }
 static int init256(EVP_MD_CTX *ctx)
 	{ return SHA256_Init(ctx-md_data); }
-/*
- * Even though there're separate SHA224_[Update|Final], we call
- * SHA256 functions even in SHA224 context. This is what happens
- * there anyway, so we can spare few CPU cycles:-)
- */
+static int update224(EVP_MD_CTX *ctx,const void *data,size_t count)
+	{ return SHA224_Update(ctx-md_data,data,count); }
 static int update256(EVP_MD_CTX *ctx,const void *data,size_t count)
 	{ return SHA256_Update(ctx-md_data,data,count); }
+static int final224(EVP_MD_CTX *ctx,unsigned char *md)
+	{ return SHA224_Final(md,ctx-md_data); }
 static int final256(EVP_MD_CTX *ctx,unsigned char *md)
 	{ return SHA256_Final(md,ctx-md_data); }
 



CVS commit: src

2009-06-14 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Jun 14 19:43:13 UTC 2009

Modified Files:
src/share/man/man9: sysmon_envsys.9
src/sys/dev/sysmon: sysmon_envsys_events.c sysmonvar.h

Log Message:
Ooops - {get,set}_limits() need to be sensor-specific.  Pass an extra
argument to them to identify the individual sensor being processed.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/share/man/man9/sysmon_envsys.9
cvs rdiff -u -r1.67 -r1.68 src/sys/dev/sysmon/sysmon_envsys_events.c
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/sysmon/sysmonvar.h

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

Modified files:

Index: src/share/man/man9/sysmon_envsys.9
diff -u src/share/man/man9/sysmon_envsys.9:1.26 src/share/man/man9/sysmon_envsys.9:1.27
--- src/share/man/man9/sysmon_envsys.9:1.26	Sat Jun 13 18:21:55 2009
+++ src/share/man/man9/sysmon_envsys.9	Sun Jun 14 19:43:12 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: sysmon_envsys.9,v 1.26 2009/06/13 18:21:55 pgoyette Exp $
+.\	$NetBSD: sysmon_envsys.9,v 1.27 2009/06/14 19:43:12 pgoyette Exp $
 .\
 .\ Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -104,8 +104,10 @@
 	uint64_t	sme_events_timeout;
 	void 		*sme_cookie;
 	void (*sme_refresh)(struct sysmon_envsys *, envsys_data_t *);
-	void (*sme_set_limits)(struct sysmon_envsys *, sysmon_envsys_lim_t *);
-	void (*sme_get_limits)(struct sysmon_envsys *, sysmon_envsys_lim_t *); 
+	void (*sme_set_limits)(struct sysmon_envsys *, envsys_data_t *,
+			   sysmon_envsys_lim_t *);
+	void (*sme_get_limits)(struct sysmon_envsys *, envsys_data_t *,
+			   sysmon_envsys_lim_t *); 
 };
 .Ed
 .Pp

Index: src/sys/dev/sysmon/sysmon_envsys_events.c
diff -u src/sys/dev/sysmon/sysmon_envsys_events.c:1.67 src/sys/dev/sysmon/sysmon_envsys_events.c:1.68
--- src/sys/dev/sysmon/sysmon_envsys_events.c:1.67	Sat Jun 13 16:08:25 2009
+++ src/sys/dev/sysmon/sysmon_envsys_events.c	Sun Jun 14 19:43:12 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: sysmon_envsys_events.c,v 1.67 2009/06/13 16:08:25 pgoyette Exp $ */
+/* $NetBSD: sysmon_envsys_events.c,v 1.68 2009/06/14 19:43:12 pgoyette Exp $ */
 
 /*-
  * Copyright (c) 2007, 2008 Juan Romero Pardines.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sysmon_envsys_events.c,v 1.67 2009/06/13 16:08:25 pgoyette Exp $);
+__KERNEL_RCSID(0, $NetBSD: sysmon_envsys_events.c,v 1.68 2009/06/14 19:43:12 pgoyette Exp $);
 
 #include sys/param.h
 #include sys/types.h
@@ -331,7 +331,7 @@
 	if (sme-sme_set_limits) {
 		see-see_lims.sel_flags = see-see_edata-upropset 
 	  PROP_LIMITS;
-		(*sme-sme_set_limits)(sme, (see-see_lims));
+		(*sme-sme_set_limits)(sme, edata, (see-see_lims));
 	}
 
 out:
@@ -483,6 +483,7 @@
 	if (sed_t-sed_edata-flags  ENVSYS_FMONLIMITS) {
 		if (sed_t-sed_sme-sme_get_limits)
 			(*sed_t-sed_sme-sme_get_limits)(sed_t-sed_sme,
+			  sed_t-sed_edata,
 			  lims);
 		else
 			sed_t-sed_edata-flags = ~ENVSYS_FMONLIMITS;

Index: src/sys/dev/sysmon/sysmonvar.h
diff -u src/sys/dev/sysmon/sysmonvar.h:1.28 src/sys/dev/sysmon/sysmonvar.h:1.29
--- src/sys/dev/sysmon/sysmonvar.h:1.28	Sat Jun 13 16:08:25 2009
+++ src/sys/dev/sysmon/sysmonvar.h	Sun Jun 14 19:43:12 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysmonvar.h,v 1.28 2009/06/13 16:08:25 pgoyette Exp $	*/
+/*	$NetBSD: sysmonvar.h,v 1.29 2009/06/14 19:43:12 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2000 Zembu Labs, Inc.
@@ -89,8 +89,10 @@
 	 * Function callbacks to exchange limit/threshold values
 	 * with device
 	 */
-	void (*sme_set_limits)(struct sysmon_envsys *, sysmon_envsys_lim_t *);
-	void (*sme_get_limits)(struct sysmon_envsys *, sysmon_envsys_lim_t *);
+	void (*sme_set_limits)(struct sysmon_envsys *, envsys_data_t *,
+			   sysmon_envsys_lim_t *);
+	void (*sme_get_limits)(struct sysmon_envsys *, envsys_data_t *,
+			   sysmon_envsys_lim_t *);
 
 	struct workqueue *sme_wq;	/* the workqueue for the events */
 	struct callout sme_callout;	/* for the events */



CVS commit: src/sys/dev/i2c

2009-06-14 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Jun 14 19:44:46 UTC 2009

Modified Files:
src/sys/dev/i2c: sdtemp.c

Log Message:
Update {get,set}_limits() routines.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/i2c/sdtemp.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/i2c/sdtemp.c
diff -u src/sys/dev/i2c/sdtemp.c:1.5 src/sys/dev/i2c/sdtemp.c:1.6
--- src/sys/dev/i2c/sdtemp.c:1.5	Sat Jun 13 20:27:19 2009
+++ src/sys/dev/i2c/sdtemp.c	Sun Jun 14 19:44:46 2009
@@ -1,4 +1,4 @@
-/*  $NetBSD: sdtemp.c,v 1.5 2009/06/13 20:27:19 pgoyette Exp $*/
+/*  $NetBSD: sdtemp.c,v 1.6 2009/06/14 19:44:46 pgoyette Exp $*/
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sdtemp.c,v 1.5 2009/06/13 20:27:19 pgoyette Exp $);
+__KERNEL_RCSID(0, $NetBSD: sdtemp.c,v 1.6 2009/06/14 19:44:46 pgoyette Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -62,9 +62,9 @@
 	sdtemp_match, sdtemp_attach, NULL, NULL);
 
 static void	sdtemp_refresh(struct sysmon_envsys *, envsys_data_t *);
-static void	sdtemp_get_limits(struct sysmon_envsys *,
+static void	sdtemp_get_limits(struct sysmon_envsys *, envsys_data_t *,
   sysmon_envsys_lim_t *);
-static void	sdtemp_set_limits(struct sysmon_envsys *,
+static void	sdtemp_set_limits(struct sysmon_envsys *, envsys_data_t *,
   sysmon_envsys_lim_t *);
 #ifdef NOT_YET
 static int	sdtemp_read_8(struct sdtemp_softc *, uint8_t, uint8_t *);
@@ -272,7 +272,7 @@
 		aprint_error_dev(self, couldn't establish power handler\n);
 
 	/* Retrieve and display hardware monitor limits */
-	sdtemp_get_limits(sc-sc_sme, limits);
+	sdtemp_get_limits(sc-sc_sme, sc-sc_sensor, limits);
 	aprint_normal_dev(self, );
 	i = 0;
 	if (limits.sel_flags  PROP_WARNMIN) {
@@ -304,7 +304,8 @@
 
 /* Retrieve current limits from device, and encode in uKelvins */
 static void
-sdtemp_get_limits(struct sysmon_envsys *sme, sysmon_envsys_lim_t *limits)
+sdtemp_get_limits(struct sysmon_envsys *sme, envsys_data_t *edata,
+		  sysmon_envsys_lim_t *limits)
 {
 	struct sdtemp_softc *sc = sme-sme_cookie;
 	uint16_t lim;
@@ -328,7 +329,8 @@
 
 /* Send current limit values to the device */
 static void
-sdtemp_set_limits(struct sysmon_envsys *sme, sysmon_envsys_lim_t *limits)
+sdtemp_set_limits(struct sysmon_envsys *sme, envsys_data_t *edata,
+		  sysmon_envsys_lim_t *limits)
 {
 	uint16_t val;
 	struct sdtemp_softc *sc = sme-sme_cookie;



CVS commit: src/dist/nawk

2009-06-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jun 14 21:05:40 UTC 2009

Modified Files:
src/dist/nawk: run.c

Log Message:
purge/flush 0,1,2 since we did not open them, we should not be closing them.
s/EOF/-1/ as the documentation for fclose/pclose states.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/dist/nawk/run.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/nawk/run.c
diff -u src/dist/nawk/run.c:1.25 src/dist/nawk/run.c:1.26
--- src/dist/nawk/run.c:1.25	Sun Oct 19 15:33:47 2008
+++ src/dist/nawk/run.c	Sun Jun 14 17:05:40 2009
@@ -1616,7 +1616,7 @@
 			flush_all();	/* fflush() or fflush() - all */
 			u = 0;
 		} else if ((fp = openfile(FFLUSH, getsval(x))) == NULL)
-			u = EOF;
+			u = -1;
 		else
 			u = fflush(fp);
 		break;
@@ -1821,7 +1821,7 @@
 stat = pclose(files[i].fp);
 			else
 stat = fclose(files[i].fp);
-			if (stat == EOF)
+			if (stat == -1)
 WARNING( i/o error occurred closing %s, files[i].fname );
 			if (i  2)	/* don't do /dev/std... */
 xfree(files[i].fname);
@@ -1844,11 +1844,15 @@
 		if (files[i].fp) {
 			if (ferror(files[i].fp))
 WARNING( i/o error occurred on %s, files[i].fname );
-			if (files[i].mode == '|' || files[i].mode == LE)
+			if (i == 0)
+stat = fpurge(files[i].fp);
+			else if (i  2)
+stat = fflush(files[i].fp);
+			else if (files[i].mode == '|' || files[i].mode == LE)
 stat = pclose(files[i].fp);
 			else
 stat = fclose(files[i].fp);
-			if (stat == EOF)
+			if (stat == -1)
 WARNING( i/o error occurred while closing %s, files[i].fname );
 		}
 	}



CVS commit: src/sbin/fsck

2009-06-14 Thread Adam Hamsik
Module Name:src
Committed By:   haad
Date:   Sun Jun 14 21:06:19 UTC 2009

Modified Files:
src/sbin/fsck: partutil.c

Log Message:
Remove bogus warn, which was printed when DIOCGDISKINFO failed.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sbin/fsck/partutil.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/fsck/partutil.c
diff -u src/sbin/fsck/partutil.c:1.7 src/sbin/fsck/partutil.c:1.8
--- src/sbin/fsck/partutil.c:1.7	Sat Jun  6 18:31:29 2009
+++ src/sbin/fsck/partutil.c	Sun Jun 14 21:06:18 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: partutil.c,v 1.7 2009/06/06 18:31:29 haad Exp $	*/
+/*	$NetBSD: partutil.c,v 1.8 2009/06/14 21:06:18 haad Exp $	*/
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: partutil.c,v 1.7 2009/06/06 18:31:29 haad Exp $);
+__RCSID($NetBSD: partutil.c,v 1.8 2009/06/14 21:06:18 haad Exp $);
 
 #include sys/types.h
 #include sys/disklabel.h
@@ -168,12 +168,11 @@
 	/* Get disk description dictionary */
 	if ((error = prop_dictionary_recv_ioctl(fd, DIOCGDISKINFO,
 		disk_dict)) != 0) {
-		warn(Please implement DIOCGDISKINFO for %s disk driver\n, s);
-		
 		/*
 		 * Ask for disklabel if DIOCGDISKINFO failed. This is
 		 * compatibility call and can be removed when all devices
 		 * will support DIOCGDISKINFO.
+		 * cgd, ccd pseudo disk drives doesn't support DIOCGDDISKINFO
 		 */
 		if ((error = ioctl(fd, DIOCGDINFO, lp)) == -1) {
 			printf(DIOCGDINFO on %s failed\n, s);



CVS commit: src/etc

2009-06-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jun 14 21:34:15 UTC 2009

Modified Files:
src/etc: MAKEDEV.tmpl

Log Message:
makedir for real this time.


To generate a diff of this commit:
cvs rdiff -u -r1.124 -r1.125 src/etc/MAKEDEV.tmpl

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

Modified files:

Index: src/etc/MAKEDEV.tmpl
diff -u src/etc/MAKEDEV.tmpl:1.124 src/etc/MAKEDEV.tmpl:1.125
--- src/etc/MAKEDEV.tmpl:1.124	Sun Jun 14 16:01:04 2009
+++ src/etc/MAKEDEV.tmpl	Sun Jun 14 17:34:15 2009
@@ -1,5 +1,5 @@
 #!/bin/sh -
-#	$NetBSD: MAKEDEV.tmpl,v 1.124 2009/06/14 20:01:04 christos Exp $
+#	$NetBSD: MAKEDEV.tmpl,v 1.125 2009/06/14 21:34:15 christos Exp $
 #
 # Copyright (c) 2003,2007,2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -1939,7 +1939,7 @@
 
 zfs)
 	mkdev zfs c %zfs_chr% 0 600
-	mkdir zpool 755
+	makedir zpool 755
 	;;
 
 midevend)



CVS commit: src/sys/uvm

2009-06-14 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Sun Jun 14 21:36:03 UTC 2009

Modified Files:
src/sys/uvm: uvm_anon.h

Log Message:
change the order of members of vm_anon for better packing.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/uvm/uvm_anon.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/uvm/uvm_anon.h
diff -u src/sys/uvm/uvm_anon.h:1.25 src/sys/uvm/uvm_anon.h:1.26
--- src/sys/uvm/uvm_anon.h:1.25	Wed Jan  2 11:49:15 2008
+++ src/sys/uvm/uvm_anon.h	Sun Jun 14 21:36:03 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_anon.h,v 1.25 2008/01/02 11:49:15 ad Exp $	*/
+/*	$NetBSD: uvm_anon.h,v 1.26 2009/06/14 21:36:03 yamt Exp $	*/
 
 /*
  *
@@ -52,9 +52,9 @@
  */
 
 struct vm_anon {
-	int an_ref;			/* reference count [an_lock] */
-	kmutex_t an_lock;		/* lock for an_ref */
+	kmutex_t an_lock;	/* lock for an_ref */
 	struct vm_page *an_page;/* if in RAM [an_lock] */
+	int an_ref;		/* reference count [an_lock] */
 #if defined(VMSWAP) || 1 /* XXX libkvm */
 	int an_swslot;		/* drum swap slot # (if != 0)
    [an_lock.  also, it is ok to read



CVS commit: src/sys/sys

2009-06-14 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Sun Jun 14 21:37:06 UTC 2009

Modified Files:
src/sys/sys: param.h

Log Message:
bump the kernel version to 5.99.14 for the vm_anon change.


To generate a diff of this commit:
cvs rdiff -u -r1.347 -r1.348 src/sys/sys/param.h

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

Modified files:

Index: src/sys/sys/param.h
diff -u src/sys/sys/param.h:1.347 src/sys/sys/param.h:1.348
--- src/sys/sys/param.h:1.347	Mon Jun  1 20:08:44 2009
+++ src/sys/sys/param.h	Sun Jun 14 21:37:06 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.347 2009/06/01 20:08:44 pgoyette Exp $	*/
+/*	$NetBSD: param.h,v 1.348 2009/06/14 21:37:06 yamt Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -63,7 +63,7 @@
  *	2.99.9		(299000900)
  */
 
-#define	__NetBSD_Version__	599001300	/* NetBSD 5.99.13 */
+#define	__NetBSD_Version__	599001400	/* NetBSD 5.99.14 */
 
 #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \
 (m) * 100) + (p) * 100) = __NetBSD_Version__)



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

2009-06-14 Thread Robert Swindells
Module Name:src
Committed By:   rjs
Date:   Sun Jun 14 23:20:35 UTC 2009

Modified Files:
src/sys/arch/arm/gemini: gemini_icu.c

Log Message:
Fix CVS header.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/gemini/gemini_icu.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/arm/gemini/gemini_icu.c
diff -u src/sys/arch/arm/gemini/gemini_icu.c:1.2 src/sys/arch/arm/gemini/gemini_icu.c:1.3
--- src/sys/arch/arm/gemini/gemini_icu.c:1.2	Fri Oct 24 17:46:59 2008
+++ src/sys/arch/arm/gemini/gemini_icu.c	Sun Jun 14 23:20:35 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD	*/
+/*	$NetBSD: gemini_icu.c,v 1.3 2009/06/14 23:20:35 rjs Exp $	*/
 
 /* adapted from:
  *	NetBSD: omap2_icu.c,v 1.4 2008/08/27 11:03:10 matt Exp
@@ -36,7 +36,7 @@
 #define _INTR_PRIVATE
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: gemini_icu.c,v 1.2 2008/10/24 17:46:59 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: gemini_icu.c,v 1.3 2009/06/14 23:20:35 rjs Exp $);
 
 #include sys/param.h
 #include sys/evcnt.h



CVS commit: src/lib/libpam/modules/pam_unix

2009-06-14 Thread Tonnerre Lombard
Module Name:src
Committed By:   tonnerre
Date:   Sun Jun 14 23:23:54 UTC 2009

Modified Files:
src/lib/libpam/modules/pam_unix: pam_unix.c

Log Message:
Restore the good old UNIX behavior of root password changing: only root
may change the root password.

(Checked that everybody else's password can be changed without any problem,
and checked that root can still change the root password.)


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/lib/libpam/modules/pam_unix/pam_unix.c

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

Modified files:

Index: src/lib/libpam/modules/pam_unix/pam_unix.c
diff -u src/lib/libpam/modules/pam_unix/pam_unix.c:1.12 src/lib/libpam/modules/pam_unix/pam_unix.c:1.13
--- src/lib/libpam/modules/pam_unix/pam_unix.c:1.12	Mon Jan 26 04:01:14 2009
+++ src/lib/libpam/modules/pam_unix/pam_unix.c	Sun Jun 14 23:23:54 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pam_unix.c,v 1.12 2009/01/26 04:01:14 lukem Exp $	*/
+/*	$NetBSD: pam_unix.c,v 1.13 2009/06/14 23:23:54 tonnerre Exp $	*/
 
 /*-
  * Copyright 1998 Juniper Networks, Inc.
@@ -40,7 +40,7 @@
 #ifdef __FreeBSD__
 __FBSDID($FreeBSD: src/lib/libpam/modules/pam_unix/pam_unix.c,v 1.49 2004/02/10 10:13:21 des Exp $);
 #else
-__RCSID($NetBSD: pam_unix.c,v 1.12 2009/01/26 04:01:14 lukem Exp $);
+__RCSID($NetBSD: pam_unix.c,v 1.13 2009/06/14 23:23:54 tonnerre Exp $);
 #endif
 
 
@@ -508,6 +508,14 @@
 /* Root doesn't need the old password. */
 return (pam_set_item(pamh, PAM_OLDAUTHTOK, ));
 			}
+			/*
+			 * Apparently we're not root, so let's forbid editing
+			 * root.
+			 * XXX Check for some flag to indicate if this
+			 * XXX is the desired behavior.
+			 */
+			if (pwd-pw_uid == 0)
+return (PAM_PERM_DENIED);
 		}
 
 		if (pwd-pw_passwd[0] == '\0') {



CVS commit: src/external/bsd/pkg_install/dist

2009-06-14 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sun Jun 14 23:31:51 UTC 2009

Update of /cvsroot/src/external/bsd/pkg_install/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv14692

Log Message:
Update to pkg_install-20090610:
Improve diagnostic of the license code.

Status:

Vendor Tag: PKGSRC
Release Tags:   pkg_install-20090610

U src/external/bsd/pkg_install/dist/add/add.h
U src/external/bsd/pkg_install/dist/add/main.c
U src/external/bsd/pkg_install/dist/add/perform.c
U src/external/bsd/pkg_install/dist/add/pkg_add.1
U src/external/bsd/pkg_install/dist/admin/README
U src/external/bsd/pkg_install/dist/admin/admin.h
U src/external/bsd/pkg_install/dist/admin/audit-packages.sh.in
U src/external/bsd/pkg_install/dist/admin/audit.c
U src/external/bsd/pkg_install/dist/admin/check.c
U src/external/bsd/pkg_install/dist/admin/download-vulnerability-list.sh.in
U src/external/bsd/pkg_install/dist/admin/main.c
U src/external/bsd/pkg_install/dist/admin/pkg_admin.1
U src/external/bsd/pkg_install/dist/bpm/bpm.1
U src/external/bsd/pkg_install/dist/bpm/bpm.sh.in
U src/external/bsd/pkg_install/dist/create/build.c
U src/external/bsd/pkg_install/dist/create/create.h
U src/external/bsd/pkg_install/dist/create/main.c
U src/external/bsd/pkg_install/dist/create/perform.c
U src/external/bsd/pkg_install/dist/create/pkg_create.1
U src/external/bsd/pkg_install/dist/create/pl.c
U src/external/bsd/pkg_install/dist/create/util.c
U src/external/bsd/pkg_install/dist/delete/pkg_delete.1
U src/external/bsd/pkg_install/dist/delete/pkg_delete.c
U src/external/bsd/pkg_install/dist/info/info.h
U src/external/bsd/pkg_install/dist/info/main.c
U src/external/bsd/pkg_install/dist/info/perform.c
U src/external/bsd/pkg_install/dist/info/pkg_info.1
U src/external/bsd/pkg_install/dist/info/show.c
U src/external/bsd/pkg_install/dist/lib/automatic.c
U src/external/bsd/pkg_install/dist/lib/config.h.in
U src/external/bsd/pkg_install/dist/lib/conflicts.c
U src/external/bsd/pkg_install/dist/lib/decompress.c
U src/external/bsd/pkg_install/dist/lib/defs.h
U src/external/bsd/pkg_install/dist/lib/dewey.c
U src/external/bsd/pkg_install/dist/lib/dewey.h
U src/external/bsd/pkg_install/dist/lib/fexec.c
U src/external/bsd/pkg_install/dist/lib/file.c
U src/external/bsd/pkg_install/dist/lib/global.c
U src/external/bsd/pkg_install/dist/lib/gpgsig.c
U src/external/bsd/pkg_install/dist/lib/iterate.c
U src/external/bsd/pkg_install/dist/lib/lib.h
U src/external/bsd/pkg_install/dist/lib/lpkg.c
U src/external/bsd/pkg_install/dist/lib/opattern.c
U src/external/bsd/pkg_install/dist/lib/parse-config.c
U src/external/bsd/pkg_install/dist/lib/pkcs7.c
U src/external/bsd/pkg_install/dist/lib/pkg_install.conf.5.in
U src/external/bsd/pkg_install/dist/lib/pkg_io.c
U src/external/bsd/pkg_install/dist/lib/pkg_signature.c
U src/external/bsd/pkg_install/dist/lib/pkg_summary.5
U src/external/bsd/pkg_install/dist/lib/pkgdb.c
U src/external/bsd/pkg_install/dist/lib/pkgsrc.7
U src/external/bsd/pkg_install/dist/lib/plist.c
U src/external/bsd/pkg_install/dist/lib/remove.c
U src/external/bsd/pkg_install/dist/lib/str.c
U src/external/bsd/pkg_install/dist/lib/var.c
U src/external/bsd/pkg_install/dist/lib/version.c
U src/external/bsd/pkg_install/dist/lib/version.h
U src/external/bsd/pkg_install/dist/lib/vulnerabilities-file.c
U src/external/bsd/pkg_install/dist/lib/xwrapper.c
U src/external/bsd/pkg_install/dist/lib/license.c
U src/external/bsd/pkg_install/dist/x509/pkgsrc.cnf
U src/external/bsd/pkg_install/dist/x509/pkgsrc.sh
U src/external/bsd/pkg_install/dist/x509/signing.txt

No conflicts created by this import