Coda File System

modern NetBSD mount patch

From: Greg Troxel <gdt_at_ir.bbn.com>
Date: Wed, 29 Feb 2012 20:07:08 -0500
This is patch-ac in pkgsrc (sorry, the bashism exorcism was -ad).

This adds support for the new (>3 years old) mount system call that
takes a pointer and length for the "kernDevice" argument.  I've been
running coda with this for years; a version of this patch has been in
pkgsrc since 2007-11-30.

Please apply to CVS.

Index: worker.cc
===================================================================
RCS file: /coda-src/coda/coda-src/venus/worker.cc,v
retrieving revision 4.117
diff -u -p -u -p -r4.117 worker.cc
--- worker.cc	6 Oct 2008 16:52:22 -0000	4.117
+++ worker.cc	1 Mar 2012 01:04:05 -0000
@@ -404,10 +404,18 @@ void VFSMount()
 	}
 #endif
 			
+#if defined(__NetBSD__) && defined(__NetBSD_Prereq__) && __NetBSD_Prereq__(4,99,24)
+	if (error < 0)
+	    error = mount("coda", venusRoot, 0, (void *)kernDevice, 256);
+	if (error < 0)
+	    error = mount("cfs", venusRoot, 0, (void *)kernDevice, 256);
+#else
 	if (error < 0)
 	    error = mount("coda", venusRoot, 0, kernDevice);
 	if (error < 0)
 	    error = mount("cfs", venusRoot, 0, kernDevice);
+#endif
+
 #if defined(__FreeBSD__) && !defined(__FreeBSD_version)
 #define MOUNT_CFS 19
 	if (error < 0)

Received on 2012-02-29 20:07:15