CVS commit: src/sys/dev/pci

2010-09-29 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Sep 30 03:16:51 UTC 2010

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

Log Message:
use the drawing engine to draw characters so we don't have to sync after each
command and don't need to map the framebuffer anymore


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/pci/r128fb.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/r128fb.c
diff -u src/sys/dev/pci/r128fb.c:1.12 src/sys/dev/pci/r128fb.c:1.13
--- src/sys/dev/pci/r128fb.c:1.12	Tue Sep 14 02:11:06 2010
+++ src/sys/dev/pci/r128fb.c	Thu Sep 30 03:16:51 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: r128fb.c,v 1.12 2010/09/14 02:11:06 macallan Exp $	*/
+/*	$NetBSD: r128fb.c,v 1.13 2010/09/30 03:16:51 macallan Exp $	*/
 
 /*
  * Copyright (c) 2007 Michael Lorenz
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: r128fb.c,v 1.12 2010/09/14 02:11:06 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: r128fb.c,v 1.13 2010/09/30 03:16:51 macallan Exp $");
 
 #include 
 #include 
@@ -76,14 +76,12 @@
 	bus_space_tag_t sc_memt;
 	bus_space_tag_t sc_iot;
 
-	bus_space_handle_t sc_fbh;
 	bus_space_handle_t sc_regh;
 	bus_addr_t sc_fb, sc_reg;
 	bus_size_t sc_fbsize, sc_regsize;
 
 	int sc_width, sc_height, sc_depth, sc_stride;
 	int sc_locked, sc_have_backlight, sc_bl_level;
-	void *sc_fbaddr;
 	struct vcons_screen sc_console_screen;
 	struct wsscreen_descr sc_defaultscreen_descr;
 	const struct wsscreen_descr *sc_screens[1];
@@ -124,9 +122,7 @@
 			int, int);
 
 static void	r128fb_cursor(void *, int, int, int);
-#if 0
 static void	r128fb_putchar(void *, int, int, u_int, long);
-#endif
 static void	r128fb_copycols(void *, int, int, int, int);
 static void	r128fb_erasecols(void *, int, int, int, long);
 static void	r128fb_copyrows(void *, int, int, int);
@@ -203,7 +199,7 @@
 	unsigned long		defattr;
 	bool			is_console;
 	int i, j;
-	uint32_t reg;
+	uint32_t reg, flags;
 
 	sc->sc_pc = pa->pa_pc;
 	sc->sc_pcitag = pa->pa_tag;
@@ -236,13 +232,11 @@
 
 	prop_dictionary_get_bool(dict, "is_console", &is_console);
 
-	if (pci_mapreg_map(pa, 0x10, PCI_MAPREG_TYPE_MEM,
-	BUS_SPACE_MAP_LINEAR,
-	&sc->sc_memt, &sc->sc_fbh, &sc->sc_fb, &sc->sc_fbsize)) {
+	if (pci_mapreg_info(pa->pa_pc, pa->pa_tag, 0x10, PCI_MAPREG_TYPE_MEM,
+	&sc->sc_fb, &sc->sc_fbsize, &flags)) {
 		aprint_error("%s: failed to map the frame buffer.\n",
 		device_xname(sc->sc_dev));
 	}
-	sc->sc_fbaddr = bus_space_vaddr(sc->sc_memt, sc->sc_fbh);
 
 	if (pci_mapreg_map(pa, 0x18, PCI_MAPREG_TYPE_MEM, 0,
 	&sc->sc_memt, &sc->sc_regh, &sc->sc_reg, &sc->sc_regsize)) {
@@ -250,10 +244,6 @@
 		device_xname(sc->sc_dev));
 	}
 
-	/*
-	 * XXX yeah, casting the fb address to uint32_t is formally wrong
-	 * but as far as I know there are no mach64 with 64bit BARs
-	 */
 	aprint_normal("%s: %d MB aperture at 0x%08x\n", device_xname(self),
 	(int)(sc->sc_fbsize >> 20), (uint32_t)sc->sc_fb);
 
@@ -385,7 +375,6 @@
 			{
 int new_mode = *(int*)data;
 
-/* notify the bus backend */
 if (new_mode != sc->sc_mode) {
 	sc->sc_mode = new_mode;
 	if(new_mode == WSDISPLAYIO_MODE_EMUL) {
@@ -396,25 +385,25 @@
 			}
 			return 0;
 
-	case WSDISPLAYIO_GETPARAM:
-		param = (struct wsdisplay_param *)data;
-		if ((param->param == WSDISPLAYIO_PARAM_BACKLIGHT) &&
-		(sc->sc_have_backlight != 0)) {
-			param->min = 0;
-			param->max = 255;
-			param->curval = sc->sc_bl_level;
-			return 0;
-		}
-		return EPASSTHROUGH;
+		case WSDISPLAYIO_GETPARAM:
+			param = (struct wsdisplay_param *)data;
+			if ((param->param == WSDISPLAYIO_PARAM_BACKLIGHT) &&
+			(sc->sc_have_backlight != 0)) {
+param->min = 0;
+param->max = 255;
+param->curval = sc->sc_bl_level;
+return 0;
+			}
+			return EPASSTHROUGH;
 
-	case WSDISPLAYIO_SETPARAM:
-		param = (struct wsdisplay_param *)data;
-		if ((param->param == WSDISPLAYIO_PARAM_BACKLIGHT) &&
-		(sc->sc_have_backlight != 0)) {
-			r128fb_set_backlight(sc, param->curval);
-			return 0;
-		}
-		return EPASSTHROUGH;
+		case WSDISPLAYIO_SETPARAM:
+			param = (struct wsdisplay_param *)data;
+			if ((param->param == WSDISPLAYIO_PARAM_BACKLIGHT) &&
+			(sc->sc_have_backlight != 0)) {
+r128fb_set_backlight(sc, param->curval);
+return 0;
+			}
+			return EPASSTHROUGH;
 	}
 	return EPASSTHROUGH;
 }
@@ -488,13 +477,7 @@
 	ri->ri_width = sc->sc_width;
 	ri->ri_height = sc->sc_height;
 	ri->ri_stride = sc->sc_stride;
-	ri->ri_flg = RI_CENTER | RI_FULLCLEAR;
-
-	ri->ri_bits = (char *)sc->sc_fbaddr;
-
-	if (existing) {
-		ri->ri_flg |= RI_CLEAR;
-	}
+	ri->ri_flg = RI_CENTER;
 
 	rasops_init(ri, sc->sc_height / 8, sc->sc_width / 8);
 	ri->ri_caps = WSSCREEN_WSCOLORS;
@@ -508,9 +491,7 @@
 	ri->ri_ops.eraserows = r128fb_eraserows;
 	ri->ri_ops.erasecols = r128fb_erasecols;
 	ri->ri_ops.cursor = r128fb_cursor;
-#if 0
 	ri->ri_ops.putchar = r128fb_

CVS commit: src/sys/dev/pci

2010-09-29 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Sep 30 03:14:40 UTC 2010

Modified Files:
src/sys/dev/pci: r128fbreg.h

Log Message:
add a couple more register definitions, mostly from xf86-video-r128


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/pci/r128fbreg.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/r128fbreg.h
diff -u src/sys/dev/pci/r128fbreg.h:1.2 src/sys/dev/pci/r128fbreg.h:1.3
--- src/sys/dev/pci/r128fbreg.h:1.2	Thu Sep  9 01:22:10 2010
+++ src/sys/dev/pci/r128fbreg.h	Thu Sep 30 03:14:39 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: r128fbreg.h,v 1.2 2010/09/09 01:22:10 macallan Exp $	*/
+/*	$NetBSD: r128fbreg.h,v 1.3 2010/09/30 03:14:39 macallan Exp $	*/
 
 /*
  * Copyright 1999, 2000 ATI Technologies Inc., Markham, Ontario,
@@ -141,6 +141,7 @@
 #   define R128_DP_SRC_SOURCE_MASK(7<< 24)
 #   define R128_DP_SRC_SOURCE_MEMORY  (2<< 24)
 #   define R128_DP_SRC_SOURCE_HOST_DATA   (3<< 24)
+#   define R128_DP_SRC_SOURCE_HOST_ALIGN  (4<< 24)
 #   define R128_GMC_3D_FCN_EN (1<< 27)
 #   define R128_GMC_CLR_CMP_CNTL_DIS  (1<< 28)
 #   define R128_GMC_AUX_CLIP_DIS  (1<< 29)
@@ -203,7 +204,15 @@
 #define R128_DP_DATATYPE  0x16c4
 #   define R128_HOST_BIG_ENDIAN_EN(1 << 29)
 
+#define R128_DP_MIX   0x16c8
+#	define R128_MIX_SRC_VRAM		  (2 << 8)
+#	define R128_MIX_SRC_HOSTDATA		  (3 << 8)
+#	define R128_MIX_SRC_HOST_BYTEALIGN	  (4 << 8)
+#	define R128_MIX_SRC_ROP3_MASK		  (0xff << 16)
+
 #define R128_DP_WRITE_MASK0x16cc
+#define R128_DP_SRC_BKGD_CLR  0x15dc
+#define R128_DP_SRC_FRGD_CLR  0x15d8
 
 #define R128_DP_CNTL_XDIR_YDIR_YMAJOR 0x16d0
 #   define R128_DST_Y_MAJOR (1 <<  2)
@@ -216,11 +225,27 @@
 #   define R128_DEFAULT_SC_RIGHT_MAX  (0x1fff <<  0)
 #   define R128_DEFAULT_SC_BOTTOM_MAX (0x1fff << 16)
 
-#define R128_SC_TOP_LEFT  0x16ec
+/* scissor registers */
+#define R128_SC_BOTTOM0x164c
 #define R128_SC_BOTTOM_RIGHT  0x16f0
+#define R128_SC_BOTTOM_RIGHT_C0x1c8c
+#define R128_SC_LEFT  0x1640
+#define R128_SC_RIGHT 0x1644
+#define R128_SC_TOP   0x1648
+#define R128_SC_TOP_LEFT  0x16ec
+#define R128_SC_TOP_LEFT_C0x1c88
 
 #define R128_GUI_STAT 0x1740
 #   define R128_GUI_FIFOCNT_MASK  0x0fff
 #   define R128_GUI_ACTIVE(1 << 31)
 
+#define R128_HOST_DATA0   0x17c0
+#define R128_HOST_DATA1   0x17c4
+#define R128_HOST_DATA2   0x17c8
+#define R128_HOST_DATA3   0x17cc
+#define R128_HOST_DATA4   0x17d0
+#define R128_HOST_DATA5   0x17d4
+#define R128_HOST_DATA6   0x17d8
+#define R128_HOST_DATA7   0x17dc
+
 #endif /* R128FB_REG_H */



CVS commit: src/share/man/man4

2010-09-29 Thread Grégoire Sutre
Module Name:src
Committed By:   gsutre
Date:   Wed Sep 29 22:38:34 UTC 2010

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

Log Message:
Fix a typo.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/share/man/man4/acpi.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/acpi.4
diff -u src/share/man/man4/acpi.4:1.58 src/share/man/man4/acpi.4:1.59
--- src/share/man/man4/acpi.4:1.58	Mon Sep  6 16:01:25 2010
+++ src/share/man/man4/acpi.4	Wed Sep 29 22:38:34 2010
@@ -1,4 +1,4 @@
-.\" $NetBSD: acpi.4,v 1.58 2010/09/06 16:01:25 jmcneill Exp $
+.\" $NetBSD: acpi.4,v 1.59 2010/09/29 22:38:34 gsutre Exp $
 .\"
 .\" Copyright (c) 2002, 2004, 2010 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -486,7 +486,7 @@
 specific parts are typically limited to
 .Dv ACPI_LV_DEBUG_OBJECT
 and
-.Dv ACPI_LV_DEBUG_INFO .
+.Dv ACPI_LV_INFO .
 The debug output can be stopped by setting
 .Ic hw.acpi.debug.level
 to



CVS commit: src/external/gpl3/binutils/dist/ld/scripttempl

2010-09-29 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Wed Sep 29 14:54:01 UTC 2010

Modified Files:
src/external/gpl3/binutils/dist/ld/scripttempl: elf.sc

Log Message:
Add the __eprol hidden symbol. Forgotten part of the common CSU handling
commit as found by Nicolas Joly.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/binutils/dist/ld/scripttempl/elf.sc

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

Modified files:

Index: src/external/gpl3/binutils/dist/ld/scripttempl/elf.sc
diff -u src/external/gpl3/binutils/dist/ld/scripttempl/elf.sc:1.1.1.1 src/external/gpl3/binutils/dist/ld/scripttempl/elf.sc:1.2
--- src/external/gpl3/binutils/dist/ld/scripttempl/elf.sc:1.1.1.1	Tue Aug 18 10:05:54 2009
+++ src/external/gpl3/binutils/dist/ld/scripttempl/elf.sc	Wed Sep 29 14:54:00 2010
@@ -86,6 +86,7 @@
 #
 #  Each of these can also have corresponding .rel.* and .rela.* sections.
 
+test -z "$TEXT_START_SYMBOLS" && TEXT_START_SYMBOLS="PROVIDE_HIDDEN (__eprol = .);"
 test -z "$ENTRY" && ENTRY=_start
 test -z "${BIG_OUTPUT_FORMAT}" && BIG_OUTPUT_FORMAT=${OUTPUT_FORMAT}
 test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT}



CVS commit: src/share/man/man7

2010-09-29 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Sep 29 14:34:07 UTC 2010

Modified Files:
src/share/man/man7: hostname.7

Log Message:
Remove trailing whitespace; new sentence, new line; fix xref.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/share/man/man7/hostname.7

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/man7/hostname.7
diff -u src/share/man/man7/hostname.7:1.10 src/share/man/man7/hostname.7:1.11
--- src/share/man/man7/hostname.7:1.10	Wed Sep 29 13:44:33 2010
+++ src/share/man/man7/hostname.7	Wed Sep 29 14:34:07 2010
@@ -1,3 +1,5 @@
+.\" $NetBSD: hostname.7,v 1.11 2010/09/29 14:34:07 wiz Exp $
+.\"
 .\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
 .\"
 .\" Permission to use, copy, modify, and distribute this software for any
@@ -31,17 +33,18 @@
 .\"
 .Dd February 16, 1994
 .Dt HOSTNAME 7
-.Os BSD 4
+.Os
 .Sh NAME
-.Nm hostname 
+.Nm hostname
 .Nd host name resolution description
 .Sh DESCRIPTION
-Hostnames are domains.  A domain is a hierarchical, dot-separated list
-of subdomains.  For example, the machine 
-.Dq Li monet , 
-in the 
+Hostnames are domains.
+A domain is a hierarchical, dot-separated list of subdomains.
+For example, the machine
+.Dq Li monet ,
+in the
 .Dq Li Berkeley
-subdomain of the 
+subdomain of the
 .Dq Li EDU
 subdomain of the Internet Domain Name System would be represented as
 .Pp
@@ -54,80 +57,85 @@
 (This task is usually performed by the library routine
 .Xr gethostbyname  3 . )
 The default method for resolving hostnames by the Internet name resolver is
-to follow RFC 1535's security recommendations.  Actions can be taken
-by the administrator to override these recommendations and to have the
-resolver behave the same as earlier, non-RFC 1535 
-resolvers.
+to follow RFC 1535's security recommendations.
+Actions can be taken by the administrator to override these
+recommendations and to have the resolver behave the same as earlier,
+non-RFC 1535 resolvers.
 .Pp
 The default method (using RFC 1535 guidelines) follows:
 .Pp
 If the name consists of a single component, i.e. contains no dot, and if the
-environment variable 
-.Dq Ev HOSTALIASES 
+environment variable
+.Dq Ev HOSTALIASES
 is set to the name of a file,
-that file is searched for a string matching the input hostname.  The file
+that file is searched for a string matching the input hostname.
+The file
 should consist of lines made up of two strings separated by white-space, the
 first of which is the hostname alias, and the second of which is the complete
-hostname to be substituted for that alias.  If a case-insensitive match is
+hostname to be substituted for that alias.
+If a case-insensitive match is
 found between the hostname to be resolved and the first field of a line in
 the file, the substituted name is looked up with no further processing.
 .Pp
-If there is at least one dot in the name, then the name is first tried 
-.Dq as-is .  
+If there is at least one dot in the name, then the name is first tried
+.Dq as-is .
 The number of dots to cause this action is configurable by setting the
-threshold using the 
+threshold using the
 .Dq Li ndots
-option in 
+option in
 .Pa /etc/resolv.conf
-(default:  1).  If the name ends with a dot, the trailing dot is
+(default: 1).
+If the name ends with a dot, the trailing dot is
 removed, and the remaining name is looked up (regardless of the setting of
-the 
-.Li ndots 
-option), without further processing. 
+the
+.Li ndots
+option), without further processing.
 .Pp
 If the input name does not end with a trailing dot, it is looked up by
-searching through a list of domains until a match is found.  If neither the
-search option in the
+searching through a list of domains until a match is found.
+If neither the search option in the
 .Pa /etc/resolv.conf
-file or the 
-.Dq Ev LOCALDOMAIN 
+file or the
+.Dq Ev LOCALDOMAIN
 environment variable is used, then the
-search list of domains contains only the full domain specified by the 
+search list of domains contains only the full domain specified by the
 .Li domain
 option (in
 .Pa /etc/resolv.conf )
-or the domain used in the local hostname.  For example, if the 
-.Dq Li domain 
-option is set to 
+or the domain used in the local hostname.
+For example, if the
+.Dq Li domain
+option is set to
 .Li CS.Berkeley.EDU ,
-then only 
-.Li CS.Berkeley.EDU 
+then only
+.Li CS.Berkeley.EDU
 will be in the search list, and this will be the only
-domain appended to the partial hostname.  For example, if 
-.Dq Li lithium 
+domain appended to the partial hostname.
+For example, if
+.Dq Li lithium
 is the name to be resolved, this would make
-.Li lithium.CS.Berkeley.EDU 
+.Li lithium.CS.Berkeley.EDU
 the only name to be tried using the search list.
 .Pp
-If the 
-.Li search 
+If the
+.Li search
 option is used in
 .Pa /etc/resolv.conf
-or the environment variable 
-.Dq E

CVS commit: src/share/man/man5

2010-09-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Sep 29 13:50:49 UTC 2010

Modified Files:
src/share/man/man5: Makefile
Removed Files:
src/share/man/man5: resolver.5

Log Message:
make resolver.5 an alias to resolv.conf.5, since ours was better.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/share/man/man5/Makefile
cvs rdiff -u -r1.4 -r0 src/share/man/man5/resolver.5

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/man5/Makefile
diff -u src/share/man/man5/Makefile:1.65 src/share/man/man5/Makefile:1.66
--- src/share/man/man5/Makefile:1.65	Wed Sep 29 09:45:26 2010
+++ src/share/man/man5/Makefile	Wed Sep 29 09:50:49 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.65 2010/09/29 13:45:26 christos Exp $
+#	$NetBSD: Makefile,v 1.66 2010/09/29 13:50:49 christos Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/5/93
 
 # missing: dump.5 plot.5
@@ -13,12 +13,13 @@
 	motd.5 netconfig.5 netgroup.5 networks.5 nologin.5 \
 	nsswitch.conf.5 pam.conf.5 passwd.5 passwd.conf.5 phones.5 \
 	printcap.5 protocols.5 ranlib.5 rc.conf.5 remote.5 \
-	resolver.5 resolv.conf.5 route.conf.5 rpc.5 \
+	resolv.conf.5 route.conf.5 rpc.5 \
 	security.conf.5 services.5 shells.5 \
 	stab.5 statvfs.5 sysctl.conf.5 ttyaction.5 \
 	utmp.5 utmpx.5 veriexec.5 weekly.conf.5 wscons.conf.5
 
 MLINKS=	fs.5 inode.5 hosts.equiv.5 rhosts.5
+MLINKS+=resolv.conf.5 resolver.5
 MLINKS+=utmp.5 wtmp.5 utmp.5 lastlog.5 passwd.5 master.passwd.5
 MLINKS+=utmpx.5 wtmpx.5 utmpx.5 lastlogx.5
 



CVS commit: src/distrib/sets/lists/man

2010-09-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Sep 29 13:47:06 UTC 2010

Modified Files:
src/distrib/sets/lists/man: mi

Log Message:
add resolver.5


To generate a diff of this commit:
cvs rdiff -u -r1.1237 -r1.1238 src/distrib/sets/lists/man/mi

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

Modified files:

Index: src/distrib/sets/lists/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1237 src/distrib/sets/lists/man/mi:1.1238
--- src/distrib/sets/lists/man/mi:1.1237	Wed Sep  1 15:28:51 2010
+++ src/distrib/sets/lists/man/mi	Wed Sep 29 09:47:06 2010
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1237 2010/09/01 19:28:51 tron Exp $
+# $NetBSD: mi,v 1.1238 2010/09/29 13:47:06 christos Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -1892,6 +1892,7 @@
 ./usr/share/man/cat5/regexp_table.0		man-postfix-catman	postfix,.cat
 ./usr/share/man/cat5/relocated.0		man-postfix-catman	postfix,.cat
 ./usr/share/man/cat5/remote.0			man-sys-catman		.cat
+./usr/share/man/cat5/resolver.0			man-net-catman		.cat
 ./usr/share/man/cat5/resolv.conf.0		man-net-catman		.cat
 ./usr/share/man/cat5/resolvconf.conf.0		man-resolvconf-catman		.cat
 ./usr/share/man/cat5/rhosts.0			man-netutil-catman	.cat
@@ -4481,6 +4482,7 @@
 ./usr/share/man/html5/regexp_table.html		man-postfix-htmlman	postfix,html
 ./usr/share/man/html5/relocated.html		man-postfix-htmlman	postfix,html
 ./usr/share/man/html5/remote.html		man-sys-htmlman		html
+./usr/share/man/html5/resolver.html		man-net-htmlman		html
 ./usr/share/man/html5/resolv.conf.html		man-net-htmlman		html
 ./usr/share/man/html5/resolvconf.conf.html	man-resolvconf-htmlman		html
 ./usr/share/man/html5/rhosts.html		man-netutil-htmlman	html
@@ -7034,6 +7036,7 @@
 ./usr/share/man/man5/regexp_table.5		man-postfix-man		postfix,.man
 ./usr/share/man/man5/relocated.5		man-postfix-man		postfix,.man
 ./usr/share/man/man5/remote.5			man-sys-man		.man
+./usr/share/man/man5/resolver.5			man-net-man		.man
 ./usr/share/man/man5/resolv.conf.5		man-net-man		.man
 ./usr/share/man/man5/resolvconf.conf.5		man-resolvconf-man	.man
 ./usr/share/man/man5/rhosts.5			man-netutil-man		.man



CVS commit: src/share/man/man5

2010-09-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Sep 29 13:45:27 UTC 2010

Modified Files:
src/share/man/man5: Makefile
Added Files:
src/share/man/man5: resolver.5

Log Message:
new from libbind


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/share/man/man5/Makefile
cvs rdiff -u -r0 -r1.4 src/share/man/man5/resolver.5

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/man5/Makefile
diff -u src/share/man/man5/Makefile:1.64 src/share/man/man5/Makefile:1.65
--- src/share/man/man5/Makefile:1.64	Sun May 16 11:33:30 2010
+++ src/share/man/man5/Makefile	Wed Sep 29 09:45:26 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.64 2010/05/16 15:33:30 jruoho Exp $
+#	$NetBSD: Makefile,v 1.65 2010/09/29 13:45:26 christos Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/5/93
 
 # missing: dump.5 plot.5
@@ -13,7 +13,7 @@
 	motd.5 netconfig.5 netgroup.5 networks.5 nologin.5 \
 	nsswitch.conf.5 pam.conf.5 passwd.5 passwd.conf.5 phones.5 \
 	printcap.5 protocols.5 ranlib.5 rc.conf.5 remote.5 \
-	resolv.conf.5 route.conf.5 rpc.5 \
+	resolver.5 resolv.conf.5 route.conf.5 rpc.5 \
 	security.conf.5 services.5 shells.5 \
 	stab.5 statvfs.5 sysctl.conf.5 ttyaction.5 \
 	utmp.5 utmpx.5 veriexec.5 weekly.conf.5 wscons.conf.5

Added files:

Index: src/share/man/man5/resolver.5
diff -u /dev/null src/share/man/man5/resolver.5:1.4
--- /dev/null	Wed Sep 29 09:45:27 2010
+++ src/share/man/man5/resolver.5	Wed Sep 29 09:45:26 2010
@@ -0,0 +1,255 @@
+.\" $NetBSD: resolver.5,v 1.4 2010/09/29 13:45:26 christos Exp $
+.\"
+.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" Copyright (c) 1986 The Regents of the University of California.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms are permitted
+.\" provided that the above copyright notice and this paragraph are
+.\" duplicated in all such forms and that any documentation,
+.\" advertising materials, and other materials related to such
+.\" distribution and use acknowledge that the software was developed
+.\" by the University of California, Berkeley.  The name of the
+.\" University may not be used to endorse or promote products derived
+.\" from this software without specific prior written permission.
+.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+.\"
+.\"	@(#)resolver.5	5.9 (Berkeley) 12/14/89
+.\"	Id: resolver.man5,v 1.2 2009/01/21 00:12:34 each Exp
+.\"
+.Dd November 11, 1993
+.Dt RESOLVER 5 
+.Os BSD 4
+.Sh NAME
+.Nm resolver 
+.Nd resolver configuration file
+.Sh SYNOPSIS
+.Pa /etc/resolv.conf
+.Sh DESCRIPTION
+The
+.Nm resolver
+is a set of routines in the C library
+.Pq Xr resolve 3
+that provide access to the Internet Domain Name System.
+The 
+.Nm resolver 
+configuration file contains information that is read
+by the 
+.Nm resolver 
+routines the first time they are invoked by a process.
+The file is designed to be human readable and contains a list of
+keywords with values that provide various types of 
+.Nm resolver 
+information.
+.Pp
+On a normally configured system, this file should not be necessary.
+The only name server to be queried will be on the local machine,
+the domain name is determined from the host name,
+and the domain search path is constructed from the domain name.
+.Pp
+The different configuration directives are:
+.Bl -tag -width "nameser"
+.It Li nameserver
+Internet address (in dot notation) of a name server that the 
+.Nm resolver 
+should query.  Up to 
+.Dv MAXNS 
+(see
+.Pa  )
+name servers may be listed, one per keyword.
+If there are multiple servers, the 
+.Nm resolver 
+library queries them in the order listed.
+If no 
+.Li nameserver 
+entries are present, the default is to use the name server on the local machine.
+(The algorithm used is to try a name server, and if the query times out,
+try the next, until out of name servers,
+then repeat trying all the name servers
+until a maximum number of retries are made).
+.It Li domain
+Local domain name.
+Most queries for 

CVS commit: src/share/man/man7

2010-09-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Sep 29 13:44:33 UTC 2010

Modified Files:
src/share/man/man7: hostname.7

Log Message:
new from libbind


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/share/man/man7/hostname.7

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/man7/hostname.7
diff -u src/share/man/man7/hostname.7:1.9 src/share/man/man7/hostname.7:1.10
--- src/share/man/man7/hostname.7:1.9	Thu Aug  7 06:31:20 2003
+++ src/share/man/man7/hostname.7	Wed Sep 29 09:44:33 2010
@@ -1,44 +1,49 @@
-.\"	$NetBSD: hostname.7,v 1.9 2003/08/07 10:31:20 agc Exp $
+.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
 .\"
-.\" Copyright (c) 1987, 1990, 1993
-.\"	The Regents of the University of California.  All rights reserved.
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
 .\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\"notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\"notice, this list of conditions and the following disclaimer in the
-.\"documentation and/or other materials provided with the distribution.
-.\" 3. Neither the name of the University nor the names of its contributors
-.\"may be used to endorse or promote products derived from this software
-.\"without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\"
-.\" @(#)hostname.7	8.2 (Berkeley) 12/30/93
+.\" Copyright (c) 1987 The Regents of the University of California.
+.\" All rights reserved.
 .\"
-.Dd December 30, 1993
+.\" Redistribution and use in source and binary forms are permitted
+.\" provided that the above copyright notice and this paragraph are
+.\" duplicated in all such forms and that any documentation,
+.\" advertising materials, and other materials related to such
+.\" distribution and use acknowledge that the software was developed
+.\" by the University of California, Berkeley.  The name of the
+.\" University may not be used to endorse or promote products derived
+.\" from this software without specific prior written permission.
+.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+.\"
+.\"	@(#)hostname.7	6.4 (Berkeley) 1/16/90
+.\"
+.Dd February 16, 1994
 .Dt HOSTNAME 7
-.Os
+.Os BSD 4
 .Sh NAME
-.Nm hostname
+.Nm hostname 
 .Nd host name resolution description
 .Sh DESCRIPTION
-Hostnames are domains, where a domain is a hierarchical, dot-separated
-list of subdomains; for example, the machine monet, in the Berkeley
-subdomain of the EDU subdomain of the Internet would be represented as
+Hostnames are domains.  A domain is a hierarchical, dot-separated list
+of subdomains.  For example, the machine 
+.Dq Li monet , 
+in the 
+.Dq Li Berkeley
+subdomain of the 
+.Dq Li EDU
+subdomain of the Internet Domain Name System would be represented as
 .Pp
 .Dl monet.Berkeley.EDU
 .Pp
@@ -46,46 +51,127 @@
 .Pp
 Hostnames are often used with network client and server programs,
 which must generally translate the name to an address for use.
-(This function is generally performed by the li

CVS commit: src/lib/libperfuse

2010-09-29 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Wed Sep 29 08:01:11 UTC 2010

Modified Files:
src/lib/libperfuse: debug.c ops.c perfuse.c perfuse_priv.h subr.c

Log Message:
= Open files =
- Restore open on our own in fsycn and readdir, as the node may not already
be open, and FUSE really wants it to be. No need to close immediatly, it
can be done at inactive time.

= Write operations =
- fix a nasty bug that corrupted files on write (written added twice)
- Keep track of file size in order to honour PUFFS_IO_APPEND

= many fixes in rename =
- handler overwritten nodes correctly
- wait for all operations on the node to drain before doing rename, as
filesystems may not cope with operations on a moving file.
- setback PUFFS_SETBACK_INACT_N1 cannot be used from rename, we therefore
miss the inactive time for an overwritten node. This bounds us to give up
PUFFS_KFLAG_IAONDEMAND.

= Removed files =
- forbid most operations on a removed node, return ENOENT
- setback PUFFS_SETBACK_NOREF_N1 at inactive stage to cause removed
file reclaim

= Misc =
- Update outdated ARGSUSED for lint
- Fix a memory leak (puffs_pn_remove instead of puffs_pn_put)
- Do not use PUFFS_FLAG_BUILDPATH except for debug output. It makes the
lookup code much simplier.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libperfuse/debug.c
cvs rdiff -u -r1.17 -r1.18 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.8 -r1.9 src/lib/libperfuse/perfuse.c
cvs rdiff -u -r1.12 -r1.13 src/lib/libperfuse/perfuse_priv.h
cvs rdiff -u -r1.6 -r1.7 src/lib/libperfuse/subr.c

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

Modified files:

Index: src/lib/libperfuse/debug.c
diff -u src/lib/libperfuse/debug.c:1.3 src/lib/libperfuse/debug.c:1.4
--- src/lib/libperfuse/debug.c:1.3	Thu Sep 23 16:02:34 2010
+++ src/lib/libperfuse/debug.c	Wed Sep 29 08:01:10 2010
@@ -1,4 +1,4 @@
-/*  $NetBSD: debug.c,v 1.3 2010/09/23 16:02:34 manu Exp $ */
+/*  $NetBSD: debug.c,v 1.4 2010/09/29 08:01:10 manu Exp $ */
 
 /*-
  *  Copyright (c) 2010 Emmanuel Dreyfus. All rights reserved.
@@ -85,6 +85,7 @@
 	"WRITE",
 	"AFTERWRITE",
 	"OPEN"
+	"AFTERXCHG"
 };
 
 const char *

Index: src/lib/libperfuse/ops.c
diff -u src/lib/libperfuse/ops.c:1.17 src/lib/libperfuse/ops.c:1.18
--- src/lib/libperfuse/ops.c:1.17	Thu Sep 23 16:02:34 2010
+++ src/lib/libperfuse/ops.c	Wed Sep 29 08:01:10 2010
@@ -1,4 +1,4 @@
-/*  $NetBSD: ops.c,v 1.17 2010/09/23 16:02:34 manu Exp $ */
+/*  $NetBSD: ops.c,v 1.18 2010/09/29 08:01:10 manu Exp $ */
 
 /*-
  *  Copyright (c) 2010 Emmanuel Dreyfus. All rights reserved.
@@ -54,12 +54,10 @@
 const char*, struct puffs_node **);
 static int node_mk_common(struct puffs_usermount *, puffs_cookie_t,
 struct puffs_newinfo *, const struct puffs_cn *pcn, perfuse_msg_t *);
-static const char *basename_r(const char *);
 static ssize_t fuse_to_dirent(struct puffs_usermount *, puffs_cookie_t,
 struct fuse_dirent *, size_t);
-static int readdir_buffered(struct perfuse_state *, puffs_cookie_t,
-struct dirent *, off_t *, size_t *, const struct puffs_cred *,
-int *, off_t *, size_t *);
+static int readdir_buffered(puffs_cookie_t, struct dirent *, off_t *, 
+size_t *, const struct puffs_cred *, int *, off_t *, size_t *);
 static void requeue_request(struct puffs_usermount *, 
 puffs_cookie_t opc, enum perfuse_qtype);
 static int dequeue_requests(struct perfuse_state *, 
@@ -175,9 +173,13 @@
  	enum perfuse_xchg_pb_reply wait;
 {
 	struct perfuse_state *ps;
+	struct perfuse_node_data *pnd;
 	int error;
 
 	ps = puffs_getspecific(pu);
+	pnd = NULL;
+	if ((struct puffs_node *)opc != NULL)
+		pnd = PERFUSE_NODE_DATA(opc);
 
 #ifdef PERFUSE_DEBUG
 	if ((perfuse_diagflags & PDF_FILENAME) && (opc != 0))
@@ -185,8 +187,16 @@
 			(char *)PNPATH((struct puffs_node *)opc), 
 			PERFUSE_NODE_DATA(opc)->pnd_flags);
 #endif
+	if (pnd)
+		pnd->pnd_flags |= PND_INXCHG;
+
 	error = ps->ps_xchg_msg(pu, pm, len, wait);
 
+	if (pnd) {
+		pnd->pnd_flags &= ~PND_INXCHG;
+		(void)dequeue_requests(ps, opc, PCQ_AFTERXCHG, DEQUEUE_ALL);
+	}
+
 	return error;
 }
 
@@ -306,7 +316,6 @@
 
 	ps = puffs_getspecific(pu);
 
-	path = basename_r(path);
 	len = strlen(path) + 1;
 
 	pm = ps->ps_new_msg(pu, opc, FUSE_LOOKUP, len, NULL);
@@ -327,8 +336,9 @@
 
 #ifdef PERFUSE_DEBUG
 	if (perfuse_diagflags & PDF_FILENAME)
-		DPRINTF("%s: opc = %p, looked up opc = %p, file = \"%s\"\n",
-			__func__, (void *)opc, pn, (char *)PNPATH(pn));
+		DPRINTF("%s: opc = %p, looked up opc = %p, ino = %"PRId64" "
+			"file = \"%s\"\n", __func__, (void *)opc, pn, 
+			feo->nodeid, path);
 #endif
 out: 
 	ps->ps_destroy_msg(pm);
@@ -402,41 +412,6 @@
 	return error;
 }
 
-static const char *
-basename_r(string)
-	const char *string;
-{
-	char *result;
-
-	if ((result = rindex(string, '/')) == NULL)
-		return string;
-
-	/*
-	 * We are finished if this is not a trailing /
-	 */
-	if (result[1] != '\0')
-		return result + 1