Coda File System

pkgsrc patches

From: Greg Troxel <gdt_at_ir.bbn.com>
Date: Fri, 11 Mar 2011 15:31:44 -0500
Two patches that haven't made it upstream and should:

  support mounting on modern NetBSD  

  remove bashism of test == from configure, but on line 140 of
  configure.in, chagne == to = 

$NetBSD: patch-ac,v 1.4 2011/03/11 20:27:42 gdt Exp $

Added experimental code to support mounting on NetBSD >= 4.99.24. The
magic value of 256 is taken from coda_vfsops in coda_vfsops.c.

--- coda-src/venus/worker.cc.orig	2008-10-06 16:52:22.000000000 +0000
+++ coda-src/venus/worker.cc
@@ -403,11 +403,19 @@ void VFSMount()
 	    error = nmount(md, 6, 0);
 	}
 #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)


$NetBSD$

--- configure.orig	2011-02-25 20:04:49.000000000 +0000
+++ configure
@@ -18400,7 +18400,7 @@ $as_echo "#define HAVE_FLOCK_LOCKING 1" 
 
 if test "$buildvcodacon" != no ; then
   test -z "${FLUID}" && as_fn_error "\"Unable to find fltk-fluid\"" "$LINENO" 5
-  test "$coda_cv_path_fltk" == none && as_fn_error "\"Unable to find libfltk\"" "$LINENO" 5
+  test "$coda_cv_path_fltk" = none && as_fn_error "\"Unable to find libfltk\"" "$LINENO" 5
 fi
  if test "$buildvcodacon" != no; then
   BUILD_VCODACON_TRUE=

Received on 2011-03-11 15:39:09