CVS commit: src/sys/dev/pci

2012-03-14 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Mar 15 05:47:19 UTC 2012

Modified Files:
src/sys/dev/pci: radeonfb.c radeonfbvar.h

Log Message:
adjust the backlight control interface to match the other drivers ( genfb,
r128fb, voyagerfb etc. ) so the lid_switch script does the right thing
noticed by riz, I thought I fixed that a long time ago


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/dev/pci/radeonfb.c
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/pci/radeonfbvar.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/radeonfb.c
diff -u src/sys/dev/pci/radeonfb.c:1.58 src/sys/dev/pci/radeonfb.c:1.59
--- src/sys/dev/pci/radeonfb.c:1.58	Tue Mar 13 18:40:33 2012
+++ src/sys/dev/pci/radeonfb.c	Thu Mar 15 05:47:19 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: radeonfb.c,v 1.58 2012/03/13 18:40:33 elad Exp $ */
+/*	$NetBSD: radeonfb.c,v 1.59 2012/03/15 05:47:19 macallan Exp $ */
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -70,7 +70,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: radeonfb.c,v 1.58 2012/03/13 18:40:33 elad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radeonfb.c,v 1.59 2012/03/15 05:47:19 macallan Exp $");
 
 #include 
 #include 
@@ -171,8 +171,9 @@ static void radeonfb_putchar_aa32(void *
 static void radeonfb_putchar_aa8(void *, int, int, unsigned, long);
 static void radeonfb_putchar_wrapper(void *, int, int, unsigned, long);
 
-static int radeonfb_get_backlight(struct radeonfb_display *);
 static int radeonfb_set_backlight(struct radeonfb_display *, int);
+static int radeonfb_get_backlight(struct radeonfb_display *);
+static void radeonfb_switch_backlight(struct radeonfb_display *, int);
 static void radeonfb_lvds_callout(void *);
 
 static void radeonfb_brightness_up(device_t);
@@ -911,11 +912,14 @@ radeonfb_attach(device_t parent, device_
 		config_found(sc->sc_dev, &aa, wsemuldisplaydevprint);
 		
 		radeonfb_blank(dp, 0);
-		
+
 		/* Initialise delayed lvds operations for backlight. */
 		callout_init(&dp->rd_bl_lvds_co, 0);
 		callout_setfunc(&dp->rd_bl_lvds_co,
 radeonfb_lvds_callout, dp);
+		dp->rd_bl_on = 1;
+		dp->rd_bl_level = radeonfb_get_backlight(dp);
+		radeonfb_set_backlight(dp, dp->rd_bl_level);
 	}
 
 	/*
@@ -1089,18 +1093,29 @@ radeonfb_ioctl(void *v, void *vs,
 #endif
 	case WSDISPLAYIO_GETPARAM:
 		param = (struct wsdisplay_param *)d;
-		if (param->param == WSDISPLAYIO_PARAM_BACKLIGHT) {
+		switch (param->param) {
+		case WSDISPLAYIO_PARAM_BRIGHTNESS:
+			param->min = 0;
+			param->max = 255;
+			param->curval = dp->rd_bl_level;
+			return 0;
+		case WSDISPLAYIO_PARAM_BACKLIGHT:
 			param->min = 0;
 			param->max = RADEONFB_BACKLIGHT_MAX;
-			param->curval = radeonfb_get_backlight(dp);
+			param->curval = dp->rd_bl_on;
 			return 0;
 		}
 		return EPASSTHROUGH;
 
 	case WSDISPLAYIO_SETPARAM:
 		param = (struct wsdisplay_param *)d;
-		if (param->param == WSDISPLAYIO_PARAM_BACKLIGHT) {
-			return radeonfb_set_backlight(dp, param->curval);
+		switch (param->param) {
+		case WSDISPLAYIO_PARAM_BRIGHTNESS:
+			radeonfb_set_backlight(dp, param->curval);
+			return 0;
+		case WSDISPLAYIO_PARAM_BACKLIGHT:
+			radeonfb_switch_backlight(dp,  param->curval);
+			return 0;
 		}
 		return EPASSTHROUGH;
 
@@ -3780,6 +3795,14 @@ radeonfb_get_backlight(struct radeonfb_d
 }	
 
 /* Set the backlight to the given level for the display.  */
+static void 
+radeonfb_switch_backlight(struct radeonfb_display *dp, int on)
+{
+	if (dp->rd_bl_on == on)
+		return;
+	dp->rd_bl_on = on;
+	radeonfb_set_backlight(dp, dp->rd_bl_level);
+}
 
 static int 
 radeonfb_set_backlight(struct radeonfb_display *dp, int level)
@@ -3789,7 +3812,11 @@ radeonfb_set_backlight(struct radeonfb_d
 	uint32_t lvds;
 
 	s = spltty();
-	
+
+	dp->rd_bl_level = level;
+	if (dp->rd_bl_on == 0)
+		level = 0;
+
 	if (level < 0)
 		level = 0;
 	else if (level >= RADEONFB_BACKLIGHT_MAX)
@@ -3865,24 +3892,30 @@ static void
 radeonfb_brightness_up(device_t dev)
 {
 	struct radeonfb_softc *sc = device_private(dev);
+	struct radeonfb_display *dp = &sc->sc_displays[0];
 	int level;
 
 	/* we assume the main display is the first one - need a better way */
 	if (sc->sc_ndisplays < 1) return;
-	level = radeonfb_get_backlight(&sc->sc_displays[0]);
+	/* make sure pushing the hotkeys always has an effect */
+	dp->rd_bl_on = 1;
+	level = dp->rd_bl_level;
 	level = min(RADEONFB_BACKLIGHT_MAX, level + 5);
-	radeonfb_set_backlight(&sc->sc_displays[0], level);
+	radeonfb_set_backlight(dp, level);
 }
 
 static void
 radeonfb_brightness_down(device_t dev)
 {
 	struct radeonfb_softc *sc = device_private(dev);
+	struct radeonfb_display *dp = &sc->sc_displays[0];
 	int level;
 
 	/* we assume the main display is the first one - need a better way */
 	if (sc->sc_ndisplays < 1) return;
-	level = radeonfb_get_backlight(&sc->sc_displays[0]);
+	/* make sure pushing the hotkeys always has an effect */
+	dp->rd_bl_on = 1;
+	le

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

2012-03-14 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Mar 15 04:06:55 UTC 2012

Modified Files:
src/external/bsd/iscsi/dist/include: iscsiutil.h
src/external/bsd/iscsi/dist/src/lib: conffile.c disk.c initiator.c
parameters.c protocol.c util.c

Log Message:
Add __printflike where needed. Fix various format string issues.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/iscsi/dist/include/iscsiutil.h
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/iscsi/dist/src/lib/conffile.c \
src/external/bsd/iscsi/dist/src/lib/parameters.c \
src/external/bsd/iscsi/dist/src/lib/protocol.c \
src/external/bsd/iscsi/dist/src/lib/util.c
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/iscsi/dist/src/lib/disk.c
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/iscsi/dist/src/lib/initiator.c

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

Modified files:

Index: src/external/bsd/iscsi/dist/include/iscsiutil.h
diff -u src/external/bsd/iscsi/dist/include/iscsiutil.h:1.3 src/external/bsd/iscsi/dist/include/iscsiutil.h:1.4
--- src/external/bsd/iscsi/dist/include/iscsiutil.h:1.3	Tue Jun 30 02:44:52 2009
+++ src/external/bsd/iscsi/dist/include/iscsiutil.h	Thu Mar 15 04:06:54 2012
@@ -144,9 +144,12 @@ EXTERN uint32_t iscsi_debug_level;
  * Debugging Functions
  */
 void	set_debug(const char *);
-void	iscsi_trace(const int, const char *, ...);
-void	iscsi_warn(const char *, const int, const char *, ...);
-void	iscsi_err(const char *, const int, const char *, ...);
+void	iscsi_trace(const int, const char *, ...)
+__printflike(2, 3);
+void	iscsi_warn(const char *, const int, const char *, ...)
+__printflike(3, 4);
+void	iscsi_err(const char *, const int, const char *, ...)
+__printflike(3, 4);
 void	iscsi_print_buffer(const char *, const size_t);
 
 
@@ -417,7 +420,7 @@ typedef struct {
 }   iscsi_worker_t;
 
 #define ISCSI_WORKER_EXIT(ME) do {	\
-	iscsi_trace(TRACE_ISCSI_DEBUG ,__FILE__, __LINE__, "exiting\n");\
+	iscsi_trace(TRACE_ISCSI_DEBUG, "%s:%d: %s", __FILE__, __LINE__, "exiting\n");\
 	(ME)->state |= ISCSI_WORKER_STATE_EXITING;			\
 	return 0;			\
 	/* NOTREACHED */		\

Index: src/external/bsd/iscsi/dist/src/lib/conffile.c
diff -u src/external/bsd/iscsi/dist/src/lib/conffile.c:1.2 src/external/bsd/iscsi/dist/src/lib/conffile.c:1.3
--- src/external/bsd/iscsi/dist/src/lib/conffile.c:1.2	Tue Jun 30 02:44:52 2009
+++ src/external/bsd/iscsi/dist/src/lib/conffile.c	Thu Mar 15 04:06:54 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: conffile.c,v 1.2 2009/06/30 02:44:52 agc Exp $ */
+/* $NetBSD: conffile.c,v 1.3 2012/03/15 04:06:54 joerg Exp $ */
 
 /*
  * Copyright © 2006 Alistair Crooks.  All rights reserved.
@@ -206,7 +206,7 @@ safe_write_ent(FILE *fp, conffile_t *sp,
 #endif
 
 /* report an error and clear up */
-static int
+static __printflike(3, 4) int
 report_error(FILE *fp, char *name, const char *fmt, ...)
 {
 	va_list	vp;
Index: src/external/bsd/iscsi/dist/src/lib/parameters.c
diff -u src/external/bsd/iscsi/dist/src/lib/parameters.c:1.2 src/external/bsd/iscsi/dist/src/lib/parameters.c:1.3
--- src/external/bsd/iscsi/dist/src/lib/parameters.c:1.2	Tue Jun 30 02:44:52 2009
+++ src/external/bsd/iscsi/dist/src/lib/parameters.c	Thu Mar 15 04:06:54 2012
@@ -821,7 +821,7 @@ param_text_parse(iscsi_parameter_t * hea
 		}
 		if (strlen(value) > ISCSI_PARAM_MAX_LEN) {
 			iscsi_err(__FILE__, __LINE__,
-"strlen(value) %u\n", strlen(value));
+"strlen(value) %zu\n", strlen(value));
 			PTP_CLEANUP;
 			return -1;
 		}
Index: src/external/bsd/iscsi/dist/src/lib/protocol.c
diff -u src/external/bsd/iscsi/dist/src/lib/protocol.c:1.2 src/external/bsd/iscsi/dist/src/lib/protocol.c:1.3
--- src/external/bsd/iscsi/dist/src/lib/protocol.c:1.2	Tue Feb 22 13:10:55 2011
+++ src/external/bsd/iscsi/dist/src/lib/protocol.c	Thu Mar 15 04:06:55 2012
@@ -133,7 +133,7 @@ iscsi_task_cmd_decap(uint8_t *header, is
 		errmsg = "Bytes 40-47";
 	}
 	if (errmsg) {
-		iscsi_err(__FILE__, __LINE__, errmsg);
+		iscsi_err(__FILE__, __LINE__, "%s", errmsg);
 		NO_CLEANUP;
 		return 1;
 	}
@@ -211,7 +211,7 @@ iscsi_task_rsp_decap(uint8_t *header, is
 		errmsg = "Bytes 36-47";
 	}
 	if (errmsg) {
-		iscsi_err(__FILE__, __LINE__, errmsg);
+		iscsi_err(__FILE__, __LINE__, "%s", errmsg);
 		NO_CLEANUP;
 		return 1;
 	}
@@ -287,7 +287,7 @@ iscsi_nop_out_decap(uint8_t *header, isc
 		errmsg = "Bytes 32-47";
 	}
 	if (errmsg) {
-		iscsi_err(__FILE__, __LINE__, errmsg);
+		iscsi_err(__FILE__, __LINE__, "%s", errmsg);
 		NO_CLEANUP;
 		return 1;
 	}
@@ -364,7 +364,7 @@ iscsi_nop_in_decap(uint8_t *header, iscs
 		errmsg = "Bytes 36-47";
 	}
 	if (errmsg) {
-		iscsi_err(__FILE__, __LINE__, errmsg);
+		iscsi_err(__FILE__, __LINE__, "%s", errmsg);
 		NO_CLEANUP;
 		return 1;
 	}
@@ -452,7 +452,7 @@ iscsi_text_cmd_decap(uint8_t *header, is
 		errmsg = "Bytes 32-47";
 	}
 	if (errmsg) {
-		iscsi_err(__FILE__, __LINE__, errmsg);
+		iscsi_err

CVS commit: src/sys/dev/pci

2012-03-14 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Mar 15 03:12:51 UTC 2012

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

Log Message:
we need to zap the glyph cache when re-initializing after X


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/pci/voodoofb.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/voodoofb.c
diff -u src/sys/dev/pci/voodoofb.c:1.39 src/sys/dev/pci/voodoofb.c:1.40
--- src/sys/dev/pci/voodoofb.c:1.39	Tue Mar 13 18:40:33 2012
+++ src/sys/dev/pci/voodoofb.c	Thu Mar 15 03:12:51 2012
@@ -1,7 +1,7 @@
-/*	$NetBSD: voodoofb.c,v 1.39 2012/03/13 18:40:33 elad Exp $	*/
+/*	$NetBSD: voodoofb.c,v 1.40 2012/03/15 03:12:51 macallan Exp $	*/
 
 /*
- * Copyright (c) 2005, 2006 Michael Lorenz
+ * Copyright (c) 2005, 2006, 2012 Michael Lorenz
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: voodoofb.c,v 1.39 2012/03/13 18:40:33 elad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: voodoofb.c,v 1.40 2012/03/15 03:12:51 macallan Exp $");
 
 #include 
 #include 
@@ -1165,6 +1165,14 @@ voodoofb_ioctl(void *v, void *vs, u_long
 	   sc->sc_cmap_green[i],
 	   sc->sc_cmap_blue[i]);
 }
+
+/* zap the glyph cache */
+for (i = 0; i < 256; i++) {
+	sc->sc_glyphs_defattr[i] = 0;
+	sc->sc_glyphs_kernattr[i] = 0;
+}
+sc->sc_usedglyphs = 0;
+
 voodoofb_clearscreen(sc);
 vcons_redraw_screen(ms);
 			} else {



CVS commit: src/usr.bin/last

2012-03-14 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Thu Mar 15 03:04:05 UTC 2012

Modified Files:
src/usr.bin/last: last.c want.c

Log Message:
Tidy up: we no longer need FIRSTVALID for its original purpose, so change
the name of the symbol to something that applies to the remaining use.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/usr.bin/last/last.c
cvs rdiff -u -r1.16 -r1.17 src/usr.bin/last/want.c

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

Modified files:

Index: src/usr.bin/last/last.c
diff -u src/usr.bin/last/last.c:1.35 src/usr.bin/last/last.c:1.36
--- src/usr.bin/last/last.c:1.35	Fri Sep 16 15:39:27 2011
+++ src/usr.bin/last/last.c	Thu Mar 15 03:04:05 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: last.c,v 1.35 2011/09/16 15:39:27 joerg Exp $	*/
+/*	$NetBSD: last.c,v 1.36 2012/03/15 03:04:05 dholland Exp $	*/
 
 /*
  * Copyright (c) 1987, 1993, 1994
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1987, 19
 #if 0
 static char sccsid[] = "@(#)last.c	8.2 (Berkeley) 4/2/94";
 #endif
-__RCSID("$NetBSD: last.c,v 1.35 2011/09/16 15:39:27 joerg Exp $");
+__RCSID("$NetBSD: last.c,v 1.36 2012/03/15 03:04:05 dholland Exp $");
 #endif /* not lint */
 
 #include 
@@ -378,14 +378,14 @@ fmttime(time_t t, int flags)
 #define LINESIZE UT_LINESIZE
 #define HOSTSIZE UT_HOSTSIZE
 #define ut_timefld ut_time
-#define FIRSTVALID 0
+#define HAS_UT_SS 0
 #include "want.c"
 #undef TYPE /*(a)*/
 #undef NAMESIZE
 #undef LINESIZE
 #undef HOSTSIZE
 #undef ut_timefld
-#undef FIRSTVALID
+#undef HAS_UT_SS
 #endif
 
 #ifdef SUPPORT_UTMPX
@@ -400,6 +400,6 @@ fmttime(time_t t, int flags)
 #define LINESIZE UTX_LINESIZE
 #define HOSTSIZE UTX_HOSTSIZE
 #define ut_timefld ut_xtime
-#define FIRSTVALID 1
+#define HAS_UT_SS 1
 #include "want.c"
 #endif

Index: src/usr.bin/last/want.c
diff -u src/usr.bin/last/want.c:1.16 src/usr.bin/last/want.c:1.17
--- src/usr.bin/last/want.c:1.16	Thu Mar 15 03:01:03 2012
+++ src/usr.bin/last/want.c	Thu Mar 15 03:04:05 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: want.c,v 1.16 2012/03/15 03:01:03 dholland Exp $	*/
+/*	$NetBSD: want.c,v 1.17 2012/03/15 03:04:05 dholland Exp $	*/
 
 /*
  * Copyright (c) 1987, 1993, 1994
@@ -39,7 +39,7 @@ static const char *
 /*ARGSUSED*/
 gethost(struct utmp *ut, const char *host, int numeric)
 {
-#if FIRSTVALID == 0
+#if HAS_UT_SS == 0
 	return numeric ? "" : host;
 #else
 	if (numeric) {



CVS commit: src/usr.bin/last

2012-03-14 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Thu Mar 15 03:01:03 UTC 2012

Modified Files:
src/usr.bin/last: want.c

Log Message:
When the wtmp file is empty, for the "wtmp[x] begins..." output, use
the last mod time of the wtmp file (in practice, the time it was last
rotated, which is when it begins) instead of the current time, which
wasn't ever particularly useful. PR 39444.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/usr.bin/last/want.c

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

Modified files:

Index: src/usr.bin/last/want.c
diff -u src/usr.bin/last/want.c:1.15 src/usr.bin/last/want.c:1.16
--- src/usr.bin/last/want.c:1.15	Thu Mar 15 02:55:02 2012
+++ src/usr.bin/last/want.c	Thu Mar 15 03:01:03 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: want.c,v 1.15 2012/03/15 02:55:02 dholland Exp $	*/
+/*	$NetBSD: want.c,v 1.16 2012/03/15 03:01:03 dholland Exp $	*/
 
 /*
  * Copyright (c) 1987, 1993, 1994
@@ -131,7 +131,7 @@ wtmp(const char *file, int namesz, int l
 	if (!S_ISREG(stb.st_mode))
 		errx(EXIT_FAILURE, "%s: Not a regular file", file);
 
-	seentime = time(NULL);
+	seentime = stb.st_mtime;
 	(void)signal(SIGINT, onintr);
 	(void)signal(SIGQUIT, onintr);
 



CVS commit: src/usr.bin/last

2012-03-14 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Thu Mar 15 02:55:02 UTC 2012

Modified Files:
src/usr.bin/last: want.c

Log Message:
Keep track of the timestamp of the last (thus oldest) record seen and use
it to print "wtmp[x] begins" at the end, instead of knowing where to look
in the final utmp buffer to get a final timestamp out. This is both tidier
and fixes a problem with wtmpx files, which is that if the header record
is missing (which it seems to be on my machines) it would fetch the wrong
time out, and if you happened to have a one-record wtmp file it would use
the current time instead. This change restores the traditional behavior
of printing the time of the oldest record in the file, and if no records
are present to use the current time.

It might be a bug that wtmpx files don't seem to have the header
record they supposedly ought to.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/usr.bin/last/want.c

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

Modified files:

Index: src/usr.bin/last/want.c
diff -u src/usr.bin/last/want.c:1.14 src/usr.bin/last/want.c:1.15
--- src/usr.bin/last/want.c:1.14	Fri Sep 16 15:39:27 2011
+++ src/usr.bin/last/want.c	Thu Mar 15 02:55:02 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: want.c,v 1.14 2011/09/16 15:39:27 joerg Exp $	*/
+/*	$NetBSD: want.c,v 1.15 2012/03/15 02:55:02 dholland Exp $	*/
 
 /*
  * Copyright (c) 1987, 1993, 1994
@@ -29,6 +29,7 @@
  * SUCH DAMAGE.
  */
 static struct utmp *buf;
+static time_t seentime;
 
 static void onintr(int);
 static int want(struct utmp *, int);
@@ -130,7 +131,7 @@ wtmp(const char *file, int namesz, int l
 	if (!S_ISREG(stb.st_mode))
 		errx(EXIT_FAILURE, "%s: Not a regular file", file);
 
-	buf[FIRSTVALID].ut_timefld = time(NULL);
+	seentime = time(NULL);
 	(void)signal(SIGINT, onintr);
 	(void)signal(SIGQUIT, onintr);
 
@@ -157,6 +158,9 @@ wtmp(const char *file, int namesz, int l
 			NULTERM(name);
 			NULTERM(line);
 			NULTERM(host);
+
+			seentime = bp->ut_timefld;
+
 			/*
 			 * if the terminal line is '~', the machine stopped.
 			 * see utmp(5) for more info.
@@ -250,7 +254,7 @@ wtmp(const char *file, int namesz, int l
 		}
 	}
 	fulltime = 1;	/* show full time */
-	crmsg = fmttime(buf[FIRSTVALID].ut_timefld, FULLTIME);
+	crmsg = fmttime(seentime, FULLTIME);
 	if ((ct = strrchr(file, '/')) != NULL)
 		ct++;
 	printf("\n%s begins %s\n", ct ? ct : file, crmsg);
@@ -305,8 +309,7 @@ static void
 onintr(int signo)
 {
 	/* FIXME: None of this is allowed in a signal handler */
-	printf("\ninterrupted %s\n", fmttime(buf[FIRSTVALID].ut_timefld,
-	FULLTIME));
+	printf("\ninterrupted %s\n", fmttime(seentime, FULLTIME));
 	if (signo == SIGINT) {
 		(void)raise_default_signal(signo);
 		exit(EXIT_FAILURE);



CVS commit: src

2012-03-14 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Mar 15 02:02:24 UTC 2012

Modified Files:
src/bin/expr: expr.y
src/bin/sh: error.c error.h exec.h output.h trap.h
src/bin/test: test.c
src/lib/libpuffs: opdump.c
src/lib/lua/gpio: gpio.c
src/lib/lua/sqlite: sqlite.c
src/libexec/fingerd: fingerd.c
src/libexec/identd: identd.c identd.h
src/sbin/dkscan_bsdlabel: dkscan_util.h
src/sbin/fdisk: fdisk.c
src/sbin/sysctl: sysctl.c
src/sys/ddb: db_output.h
src/sys/rump/include/rump: rumpuser.h
src/tests: h_macros.h
src/tests/fs/ffs: t_quota2_1.c t_quota2_remount.c
src/tests/kernel: gen_t_subr_prf
src/tests/lib/libc/ssp: h_vsnprintf.c h_vsprintf.c
src/tests/lib/libc/stdlib: t_getenv_thread.c
src/tests/modules: t_modctl.c
src/usr.bin/bthset: bthset.c
src/usr.bin/getent: getent.c
src/usr.bin/m4: extern.h
src/usr.bin/su: su_pam.c
src/usr.sbin/cpuctl: cpuctl.h
src/usr.sbin/envstat: config_lex.l config_yacc.y
src/usr.sbin/ldpd: ldp_errors.c ldp_errors.h mpls_routes.c
src/usr.sbin/mtree: spec.c
src/usr.sbin/powerd: powerd.c
src/usr.sbin/ypserv/ypserv: ypserv.c

Log Message:
Add __printflike attribution to use vprintf and friends with an argument
as format string.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/bin/expr/expr.y
cvs rdiff -u -r1.37 -r1.38 src/bin/sh/error.c
cvs rdiff -u -r1.18 -r1.19 src/bin/sh/error.h
cvs rdiff -u -r1.22 -r1.23 src/bin/sh/exec.h
cvs rdiff -u -r1.23 -r1.24 src/bin/sh/output.h
cvs rdiff -u -r1.19 -r1.20 src/bin/sh/trap.h
cvs rdiff -u -r1.38 -r1.39 src/bin/test/test.c
cvs rdiff -u -r1.35 -r1.36 src/lib/libpuffs/opdump.c
cvs rdiff -u -r1.6 -r1.7 src/lib/lua/gpio/gpio.c
cvs rdiff -u -r1.3 -r1.4 src/lib/lua/sqlite/sqlite.c
cvs rdiff -u -r1.26 -r1.27 src/libexec/fingerd/fingerd.c
cvs rdiff -u -r1.33 -r1.34 src/libexec/identd/identd.c
cvs rdiff -u -r1.8 -r1.9 src/libexec/identd/identd.h
cvs rdiff -u -r1.3 -r1.4 src/sbin/dkscan_bsdlabel/dkscan_util.h
cvs rdiff -u -r1.138 -r1.139 src/sbin/fdisk/fdisk.c
cvs rdiff -u -r1.141 -r1.142 src/sbin/sysctl/sysctl.c
cvs rdiff -u -r1.20 -r1.21 src/sys/ddb/db_output.h
cvs rdiff -u -r1.71 -r1.72 src/sys/rump/include/rump/rumpuser.h
cvs rdiff -u -r1.7 -r1.8 src/tests/h_macros.h
cvs rdiff -u -r1.3 -r1.4 src/tests/fs/ffs/t_quota2_1.c \
src/tests/fs/ffs/t_quota2_remount.c
cvs rdiff -u -r1.1 -r1.2 src/tests/kernel/gen_t_subr_prf
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/ssp/h_vsnprintf.c \
src/tests/lib/libc/ssp/h_vsprintf.c
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/stdlib/t_getenv_thread.c
cvs rdiff -u -r1.7 -r1.8 src/tests/modules/t_modctl.c
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/bthset/bthset.c
cvs rdiff -u -r1.18 -r1.19 src/usr.bin/getent/getent.c
cvs rdiff -u -r1.15 -r1.16 src/usr.bin/m4/extern.h
cvs rdiff -u -r1.16 -r1.17 src/usr.bin/su/su_pam.c
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/cpuctl/cpuctl.h
cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/envstat/config_lex.l
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/envstat/config_yacc.y
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/ldpd/ldp_errors.c
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/ldpd/ldp_errors.h
cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/ldpd/mpls_routes.c
cvs rdiff -u -r1.79 -r1.80 src/usr.sbin/mtree/spec.c
cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/powerd/powerd.c
cvs rdiff -u -r1.25 -r1.26 src/usr.sbin/ypserv/ypserv/ypserv.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/expr/expr.y
diff -u src/bin/expr/expr.y:1.37 src/bin/expr/expr.y:1.38
--- src/bin/expr/expr.y:1.37	Thu Aug 25 01:11:47 2011
+++ src/bin/expr/expr.y	Thu Mar 15 02:02:20 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: expr.y,v 1.37 2011/08/25 01:11:47 joerg Exp $ */
+/* $NetBSD: expr.y,v 1.38 2012/03/15 02:02:20 joerg Exp $ */
 
 /*_
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 %{
 #include 
 #ifndef lint
-__RCSID("$NetBSD: expr.y,v 1.37 2011/08/25 01:11:47 joerg Exp $");
+__RCSID("$NetBSD: expr.y,v 1.38 2012/03/15 02:02:20 joerg Exp $");
 #endif /* not lint */
 
 #include 
@@ -430,7 +430,7 @@ yylex(void)
 /*
  * Print error message and exit with error 2 (syntax error).
  */
-static void
+static __printflike(1, 2) void
 yyerror(const char *fmt, ...)
 {
 	va_list arg;

Index: src/bin/sh/error.c
diff -u src/bin/sh/error.c:1.37 src/bin/sh/error.c:1.38
--- src/bin/sh/error.c:1.37	Thu Oct 16 14:36:40 2008
+++ src/bin/sh/error.c	Thu Mar 15 02:02:20 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: error.c,v 1.37 2008/10/16 14:36:40 dholland Exp $	*/
+/*	$NetBSD: error.c,v 1.38 2012/03/15 02:02:20 joerg Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)error.c	8.2 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: error.c,v 1.37 2008/10/16 14:36:40 dholland Exp $");
+__RCSID("$Ne

CVS commit: src/share/mk

2012-03-14 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Mar 15 02:00:52 UTC 2012

Modified Files:
src/share/mk: bsd.kmodule.mk bsd.sys.mk

Log Message:
Decouple HAVE_LLVM from HAVE_GCC. For GCC, add -Wno-format-zero-length
when -Wformat is used.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/share/mk/bsd.kmodule.mk
cvs rdiff -u -r1.211 -r1.212 src/share/mk/bsd.sys.mk

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

Modified files:

Index: src/share/mk/bsd.kmodule.mk
diff -u src/share/mk/bsd.kmodule.mk:1.35 src/share/mk/bsd.kmodule.mk:1.36
--- src/share/mk/bsd.kmodule.mk:1.35	Sun Feb 19 23:19:37 2012
+++ src/share/mk/bsd.kmodule.mk	Thu Mar 15 02:00:52 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.kmodule.mk,v 1.35 2012/02/19 23:19:37 matt Exp $
+#	$NetBSD: bsd.kmodule.mk,v 1.36 2012/03/15 02:00:52 joerg Exp $
 
 # We are not building this with PIE
 MKPIE=no
@@ -18,7 +18,7 @@ CPPFLAGS+=	-isystem ${S}/../common/inclu
 CPPFLAGS+=	-D_KERNEL -D_LKM -D_MODULE -DSYSCTL_INCLUDE_DESCR
 
 # XXX until the kernel is fixed again...
-.if defined(HAVE_GCC) || defined(HAVE_PCC)
+.if defined(HAVE_GCC) || defined(HAVE_PCC) || defined(HAVE_LLVM)
 CFLAGS+=	-fno-strict-aliasing -Wno-pointer-sign
 .endif
 

Index: src/share/mk/bsd.sys.mk
diff -u src/share/mk/bsd.sys.mk:1.211 src/share/mk/bsd.sys.mk:1.212
--- src/share/mk/bsd.sys.mk:1.211	Sat Jan 28 21:32:14 2012
+++ src/share/mk/bsd.sys.mk	Thu Mar 15 02:00:52 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.sys.mk,v 1.211 2012/01/28 21:32:14 christos Exp $
+#	$NetBSD: bsd.sys.mk,v 1.212 2012/03/15 02:00:52 joerg Exp $
 #
 # Build definitions used for NetBSD source tree builds.
 
@@ -13,7 +13,7 @@ CPPFLAGS+=	-Wp,-iremap,${DESTDIR}/:/
 # Enable c99 mode by default.
 # This has the side effect of complaining for missing prototypes
 # implicit type declarations and missing return statements.
-.if defined(HAVE_GCC)
+.if defined(HAVE_GCC) || defined(HAVE_LLVM)
 CFLAGS+=	-std=gnu99
 .endif
 
@@ -59,8 +59,9 @@ CXXFLAGS+=	-Wctor-dtor-privacy -Wnon-vir
 		-Wno-deprecated -Woverloaded-virtual -Wsign-promo -Wsynth
 CXXFLAGS+=	${${ACTIVE_CXX} == "gcc":? -Wno-non-template-friend -Wno-pmf-conversions :}
 .endif
-.if ${WARNS} > 3 && defined(HAVE_GCC)
+.if ${WARNS} > 3 && (defined(HAVE_GCC) || defined(HAVE_LLVM))
 CFLAGS+=	-Wsign-compare -Wformat=2
+CFLAGS+=	${${ACTIVE_CC} == "gcc":? -Wno-format-zero-length :}
 .endif
 .if ${WARNS} > 3 && defined(HAVE_LLVM)
 CFLAGS+=	${${ACTIVE_CC} == "clang":? -Wpointer-sign -Wmissing-noreturn :}



CVS commit: src/tests/lib/libc/stdio

2012-03-14 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Mar 15 01:44:44 UTC 2012

Modified Files:
src/tests/lib/libc/stdio: t_printf.c t_scanf.c

Log Message:
Fix format strings to properly quote %.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libc/stdio/t_printf.c
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/stdio/t_scanf.c

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

Modified files:

Index: src/tests/lib/libc/stdio/t_printf.c
diff -u src/tests/lib/libc/stdio/t_printf.c:1.4 src/tests/lib/libc/stdio/t_printf.c:1.5
--- src/tests/lib/libc/stdio/t_printf.c:1.4	Sun Feb 26 23:14:26 2012
+++ src/tests/lib/libc/stdio/t_printf.c	Thu Mar 15 01:44:44 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: t_printf.c,v 1.4 2012/02/26 23:14:26 christos Exp $ */
+/* $NetBSD: t_printf.c,v 1.5 2012/03/15 01:44:44 joerg Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@ ATF_TC_HEAD(snprintf_dotzero, tc)
 {
 
 	atf_tc_set_md_var(tc, "descr", \
-	"PR lib/32951: %.0f formats (0.0,0.5] to \"0.\"");
+	"PR lib/32951: %%.0f formats (0.0,0.5] to \"0.\"");
 }
 
 ATF_TC_BODY(snprintf_dotzero, tc)

Index: src/tests/lib/libc/stdio/t_scanf.c
diff -u src/tests/lib/libc/stdio/t_scanf.c:1.1 src/tests/lib/libc/stdio/t_scanf.c:1.2
--- src/tests/lib/libc/stdio/t_scanf.c:1.1	Fri Jul  8 06:38:04 2011
+++ src/tests/lib/libc/stdio/t_scanf.c	Thu Mar 15 01:44:44 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: t_scanf.c,v 1.1 2011/07/08 06:38:04 jruoho Exp $ */
+/* $NetBSD: t_scanf.c,v 1.2 2012/03/15 01:44:44 joerg Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@ ATF_TC_HEAD(sscanf_neghex, tc)
 {
 
 	atf_tc_set_md_var(tc, "descr", \
-	"PR lib/21691: %i and %x fail with negative hex numbers");
+	"PR lib/21691: %%i and %%x fail with negative hex numbers");
 }
 
 ATF_TC_BODY(sscanf_neghex, tc)



CVS commit: src/tests/lib/libc/gen

2012-03-14 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Mar 15 01:44:08 UTC 2012

Modified Files:
src/tests/lib/libc/gen: t_humanize_number.c

Log Message:
Mark w_printf as __printflike and fix a format string error.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libc/gen/t_humanize_number.c

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

Modified files:

Index: src/tests/lib/libc/gen/t_humanize_number.c
diff -u src/tests/lib/libc/gen/t_humanize_number.c:1.5 src/tests/lib/libc/gen/t_humanize_number.c:1.6
--- src/tests/lib/libc/gen/t_humanize_number.c:1.5	Thu Jul  7 09:49:59 2011
+++ src/tests/lib/libc/gen/t_humanize_number.c	Thu Mar 15 01:44:07 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_humanize_number.c,v 1.5 2011/07/07 09:49:59 jruoho Exp $	*/
+/*	$NetBSD: t_humanize_number.c,v 1.6 2012/03/15 01:44:07 joerg Exp $	*/
 
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
@@ -112,7 +112,7 @@ const struct hnflags normal_flags[] = {
 
 const char *formatflags(char *, size_t, const struct hnflags *, size_t, int);
 void	newline(void);
-void	w_printf(const char *, ...);
+void	w_printf(const char *, ...) __printflike(1, 2);
 int	main(int, char *[]);
 
 const char *
@@ -226,7 +226,7 @@ ATF_TC_BODY(humanize_number_basic, tc)
 		(rv == -1 || strcmp(buf, ho->ho_retstr) == 0))
 			continue;
 
-		w_printf("humanize_number(\"%s\", %d, %" PRId64 ",",
+		w_printf("humanize_number(\"%s\", %zu, %" PRId64 ",",
 		ho->ho_retstr, ho->ho_len, ho->ho_num);
 		w_printf("\"%s\",", ho->ho_suffix);
 		w_printf("%s,", formatflags(fbuf, sizeof(fbuf), scale_flags,



CVS commit: src/external/mit/lua/dist/src

2012-03-14 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Thu Mar 15 01:02:20 UTC 2012

Modified Files:
src/external/mit/lua/dist/src: luaconf.h

Log Message:
Don't overwrite Roberto's external $Id.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/mit/lua/dist/src/luaconf.h

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

Modified files:

Index: src/external/mit/lua/dist/src/luaconf.h
diff -u src/external/mit/lua/dist/src/luaconf.h:1.3 src/external/mit/lua/dist/src/luaconf.h:1.4
--- src/external/mit/lua/dist/src/luaconf.h:1.3	Thu Mar 15 00:17:22 2012
+++ src/external/mit/lua/dist/src/luaconf.h	Thu Mar 15 01:02:19 2012
@@ -1,7 +1,7 @@
-/*	$NetBSD: luaconf.h,v 1.3 2012/03/15 00:17:22 alnsn Exp $	*/
+/*	$NetBSD: luaconf.h,v 1.4 2012/03/15 01:02:19 alnsn Exp $	*/
 
 /*
-** $Id: luaconf.h,v 1.3 2012/03/15 00:17:22 alnsn Exp $
+** Id: luaconf.h,v 1.82.1.7 2008/02/11 16:25:08 roberto Exp $
 ** Configuration file for Lua
 ** See Copyright Notice in lua.h
 */



CVS commit: src/sys/net

2012-03-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Mar 15 00:57:56 UTC 2012

Modified Files:
src/sys/net: bpf.h

Log Message:
add {__BEGIN,__END}_DECLS


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/net/bpf.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/net/bpf.h
diff -u src/sys/net/bpf.h:1.58 src/sys/net/bpf.h:1.59
--- src/sys/net/bpf.h:1.58	Tue Aug 30 10:22:22 2011
+++ src/sys/net/bpf.h	Wed Mar 14 20:57:56 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: bpf.h,v 1.58 2011/08/30 14:22:22 bouyer Exp $	*/
+/*	$NetBSD: bpf.h,v 1.59 2012/03/15 00:57:56 christos Exp $	*/
 
 /*
  * Copyright (c) 1990, 1991, 1993
@@ -45,6 +45,8 @@
 /* BSD style release date */
 #define BPF_RELEASE 199606
 
+__BEGIN_DECLS
+
 typedef	int bpf_int32;
 typedef	u_int bpf_u_int32;
 
@@ -381,6 +383,8 @@ void	 bpfilterattach(int);
 int	 bpf_validate(const struct bpf_insn *, int);
 u_int	 bpf_filter(const struct bpf_insn *, const u_char *, u_int, u_int);
 
+__END_DECLS
+
 /*
  * Number of scratch memory words (for BPF_LD|BPF_MEM and BPF_ST).
  */



CVS commit: src/external/mit/lua/dist/src

2012-03-14 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Thu Mar 15 00:17:22 UTC 2012

Modified Files:
src/external/mit/lua/dist/src: luaconf.h

Log Message:
Resolve conflicts.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/mit/lua/dist/src/luaconf.h

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

Modified files:

Index: src/external/mit/lua/dist/src/luaconf.h
diff -u src/external/mit/lua/dist/src/luaconf.h:1.2 src/external/mit/lua/dist/src/luaconf.h:1.3
--- src/external/mit/lua/dist/src/luaconf.h:1.2	Sun Oct 31 11:19:42 2010
+++ src/external/mit/lua/dist/src/luaconf.h	Thu Mar 15 00:17:22 2012
@@ -1,7 +1,7 @@
-/*	$NetBSD: luaconf.h,v 1.2 2010/10/31 11:19:42 mbalmer Exp $ */
+/*	$NetBSD: luaconf.h,v 1.3 2012/03/15 00:17:22 alnsn Exp $	*/
 
 /*
-** Id: luaconf.h,v 1.82.1.7 2008/02/11 16:25:08 roberto Exp $
+** $Id: luaconf.h,v 1.3 2012/03/15 00:17:22 alnsn Exp $
 ** Configuration file for Lua
 ** See Copyright Notice in lua.h
 */



CVS commit: src/libexec/ld.elf_so

2012-03-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Mar 15 00:16:07 UTC 2012

Modified Files:
src/libexec/ld.elf_so: Makefile
Added Files:
src/libexec/ld.elf_so: diagassert.c

Log Message:
Add __diagassert13() so that if libc is compiled with _DIAGNOSTIC, it does
not end up bringing in all of stdio.
XXX: This is temporary.


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/libexec/ld.elf_so/Makefile
cvs rdiff -u -r0 -r1.1 src/libexec/ld.elf_so/diagassert.c

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

Modified files:

Index: src/libexec/ld.elf_so/Makefile
diff -u src/libexec/ld.elf_so/Makefile:1.110 src/libexec/ld.elf_so/Makefile:1.111
--- src/libexec/ld.elf_so/Makefile:1.110	Fri Oct  7 05:15:21 2011
+++ src/libexec/ld.elf_so/Makefile	Wed Mar 14 20:16:07 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.110 2011/10/07 09:15:21 mrg Exp $
+#	$NetBSD: Makefile,v 1.111 2012/03/15 00:16:07 christos Exp $
 #
 # NOTE: when changing ld.so, ensure that ldd still compiles.
 #
@@ -63,7 +63,7 @@ CLIBOBJ!=	cd ${NETBSDSRCDIR}/lib/libc &&
 
 SRCS+=		rtld.c reloc.c symbol.c xmalloc.c xprintf.c debug.c \
 		map_object.c load.c search.c headers.c paths.c expand.c \
-		tls.c symver.c
+		tls.c symver.c diagassert.c
 
 .if ${USE_FORT} == "yes"
 .PATH.c: ${NETBSDSRCDIR}/lib/libc/misc

Added files:

Index: src/libexec/ld.elf_so/diagassert.c
diff -u /dev/null src/libexec/ld.elf_so/diagassert.c:1.1
--- /dev/null	Wed Mar 14 20:16:07 2012
+++ src/libexec/ld.elf_so/diagassert.c	Wed Mar 14 20:16:07 2012
@@ -0,0 +1,9 @@
+#include 
+#include 
+
+void
+/*ARGSUSED*/
+__diagassert13(const char *fn, int fl, const char *fu, const char *m)
+{
+	abort();
+}



CVS commit: src/sys/sys

2012-03-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Mar 15 00:09:08 UTC 2012

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

Log Message:
- this file is still used from assembly. protect inlines against __ASSEMBLER__
- rename __zero -> __zeroll, __negative -> __negative_p


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/sys/sys/cdefs.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/cdefs.h
diff -u src/sys/sys/cdefs.h:1.93 src/sys/sys/cdefs.h:1.94
--- src/sys/sys/cdefs.h:1.93	Tue Mar 13 17:07:28 2012
+++ src/sys/sys/cdefs.h	Wed Mar 14 20:09:08 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cdefs.h,v 1.93 2012/03/13 21:07:28 christos Exp $	*/
+/*	$NetBSD: cdefs.h,v 1.94 2012/03/15 00:09:08 christos Exp $	*/
 
 /*
  * Copyright (c) 1991, 1993
@@ -533,8 +533,13 @@
 #define __type_mask(t) (/*LINTED*/sizeof(t) < sizeof(intmax_t) ? \
 (~((1ULL << (sizeof(t) * NBBY)) - 1)) : 0ULL)
 
-static inline long long __zero(void) { return 0; }
-static __inline int __negative(double x) { return x < 0; }
+#ifndef __ASSEMBLER__
+static inline long long __zeroll(void) { return 0; }
+static inline int __negative_p(double x) { return x < 0; }
+#else
+#define __zeroll() (0LL)
+#define __negative_p(x) ((x) < 0)
+#endif
 
 #define __type_min_s(t) ((t)((1ULL << (sizeof(t) * NBBY - 1
 #define __type_max_s(t) ((t)~((1ULL << (sizeof(t) * NBBY - 1
@@ -546,11 +551,11 @@ static __inline int __negative(double x)
 
 
 #define __type_fit_u(t, a) (/*LINTED*/sizeof(t) < sizeof(intmax_t) ? \
-(((a) & __type_mask(t)) == 0) : !__negative(a))
+(((a) & __type_mask(t)) == 0) : !__negative_p(a))
 
-#define __type_fit_s(t, a) (/*LINTED*/__negative(a) ? \
-((intmax_t)((a) + __zero()) >= (intmax_t)__type_min_s(t)) : \
-((intmax_t)((a) + __zero()) <= (intmax_t)__type_max_s(t)))
+#define __type_fit_s(t, a) (/*LINTED*/__negative_p(a) ? \
+((intmax_t)((a) + __zeroll()) >= (intmax_t)__type_min_s(t)) : \
+((intmax_t)((a) + __zeroll()) <= (intmax_t)__type_max_s(t)))
 
 /*
  * return true if value 'a' fits in type 't'



CVS commit: src/external/mit/lua/dist

2012-03-14 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Thu Mar 15 00:08:23 UTC 2012

Update of /cvsroot/src/external/mit/lua/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv19419

Log Message:
Import Lua 5.1.5

Status:

Vendor Tag: LUA
Release Tags:   LUA_5_1_5

U src/external/mit/lua/dist/COPYRIGHT
U src/external/mit/lua/dist/HISTORY
U src/external/mit/lua/dist/INSTALL
U src/external/mit/lua/dist/Makefile
U src/external/mit/lua/dist/README
U src/external/mit/lua/dist/src/lundump.h
U src/external/mit/lua/dist/src/linit.c
U src/external/mit/lua/dist/src/lstate.h
U src/external/mit/lua/dist/src/lstring.h
U src/external/mit/lua/dist/src/liolib.c
U src/external/mit/lua/dist/src/lcode.h
U src/external/mit/lua/dist/src/lfunc.h
C src/external/mit/lua/dist/src/luaconf.h
U src/external/mit/lua/dist/src/lvm.c
U src/external/mit/lua/dist/src/lmathlib.c
U src/external/mit/lua/dist/src/lbaselib.c
U src/external/mit/lua/dist/src/lmem.h
U src/external/mit/lua/dist/src/lopcodes.c
U src/external/mit/lua/dist/src/ltm.h
U src/external/mit/lua/dist/src/lparser.c
U src/external/mit/lua/dist/src/lmem.c
U src/external/mit/lua/dist/src/lobject.h
U src/external/mit/lua/dist/src/ltablib.c
U src/external/mit/lua/dist/src/ldebug.c
U src/external/mit/lua/dist/src/lauxlib.h
U src/external/mit/lua/dist/src/lstring.c
U src/external/mit/lua/dist/src/ltable.c
U src/external/mit/lua/dist/src/ldo.c
U src/external/mit/lua/dist/src/ldo.h
U src/external/mit/lua/dist/src/lauxlib.c
U src/external/mit/lua/dist/src/lvm.h
U src/external/mit/lua/dist/src/lobject.c
U src/external/mit/lua/dist/src/Makefile
U src/external/mit/lua/dist/src/lgc.h
U src/external/mit/lua/dist/src/lapi.c
U src/external/mit/lua/dist/src/lualib.h
U src/external/mit/lua/dist/src/ldblib.c
U src/external/mit/lua/dist/src/lfunc.c
U src/external/mit/lua/dist/src/lparser.h
U src/external/mit/lua/dist/src/lua.c
U src/external/mit/lua/dist/src/ltable.h
U src/external/mit/lua/dist/src/lcode.c
U src/external/mit/lua/dist/src/lstrlib.c
U src/external/mit/lua/dist/src/loadlib.c
U src/external/mit/lua/dist/src/llex.h
U src/external/mit/lua/dist/src/ltm.c
U src/external/mit/lua/dist/src/llimits.h
U src/external/mit/lua/dist/src/print.c
U src/external/mit/lua/dist/src/ldump.c
U src/external/mit/lua/dist/src/lgc.c
U src/external/mit/lua/dist/src/llex.c
U src/external/mit/lua/dist/src/lapi.h
U src/external/mit/lua/dist/src/loslib.c
U src/external/mit/lua/dist/src/lua.h
U src/external/mit/lua/dist/src/lundump.c
U src/external/mit/lua/dist/src/lopcodes.h
U src/external/mit/lua/dist/src/lstate.c
U src/external/mit/lua/dist/src/lzio.c
U src/external/mit/lua/dist/src/lzio.h
U src/external/mit/lua/dist/src/ldebug.h
U src/external/mit/lua/dist/src/luac.c
U src/external/mit/lua/dist/etc/min.c
U src/external/mit/lua/dist/etc/noparser.c
U src/external/mit/lua/dist/etc/lua.hpp
U src/external/mit/lua/dist/etc/all.c
U src/external/mit/lua/dist/etc/strict.lua
U src/external/mit/lua/dist/etc/lua.pc
U src/external/mit/lua/dist/etc/Makefile
N src/external/mit/lua/dist/etc/lua.ico
U src/external/mit/lua/dist/etc/README
U src/external/mit/lua/dist/etc/luavs.bat
U src/external/mit/lua/dist/test/luac.lua
U src/external/mit/lua/dist/test/sieve.lua
U src/external/mit/lua/dist/test/printf.lua
U src/external/mit/lua/dist/test/hello.lua
U src/external/mit/lua/dist/test/trace-globals.lua
U src/external/mit/lua/dist/test/cf.lua
U src/external/mit/lua/dist/test/globals.lua
U src/external/mit/lua/dist/test/fib.lua
U src/external/mit/lua/dist/test/env.lua
U src/external/mit/lua/dist/test/life.lua
U src/external/mit/lua/dist/test/table.lua
U src/external/mit/lua/dist/test/factorial.lua
U src/external/mit/lua/dist/test/readonly.lua
U src/external/mit/lua/dist/test/bisect.lua
U src/external/mit/lua/dist/test/xd.lua
U src/external/mit/lua/dist/test/trace-calls.lua
U src/external/mit/lua/dist/test/fibfor.lua
U src/external/mit/lua/dist/test/sort.lua
U src/external/mit/lua/dist/test/README
U src/external/mit/lua/dist/test/echo.lua
U src/external/mit/lua/dist/doc/luac.html
U src/external/mit/lua/dist/doc/readme.html
N src/external/mit/lua/dist/doc/logo.gif
U src/external/mit/lua/dist/doc/lua.css
U src/external/mit/lua/dist/doc/lua.1
U src/external/mit/lua/dist/doc/manual.css
N src/external/mit/lua/dist/doc/cover.png
U src/external/mit/lua/dist/doc/manual.html
U src/external/mit/lua/dist/doc/lua.html
U src/external/mit/lua/dist/doc/contents.html
U src/external/mit/lua/dist/doc/luac.1

1 conflicts created by this import.
Use the following command to help the merge:

cvs checkout -jLUA:yesterday -jLUA src/external/mit/lua/dist



CVS commit: src/libexec/httpd

2012-03-14 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Wed Mar 14 23:47:20 UTC 2012

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

Log Message:
Add BOZO_PRINTFLIKE for functions that pass an argument and va_arg to
a vprintf-like function.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/libexec/httpd/bozohttpd.h
cvs rdiff -u -r1.14 -r1.15 src/libexec/httpd/ssl-bozo.c

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

Modified files:

Index: src/libexec/httpd/bozohttpd.h
diff -u src/libexec/httpd/bozohttpd.h:1.21 src/libexec/httpd/bozohttpd.h:1.22
--- src/libexec/httpd/bozohttpd.h:1.21	Mon Feb 20 09:26:56 2012
+++ src/libexec/httpd/bozohttpd.h	Wed Mar 14 23:47:19 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: bozohttpd.h,v 1.21 2012/02/20 09:26:56 elric Exp $	*/
+/*	$NetBSD: bozohttpd.h,v 1.22 2012/03/14 23:47:19 joerg Exp $	*/
 
 /*	$eterna: bozohttpd.h,v 1.39 2011/11/18 09:21:15 mrg Exp $	*/
 
@@ -164,19 +164,18 @@ typedef struct bozoprefs_t {
 
 #define	strornull(x)	((x) ? (x) : "")
 
+#if defined(__GNUC__) && __GNUC__ >= 3
+#define BOZO_PRINTFLIKE(x,y) __attribute__((__format__(__printf__, x,y)))
+#define BOZO_DEAD __attribute__((__noreturn__))
+#endif
+
 #ifndef NO_DEBUG
-void	debug__(bozohttpd_t *, int, const char *, ...)
-			__attribute__((__format__(__printf__, 3, 4)));
+void	debug__(bozohttpd_t *, int, const char *, ...) BOZO_PRINTFLIKE(3, 4);
 #define debug(x)	debug__ x
 #else
 #define	debug(x)	
 #endif /* NO_DEBUG */
 
-#if defined(__GNUC__) && __GNUC__ >= 3
-#define BOZO_PRINTFLIKE(x,y) __attribute__((__format__(__printf__, x,y)))
-#define BOZO_DEAD __attribute__((__noreturn__))
-#endif
-
 void	bozo_warn(bozohttpd_t *, const char *, ...)
 		BOZO_PRINTFLIKE(2, 3);
 void	bozo_err(bozohttpd_t *, int, const char *, ...)
@@ -278,7 +277,7 @@ void	bozo_add_content_map_mime(bozohttpd
 #endif
 
 /* I/O */
-int bozo_printf(bozohttpd_t *, const char *, ...);
+int bozo_printf(bozohttpd_t *, const char *, ...) BOZO_PRINTFLIKE(2, 3);;
 ssize_t bozo_read(bozohttpd_t *, int, void *, size_t);
 ssize_t bozo_write(bozohttpd_t *, int, const void *, size_t);
 int bozo_flush(bozohttpd_t *, FILE *);

Index: src/libexec/httpd/ssl-bozo.c
diff -u src/libexec/httpd/ssl-bozo.c:1.14 src/libexec/httpd/ssl-bozo.c:1.15
--- src/libexec/httpd/ssl-bozo.c:1.14	Mon Feb 20 08:40:46 2012
+++ src/libexec/httpd/ssl-bozo.c	Wed Mar 14 23:47:19 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ssl-bozo.c,v 1.14 2012/02/20 08:40:46 elric Exp $	*/
+/*	$NetBSD: ssl-bozo.c,v 1.15 2012/03/14 23:47:19 joerg Exp $	*/
 
 /*	$eterna: ssl-bozo.c,v 1.15 2011/11/18 09:21:15 mrg Exp $	*/
 
@@ -64,7 +64,7 @@ typedef struct sslinfo_t {
  * the error provided by the caller at the point of error it pops and
  * prints all errors from the SSL error queue.
  */
-BOZO_DEAD static void
+BOZO_PRINTFLIKE(3, 4) BOZO_DEAD static void
 bozo_ssl_err(bozohttpd_t *httpd, int code, const char *fmt, ...)
 {
 va_list ap;
@@ -96,7 +96,7 @@ bozo_ssl_err(bozohttpd_t *httpd, int cod
 	exit(code);
 }
 
-static int
+static BOZO_PRINTFLIKE(2, 0) int
 bozo_ssl_printf(bozohttpd_t *httpd, const char * fmt, va_list ap)
 {
 	sslinfo_t	*sslinfo;



CVS commit: src/lib/libc/arch/sparc64/softfloat

2012-03-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Mar 14 17:03:11 UTC 2012

Modified Files:
src/lib/libc/arch/sparc64/softfloat: qp.c

Log Message:
Rename __zero to __sf128_zero to avoid clashes with the strange new
inline function in cdefs.h


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/lib/libc/arch/sparc64/softfloat/qp.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/libc/arch/sparc64/softfloat/qp.c
diff -u src/lib/libc/arch/sparc64/softfloat/qp.c:1.7 src/lib/libc/arch/sparc64/softfloat/qp.c:1.8
--- src/lib/libc/arch/sparc64/softfloat/qp.c:1.7	Mon Apr 28 20:22:57 2008
+++ src/lib/libc/arch/sparc64/softfloat/qp.c	Wed Mar 14 17:03:10 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: qp.c,v 1.7 2008/04/28 20:22:57 martin Exp $ */
+/* $NetBSD: qp.c,v 1.8 2012/03/14 17:03:10 martin Exp $ */
 
 /*-
  * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc.
@@ -168,12 +168,12 @@ _Qp_mul(float128 *c, float128 *a, float1
 /*
  * XXX need corresponding softfloat function
  */
-static float128 __zero = {0x4034, 0x};
+static float128 __sf128_zero = {0x4034, 0x};
 
 void
 _Qp_neg(float128 *c, float128 *a)
 {
-	*c = float128_sub(__zero, *a);
+	*c = float128_sub(__sf128_zero, *a);
 }
 
 



CVS commit: src/common/lib/libc/arch/mips/atomic

2012-03-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 14 16:50:34 UTC 2012

Modified Files:
src/common/lib/libc/arch/mips/atomic: atomic_add.S atomic_and.S
atomic_cas.S atomic_dec.S atomic_inc.S atomic_or.S atomic_swap.S

Log Message:
don't include  from assembly.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/arch/mips/atomic/atomic_add.S \
src/common/lib/libc/arch/mips/atomic/atomic_and.S \
src/common/lib/libc/arch/mips/atomic/atomic_dec.S \
src/common/lib/libc/arch/mips/atomic/atomic_inc.S \
src/common/lib/libc/arch/mips/atomic/atomic_or.S \
src/common/lib/libc/arch/mips/atomic/atomic_swap.S
cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/mips/atomic/atomic_cas.S

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/arch/mips/atomic/atomic_add.S
diff -u src/common/lib/libc/arch/mips/atomic/atomic_add.S:1.3 src/common/lib/libc/arch/mips/atomic/atomic_add.S:1.4
--- src/common/lib/libc/arch/mips/atomic/atomic_add.S:1.3	Sat Aug 27 09:23:52 2011
+++ src/common/lib/libc/arch/mips/atomic/atomic_add.S	Wed Mar 14 12:50:34 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: atomic_add.S,v 1.3 2011/08/27 13:23:52 bouyer Exp $	*/
+/*	$NetBSD: atomic_add.S,v 1.4 2012/03/14 16:50:34 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -26,11 +26,10 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include 
 #include 
 #include "atomic_op_asm.h"
 
-RCSID("$NetBSD: atomic_add.S,v 1.3 2011/08/27 13:23:52 bouyer Exp $")
+RCSID("$NetBSD: atomic_add.S,v 1.4 2012/03/14 16:50:34 christos Exp $")
 
 	.text
 	.set	noreorder
Index: src/common/lib/libc/arch/mips/atomic/atomic_and.S
diff -u src/common/lib/libc/arch/mips/atomic/atomic_and.S:1.3 src/common/lib/libc/arch/mips/atomic/atomic_and.S:1.4
--- src/common/lib/libc/arch/mips/atomic/atomic_and.S:1.3	Sat Aug 27 09:23:52 2011
+++ src/common/lib/libc/arch/mips/atomic/atomic_and.S	Wed Mar 14 12:50:34 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: atomic_and.S,v 1.3 2011/08/27 13:23:52 bouyer Exp $	*/
+/*	$NetBSD: atomic_and.S,v 1.4 2012/03/14 16:50:34 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -26,11 +26,10 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include 
 #include 
 #include "atomic_op_asm.h"
 
-RCSID("$NetBSD: atomic_and.S,v 1.3 2011/08/27 13:23:52 bouyer Exp $")
+RCSID("$NetBSD: atomic_and.S,v 1.4 2012/03/14 16:50:34 christos Exp $")
 
 	.text
 	.set	noreorder
Index: src/common/lib/libc/arch/mips/atomic/atomic_dec.S
diff -u src/common/lib/libc/arch/mips/atomic/atomic_dec.S:1.3 src/common/lib/libc/arch/mips/atomic/atomic_dec.S:1.4
--- src/common/lib/libc/arch/mips/atomic/atomic_dec.S:1.3	Sat Aug 27 09:23:52 2011
+++ src/common/lib/libc/arch/mips/atomic/atomic_dec.S	Wed Mar 14 12:50:34 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: atomic_dec.S,v 1.3 2011/08/27 13:23:52 bouyer Exp $	*/
+/*	$NetBSD: atomic_dec.S,v 1.4 2012/03/14 16:50:34 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -26,11 +26,10 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include 
 #include 
 #include "atomic_op_asm.h"
 
-RCSID("$NetBSD: atomic_dec.S,v 1.3 2011/08/27 13:23:52 bouyer Exp $")
+RCSID("$NetBSD: atomic_dec.S,v 1.4 2012/03/14 16:50:34 christos Exp $")
 
 	.text
 	.set	noreorder
Index: src/common/lib/libc/arch/mips/atomic/atomic_inc.S
diff -u src/common/lib/libc/arch/mips/atomic/atomic_inc.S:1.3 src/common/lib/libc/arch/mips/atomic/atomic_inc.S:1.4
--- src/common/lib/libc/arch/mips/atomic/atomic_inc.S:1.3	Sat Aug 27 09:23:52 2011
+++ src/common/lib/libc/arch/mips/atomic/atomic_inc.S	Wed Mar 14 12:50:34 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: atomic_inc.S,v 1.3 2011/08/27 13:23:52 bouyer Exp $	*/
+/*	$NetBSD: atomic_inc.S,v 1.4 2012/03/14 16:50:34 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -26,11 +26,10 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include 
 #include 
 #include "atomic_op_asm.h"
 
-RCSID("$NetBSD: atomic_inc.S,v 1.3 2011/08/27 13:23:52 bouyer Exp $")
+RCSID("$NetBSD: atomic_inc.S,v 1.4 2012/03/14 16:50:34 christos Exp $")
 
 	.text
 	.set	noreorder
Index: src/common/lib/libc/arch/mips/atomic/atomic_or.S
diff -u src/common/lib/libc/arch/mips/atomic/atomic_or.S:1.3 src/common/lib/libc/arch/mips/atomic/atomic_or.S:1.4
--- src/common/lib/libc/arch/mips/atomic/atomic_or.S:1.3	Sat Aug 27 09:23:52 2011
+++ src/common/lib/libc/arch/mips/atomic/atomic_or.S	Wed Mar 14 12:50:34 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: atomic_or.S,v 1.3 2011/08/27 13:23:52 bouyer Exp $	*/
+/*	$NetBSD: atomic_or.S,v 1.4 2012/03/14 16:50:34 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -26,7 +26,6 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include 
 #include 
 #include "atomic_op_asm.h"
 
Index: src/common/lib/libc/arch/mips/atomic/atomic_swap.S
diff -u src/common/lib/libc/arch/mips/atomic/atomic_swap.S:1.3 src/common/lib/l

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

2012-03-14 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Mar 14 14:18:11 UTC 2012

Modified Files:
src/lib/libc/arch/hppa/sys: brk.S sbrk.S

Log Message:
Use the _end symbol rather than the end symbol.  Prevents version info
problems in elflink.c for the heimdal libraries.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/libc/arch/hppa/sys/brk.S \
src/lib/libc/arch/hppa/sys/sbrk.S

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

Modified files:

Index: src/lib/libc/arch/hppa/sys/brk.S
diff -u src/lib/libc/arch/hppa/sys/brk.S:1.4 src/lib/libc/arch/hppa/sys/brk.S:1.5
--- src/lib/libc/arch/hppa/sys/brk.S:1.4	Tue Nov  3 05:07:25 2009
+++ src/lib/libc/arch/hppa/sys/brk.S	Wed Mar 14 14:18:10 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: brk.S,v 1.4 2009/11/03 05:07:25 snj Exp $	*/
+/*	$NetBSD: brk.S,v 1.5 2012/03/14 14:18:10 skrll Exp $	*/
 
 /*	$OpenBSD: brk.S,v 1.7 2001/06/04 23:14:04 mickey Exp $	*/
 
@@ -31,11 +31,11 @@
 #include "SYS.h"
 
 #if defined(LIBC_SCCS) && !defined(lint)
-	RCSID("$NetBSD: brk.S,v 1.4 2009/11/03 05:07:25 snj Exp $")
+	RCSID("$NetBSD: brk.S,v 1.5 2012/03/14 14:18:10 skrll Exp $")
 #endif /* LIBC_SCCS and not lint */
 
 	.import	curbrk, data
-	.import	end, data
+	.global	_end
 
 #ifdef WEAK_ALIAS
 	WEAK_ALIAS(brk, _brk) 
@@ -44,7 +44,7 @@
 	.data
 	.export	__minbrk, data
 __minbrk:
-	.long	end
+	.long	_end
 
 ENTRY(_brk,0)
 #ifdef PIC
Index: src/lib/libc/arch/hppa/sys/sbrk.S
diff -u src/lib/libc/arch/hppa/sys/sbrk.S:1.4 src/lib/libc/arch/hppa/sys/sbrk.S:1.5
--- src/lib/libc/arch/hppa/sys/sbrk.S:1.4	Tue Nov  3 05:07:25 2009
+++ src/lib/libc/arch/hppa/sys/sbrk.S	Wed Mar 14 14:18:10 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: sbrk.S,v 1.4 2009/11/03 05:07:25 snj Exp $	*/
+/*	$NetBSD: sbrk.S,v 1.5 2012/03/14 14:18:10 skrll Exp $	*/
 
 /*	$OpenBSD: sbrk.S,v 1.7 2001/06/04 23:14:04 mickey Exp $	*/
 
@@ -31,10 +31,10 @@
 #include "SYS.h"
 
 #if defined(LIBC_SCCS) && !defined(lint)
-	RCSID("$NetBSD: sbrk.S,v 1.4 2009/11/03 05:07:25 snj Exp $")
+	RCSID("$NetBSD: sbrk.S,v 1.5 2012/03/14 14:18:10 skrll Exp $")
 #endif /* LIBC_SCCS and not lint */
 
-	.import	end, data
+	.global	_end
 
 #ifdef WEAK_ALIAS
 	WEAK_ALIAS(sbrk, _sbrk)
@@ -43,7 +43,7 @@
 	.data
 	.export	curbrk, data
 curbrk:
-	.long	end
+	.long	_end
 
 ENTRY(_sbrk,0)
 #ifdef PIC



CVS commit: xsrc/external/mit/xf86-video-sis/dist/src

2012-03-14 Thread Martin Husemann
Module Name:xsrc
Committed By:   martin
Date:   Wed Mar 14 13:47:40 UTC 2012

Modified Files:
xsrc/external/mit/xf86-video-sis/dist/src: sis_driver.c

Log Message:
henning petersen in PR xsrc/46172: do not used removed function
miPointerAbsoluteCursor(), replace with miPointerSetPosition().


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 \
xsrc/external/mit/xf86-video-sis/dist/src/sis_driver.c

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

Modified files:

Index: xsrc/external/mit/xf86-video-sis/dist/src/sis_driver.c
diff -u xsrc/external/mit/xf86-video-sis/dist/src/sis_driver.c:1.1.1.4 xsrc/external/mit/xf86-video-sis/dist/src/sis_driver.c:1.2
--- xsrc/external/mit/xf86-video-sis/dist/src/sis_driver.c:1.1.1.4	Sat Jul 17 06:32:06 2010
+++ xsrc/external/mit/xf86-video-sis/dist/src/sis_driver.c	Wed Mar 14 13:47:40 2012
@@ -86,6 +86,7 @@
 #include 
 #endif
 
+#include 
 
 #ifdef XF86DRI
 #include "dri.h"
@@ -9322,9 +9323,8 @@ SISMergedPointerMoved(int scrnIndex, int
 	}
  }
  if(doit) {
-	UpdateCurrentTime();
 	sigstate = xf86BlockSIGIO();
-	miPointerAbsoluteCursor(x, y, currentTime.milliseconds);
+	miPointerSetPosition(inputInfo.pointer, x, y);
 	xf86UnblockSIGIO(sigstate);
 	return;
  }



CVS commit: src/sys/dev/pci

2012-03-14 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Wed Mar 14 13:41:07 UTC 2012

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

Log Message:
lynxfb too.

> Replace the remaining KAUTH_GENERIC_ISSUSER authorization calls with
> something meaningful. All relevant documentation has been updated or
> written.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/pci/lynxfb.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/lynxfb.c
diff -u src/sys/dev/pci/lynxfb.c:1.3 src/sys/dev/pci/lynxfb.c:1.4
--- src/sys/dev/pci/lynxfb.c:1.3	Sun Mar 11 15:58:56 2012
+++ src/sys/dev/pci/lynxfb.c	Wed Mar 14 13:41:07 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: lynxfb.c,v 1.3 2012/03/11 15:58:56 nonaka Exp $	*/
+/*	$NetBSD: lynxfb.c,v 1.4 2012/03/14 13:41:07 nonaka Exp $	*/
 /*	$OpenBSD: smfb.c,v 1.13 2011/07/21 20:36:12 miod Exp $	*/
 
 /*
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lynxfb.c,v 1.3 2012/03/11 15:58:56 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lynxfb.c,v 1.4 2012/03/14 13:41:07 nonaka Exp $");
 
 #include "opt_wsemul.h"
 
@@ -478,8 +478,8 @@ lynxfb_mmap(void *v, void *vs, off_t off
 	 * restrict all other mappings to processes with superuser privileges
 	 * or the kernel itself
 	 */
-	if (kauth_authorize_generic(kauth_cred_get(), KAUTH_GENERIC_ISSUSER,
-	NULL) != 0) {
+	if (kauth_authorize_machdep(kauth_cred_get(),
+	KAUTH_MACHDEP_UNMANAGEDMEM, NULL, NULL, NULL, NULL) != 0) {
 		aprint_normal_dev(sc->sc_dev, "mmap() rejected.\n");
 		return (-1);
 	}



CVS commit: src

2012-03-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Mar 14 13:26:43 UTC 2012

Modified Files:
src/distrib/sparc/bootfs: Makefile
src/etc/etc.sparc: Makefile.inc

Log Message:
Disable generation of boot floppy images for sparc, which do not fit on
floppy disks anymore, to unbreak the build (for now).
If someone feels like adding and testing ustarfs support in the floppy
/boot, please reenable again.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/distrib/sparc/bootfs/Makefile
cvs rdiff -u -r1.42 -r1.43 src/etc/etc.sparc/Makefile.inc

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

Modified files:

Index: src/distrib/sparc/bootfs/Makefile
diff -u src/distrib/sparc/bootfs/Makefile:1.39 src/distrib/sparc/bootfs/Makefile:1.40
--- src/distrib/sparc/bootfs/Makefile:1.39	Thu Jul 10 10:34:14 2003
+++ src/distrib/sparc/bootfs/Makefile	Wed Mar 14 13:26:43 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.39 2003/07/10 10:34:14 lukem Exp $
+#	$NetBSD: Makefile,v 1.40 2012/03/14 13:26:43 martin Exp $
 #
 # boot.fs is the image for disk 1 of the two-set floppy based installation
 # method.
@@ -13,7 +13,7 @@
 .include 
 
 IMAGE=		boot.fs
-IMAGESIZE=	1440k
+IMAGESIZE=	2880k
 LISTS=		${.CURDIR}/list
 MTREECONF=	${DISTRIBDIR}/common/mtree.dot
 IMAGEENDIAN=	be
@@ -44,14 +44,6 @@ create-aout=\
 
 CLEANFILES+=	netbsd.ram.aout.raw
 
-
-FD?=		fd0
-FD_RDEV=	/dev/r${FD}a
-
-real-floppy:
-	dd if=${IMAGE} of=${FD_RDEV} bs=32k
-
-
 .include "${DISTRIBDIR}/common/Makefile.image"
 .include "${DISTRIBDIR}/common/Makefile.mdset"
 

Index: src/etc/etc.sparc/Makefile.inc
diff -u src/etc/etc.sparc/Makefile.inc:1.42 src/etc/etc.sparc/Makefile.inc:1.43
--- src/etc/etc.sparc/Makefile.inc:1.42	Sun Jan 15 17:36:55 2012
+++ src/etc/etc.sparc/Makefile.inc	Wed Mar 14 13:26:43 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.42 2012/01/15 17:36:55 joerg Exp $
+#	$NetBSD: Makefile.inc,v 1.43 2012/03/14 13:26:43 martin Exp $
 #
 #	etc.sparc/Makefile.inc -- sparc-specific etc Makefile targets
 #
@@ -14,18 +14,24 @@ BUILD_KERNELS=		INSTALL
 MD_INSTALLATION_DIRS=	installation/miniroot	\
 			installation/netboot	\
 			installation/bootfs	\
-			installation/tape	\
-			installation/floppy
+			installation/tape
+
+# XXX floppy overflows, see below (add to above list to re-enable)
+#			installation/floppy
+
 INSTALLATION_DIRS+=	${MD_INSTALLATION_DIRS}
 
 
 INSTALLATION_SYMLINKS=	\
 		tape/tapefile1.gz	../bootfs/netbsd.ram.aout.gz	\
 		tape/tapefile2		../bootfs/instfs.tgz		\
-		floppy/disk1.gz		../bootfs/boot.fs.gz		\
-		floppy/disk2		../bootfs/instfs.tgz		\
 		netboot/rootfs.tgz	../bootfs/instfs.tgz
 
+# XXX - floppy overflows on boot.fs.gz - so disabled for now,
+# add the following to above list to re-enable
+#		floppy/disk1.gz		../bootfs/boot.fs.gz
+#		floppy/disk2		../bootfs/instfs.tgz
+
 #
 # Install miniroot images and auxiliary scripts to the release tree
 #



CVS commit: src/lib/libc/sys

2012-03-14 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Mar 14 13:24:48 UTC 2012

Modified Files:
src/lib/libc/sys: _lwp_ctl.2

Log Message:
Use more markup.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libc/sys/_lwp_ctl.2

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

Modified files:

Index: src/lib/libc/sys/_lwp_ctl.2
diff -u src/lib/libc/sys/_lwp_ctl.2:1.3 src/lib/libc/sys/_lwp_ctl.2:1.4
--- src/lib/libc/sys/_lwp_ctl.2:1.3	Tue Feb 17 18:51:56 2009
+++ src/lib/libc/sys/_lwp_ctl.2	Wed Mar 14 13:24:48 2012
@@ -1,4 +1,4 @@
-.\" $NetBSD: _lwp_ctl.2,v 1.3 2009/02/17 18:51:56 njoly Exp $
+.\" $NetBSD: _lwp_ctl.2,v 1.4 2012/03/14 13:24:48 jruoho Exp $
 .\"
 .\" Copyright (c)2007 YAMAMOTO Takashi,
 .\" All rights reserved.
@@ -25,7 +25,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" 
-.Dd May 5, 2008
+.Dd March 14, 2012
 .Dt _LWP_CTL 2
 .Os
 .Sh NAME
@@ -50,19 +50,25 @@ It takes the following arguments.
 The bitwise-OR of the following flags.
 .Bl -tag -width LWPCTL_FEATURE_CURCPU
 .It Dv LWPCTL_FEATURE_CURCPU
-Request lc_curcpu.
+Request
+.Vt lc_curcpu .
 .It Dv LWPCTL_FEATURE_PCTR
-Request lc_pctr.
+Request
+.Vt lc_pctr .
 .El
 .It Fa address
-The address to store a pointer to lwpctl structure for the calling LWP.
+The address to store a pointer to
+.Vt lwpctl
+structure for the calling LWP.
 .El
 .Pp
-The per-LWP communication area is described by an lwpctl structure.
+The per-LWP communication area is described by an
+.Vt lwpctl
+structure.
 It has following members, depending on
 .Fa features .
 .Bl -tag -width int_lc_curcpu
-.It int lc_curcpu
+.It Vt int lc_curcpu
 The integral identifier of the CPU on which the LWP is running,
 or
 .Dv LWPCTL_CPU_NONE
@@ -72,7 +78,7 @@ userland.
 It's available only if requested with the
 .Dv LWPCTL_FEATURE_CURCPU
 flag.
-.It int lc_pctr
+.It Vt int lc_pctr
 The integer which is incremented on every context switches to the LWP.
 It can be used to detect preemption of the LWP.
 (thus its name "preemption counter".)



CVS commit: src/share/man/man4

2012-03-14 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Mar 14 12:01:53 UTC 2012

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

Log Message:
Fix URL.


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

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

Modified files:

Index: src/share/man/man4/ixg.4
diff -u src/share/man/man4/ixg.4:1.3 src/share/man/man4/ixg.4:1.4
--- src/share/man/man4/ixg.4:1.3	Tue Mar 13 19:25:40 2012
+++ src/share/man/man4/ixg.4	Wed Mar 14 12:01:53 2012
@@ -1,4 +1,4 @@
-.\" $NetBSD: ixg.4,v 1.3 2012/03/13 19:25:40 njoly Exp $
+.\" $NetBSD: ixg.4,v 1.4 2012/03/14 12:01:53 wiz Exp $
 .\"
 .\" Copyright (c) 2001-2008, Intel Corporation
 .\" All rights reserved.
@@ -92,7 +92,7 @@ the network connection (cable).
 .Sh SUPPORT
 For general information and support,
 go to the Intel support website at:
-.Lk http://www.intel.com//support/ .
+.Lk http://www.intel.com/support/ .
 .\" .Pp
 .\" If an issue is identified with the released source code on the supported kernel
 .\" with a supported adapter, email the specific information related to the



CVS commit: src/share/man/man9

2012-03-14 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Mar 14 11:51:54 UTC 2012

Modified Files:
src/share/man/man9: kauth.9

Log Message:
Bump date for previous.
Spell "file system" like in other man pages.
Fix typos.


To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.99 src/share/man/man9/kauth.9

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/kauth.9
diff -u src/share/man/man9/kauth.9:1.98 src/share/man/man9/kauth.9:1.99
--- src/share/man/man9/kauth.9:1.98	Tue Mar 13 18:40:27 2012
+++ src/share/man/man9/kauth.9	Wed Mar 14 11:51:54 2012
@@ -1,4 +1,4 @@
-.\" $NetBSD: kauth.9,v 1.98 2012/03/13 18:40:27 elad Exp $
+.\" $NetBSD: kauth.9,v 1.99 2012/03/14 11:51:54 wiz Exp $
 .\"
 .\" Copyright (c) 2005, 2006 Elad Efrat 
 .\" All rights reserved.
@@ -25,7 +25,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd January 16, 2012
+.Dd March 13, 2012
 .Dt KAUTH 9
 .Os
 .Sh NAME
@@ -208,7 +208,7 @@ Check if operations on the device mapper
 .Xr dm 4
 device are allowed.
 .It Dv KAUTH_SYSTEM_FILEHANDLE
-Check if filehandle operations allowed.
+Check if file handle operations allowed.
 .It Dv KAUTH_SYSTEM_FS_EXTATTR
 Check if starting, stopping, enabling, or disabling extended attributes
 is allowed.
@@ -217,7 +217,7 @@ is a
 .Ft struct mount *
 of the mount-point on which the operation is performed.
 .It Dv KAUTH_SYSTEM_FS_SNAPSHOT
-Check if setting up a file-system snapshot is allowed.
+Check if setting up a file system snapshot is allowed.
 .Ar arg1
 is a
 .Ft struct mount *
@@ -227,12 +227,12 @@ is a
 .Ft struct vnode *
 of the vnode where the snapshot is expected to be.
 .It Dv KAUTH_SYSTEM_FS_QUOTA
-Check if file-system quota operations are allowed.
+Check if file system quota operations are allowed.
 .Pp
 .Ar arg1
 is a
 .Ft struct mount *
-describing the file-system mount in question.
+describing the file system mount in question.
 .Ar req
 can be one of the following:
 .Bl -tag -width compact
@@ -256,7 +256,7 @@ with the user-id of the user whose quota
 Check if bypassing the quota (not enforcing it) is allowed.
 .El
 .It Dv KAUTH_SYSTEM_FS_RESERVEDSPACE
-Check if using the file-system reserved space is allowed.
+Check if using the file system reserved space is allowed.
 .It Dv KAUTH_SYSTEM_LFS
 Check if LFS-related operations are allowed.
 .Ar req
@@ -322,14 +322,14 @@ with the mount structure in question,
 .Ar arg2
 is a
 .Ft void *
-with file-system specific data, if any.
+with file system specific data, if any.
 .It Dv KAUTH_REQ_SYSTEM_MOUNT_NEW
-Check if mounting a new file-system is allowed.
+Check if mounting a new file system is allowed.
 .Pp
 .Ar arg1
 is the
 .Ft struct vnode *
-on which the file-system is to be mounted,
+on which the file system is to be mounted,
 .Ar arg2
 is an
 .Ft int
@@ -337,9 +337,9 @@ with the mount flags, and
 .Ar arg3
 is a
 .Ft void *
-with file-system specific data, if any.
+with file system specific data, if any.
 .It Dv KAUTH_REQ_SYSTEM_MOUNT_UNMOUNT
-Checks if unmounting a file-system is allowed.
+Checks if unmounting a file system is allowed.
 .Pp
 .Ar arg1
 is a
@@ -359,9 +359,9 @@ with the new mount flags, and
 .Ar arg3
 is a
 .Ft void *
-with file-system specific data, if any.
+with file system specific data, if any.
 .It Dv KAUTH_REQ_SYSTEM_MOUNT_UMAP
-Check if mounting the user and group id remapping file-system.
+Check if mounting the user and group id remapping file system.
 See
 .Xr mount_umap 8 .
 .El
@@ -775,7 +775,7 @@ can be one of the following:
 .It Dv KAUTH_REQ_NETWORK_INTERFACE_BRIDGE_GETPRIV
 Check if getting privileges parameters is allowed.
 .It Dv KAUTH_REQ_NETWORK_INTERFACE_BRIDGE_SETPRIV
-Check if setting privileges paramteres is allowed.
+Check if setting privileges parameters is allowed.
 .El
 .It Dv KAUTH_NETWORK_INTERFACE_PPP
 Checks if operations performed on the
@@ -1299,14 +1299,14 @@ Check if setting the default key-repeat 
 .Ss Vnode Scope
 The vnode scope,
 .Dq org.netbsd.kauth.vnode ,
-authorizes operations made on vnodes representing files-system objects.
+authorizes operations made on vnodes representing file system objects.
 .Pp
 The authorization wrapper for this scope is declared as
 .Pp
 .Ft int Fn kauth_authorize_vnode "kauth_cred_t cred" "kauth_action_t action" \
 "vnode_t *vp" "vnode_t *dvp" "int fs_decision"
 .Pp
-This scope is heavily used in file-system code and can potentially affect
+This scope is heavily used in file system code and can potentially affect
 system-wide performance.
 Therefore, there are several things developers should know when using it.
 .Pp
@@ -1316,7 +1316,7 @@ parameter is a bit-mask and multiple act
 in a single call.
 Two helper functions help generate the
 .Ar action
-value for a couple of common cases: translating file-system access to a
+value for a couple

CVS commit: src/tests/lib/libc/sys

2012-03-14 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Mar 14 11:50:53 UTC 2012

Modified Files:
src/tests/lib/libc/sys: t_mincore.c

Log Message:
Skip the ENOMEM/RLIMIT_MEMLOCK case when doing mlockall(2).


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/sys/t_mincore.c

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

Modified files:

Index: src/tests/lib/libc/sys/t_mincore.c
diff -u src/tests/lib/libc/sys/t_mincore.c:1.3 src/tests/lib/libc/sys/t_mincore.c:1.4
--- src/tests/lib/libc/sys/t_mincore.c:1.3	Thu Jul 14 10:24:56 2011
+++ src/tests/lib/libc/sys/t_mincore.c	Wed Mar 14 11:50:52 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: t_mincore.c,v 1.3 2011/07/14 10:24:56 jruoho Exp $ */
+/* $NetBSD: t_mincore.c,v 1.4 2012/03/14 11:50:52 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: t_mincore.c,v 1.3 2011/07/14 10:24:56 jruoho Exp $");
+__RCSID("$NetBSD: t_mincore.c,v 1.4 2012/03/14 11:50:52 jruoho Exp $");
 
 #include 
 #include 
@@ -205,7 +205,12 @@ ATF_TC_BODY(mincore_resid, tc)
 	 * Check that the in-core pages match the locked pages.
 	 */
 	ATF_REQUIRE(check_residency(addr, npgs) == 0);
-	ATF_REQUIRE(mlockall(MCL_CURRENT|MCL_FUTURE) == 0);
+
+	errno = 0;
+
+	if (mlockall(MCL_CURRENT|MCL_FUTURE) != 0 && errno != ENOMEM)
+		atf_tc_fail("mlockall(2) failed");
+
 	ATF_REQUIRE(check_residency(addr, npgs) == npgs);
 
 	addr2 = mmap(NULL, npgs * page, PROT_READ, MAP_ANON, -1, (off_t)0);



CVS commit: src/share/man/man9

2012-03-14 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Mar 14 11:44:42 UTC 2012

Modified Files:
src/share/man/man9: genfs.9

Log Message:
Remove trailing whitespace. Fix typo. Sort.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man9/genfs.9

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/genfs.9
diff -u src/share/man/man9/genfs.9:1.1 src/share/man/man9/genfs.9:1.2
--- src/share/man/man9/genfs.9:1.1	Tue Mar 13 18:40:27 2012
+++ src/share/man/man9/genfs.9	Wed Mar 14 11:44:42 2012
@@ -1,4 +1,4 @@
-.\" $NetBSD: genfs.9,v 1.1 2012/03/13 18:40:27 elad Exp $
+.\" $NetBSD: genfs.9,v 1.2 2012/03/14 11:44:42 wiz Exp $
 .\"
 .\" Copyright 2012 Elad Efrat 
 .\" All rights reserved.
@@ -31,13 +31,16 @@
 .Os
 .Sh NAME
 .Nm genfs
-.Nd genfs routines 
+.Nd genfs routines
 .Sh SYNOPSIS
 .In miscfs/genfs/genfs.h
 .Ft int
 .Fn genfs_can_access "enum vtype type" "mode_t file_mode" "uid_t uid" \
 "gid_t gid" "mode_t acc_mode" "kauth_cred_t cred"
 .Ft int
+.Fn genfs_can_chflags "kauth_cred_t cred" "enum vtype type" "uid_t owner_uid" \
+"bool changing_sysflags"
+.Ft int
 .Fn genfs_can_chmod "enum vtype type" "kauth_cred_t cred" "uid_t cur_uid" \
 "gid_t cur_gid" "mode_t new_mode"
 .Ft int
@@ -47,24 +50,21 @@
 .Fn genfs_can_chtimes "vnode_t *vp" "u_int vaflags" "uid_t owner_uid" \
 "kauth_cred_t cred"
 .Ft int
-.Fn genfs_can_chflags "kauth_cred_t cred" "enum vtype type" "uid_t owner_uid" \
-"bool changing_sysflags"
-.Ft int
-.Fn genfs_can_sticky "kauth_cred_t cred" "uid_t dir_uid" "uid_t file_uid"
-.Ft int
 .Fn genfs_can_extattr "kauth_cred_t cred" "int access_mode" "vnode_t *vp" \
 "const char *attr"
+.Ft int
+.Fn genfs_can_sticky "kauth_cred_t cred" "uid_t dir_uid" "uid_t file_uid"
 .Sh DESCRIPTION
 The functions documented here are general routines for internal use in
-file-systems to implement common policies for performing various operations.
+file systems to implement common policies for performing various operations.
 The developer must understand that these routines implement no system-wide
 policies and only take into account the object being accessed and the
 nominal values of the credentials accessing it.
 .Pp
-In other words, these functions are not meant to be called direcly.
+In other words, these functions are not meant to be called directly.
 They are intended to be used in
 .Xr kauth 9
-vnode scope authorization calls, for providing the fall-back file-system
+vnode scope authorization calls, for providing the fall-back file system
 decision.
 .Pp
 As a rule of thumb, code that looks like this is wrong:
@@ -81,6 +81,11 @@ error = kauth_authorize_vnode(..., genfs
 .It Fn genfs_can_access "enum vtype type" "mode_t file_mode" "uid_t uid" \
 "gid_t gid" "mode_t acc_mode" "kauth_cred_t cred"
 Implements file access checking based on traditional Unix permissions.
+.It Fn genfs_can_chflags "kauth_cred_t cred" "enum vtype type" \
+"uid_t owner_uid" "bool changing_sysflags"
+Implements
+.Xr chflags 2
+policy.
 .It Fn genfs_can_chmod "enum vtype type" "kauth_cred_t cred" "uid_t cur_uid" \
 "gid_t cur_gid" "mode_t new_mode"
 Implements
@@ -96,16 +101,11 @@ policy.
 Implements
 .Xr utimes 2
 policy.
-.It Fn genfs_can_chflags "kauth_cred_t cred" "enum vtype type" \
-"uid_t owner_uid" "bool changing_sysflags"
-Implements
-.Xr chflags 2
-policy.
-.It Fn genfs_can_sticky "kauth_cred_t cred" "uid_t dir_uid" "uid_t file_uid"
-Implements rename and delete policy from sticky directories.
 .It Fn genfs_can_extattr "kauth_cred_t cred" "int access_mode" "vnode_t *vp" \
 "const char *attr"
 Implements extended attributes access policy.
+.It Fn genfs_can_sticky "kauth_cred_t cred" "uid_t dir_uid" "uid_t file_uid"
+Implements rename and delete policy from sticky directories.
 .El
 .Sh SEE ALSO
 .Xr kauth 9