Module Name:    src
Committed By:   bouyer
Date:           Sat Sep 17 18:54:39 UTC 2011

Modified Files:
        src/sys/fs/union [netbsd-5]: union_vfsops.c

Log Message:
Pull up following revision(s) (requested by hannken in ticket #1667):
        sys/fs/union/union_vfsops.c: revision 1.64
Print the warning message on mount once.
=20
Should fix PR #42795 (patch to make mounting union filesystems less =
obnoxious)
=20
=20


To generate a diff of this commit:
cvs rdiff -u -r1.57.6.1 -r1.57.6.2 src/sys/fs/union/union_vfsops.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/fs/union/union_vfsops.c
diff -u src/sys/fs/union/union_vfsops.c:1.57.6.1 src/sys/fs/union/union_vfsops.c:1.57.6.2
--- src/sys/fs/union/union_vfsops.c:1.57.6.1	Sat Apr  4 18:12:55 2009
+++ src/sys/fs/union/union_vfsops.c	Sat Sep 17 18:54:38 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: union_vfsops.c,v 1.57.6.1 2009/04/04 18:12:55 snj Exp $	*/
+/*	$NetBSD: union_vfsops.c,v 1.57.6.2 2011/09/17 18:54:38 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1994 The Regents of the University of California.
@@ -77,7 +77,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: union_vfsops.c,v 1.57.6.1 2009/04/04 18:12:55 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: union_vfsops.c,v 1.57.6.2 2011/09/17 18:54:38 bouyer Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -101,6 +101,9 @@
 VFS_PROTOS(union);
 
 static struct sysctllog *union_sysctl_log;
+static const char *warn_user =
+    "WARNING: the union file system is experimental\n"
+    "WARNING: it can cause crashes and file system corruption\n";
 
 /*
  * Mount union filesystem
@@ -149,8 +152,10 @@
 		goto bad;
 	}
 
-	printf("WARNING: the union file system is experimental\n"
-	    "WARNING: it can cause crashes and file system corruption\n");
+	if (warn_user != NULL) {
+		printf("%s", warn_user);
+		warn_user = NULL;
+	}
 
 	lowerrootvp = mp->mnt_vnodecovered;
 	VREF(lowerrootvp);

Reply via email to