summaryrefslogtreecommitdiff
path: root/net/coda/patches/patch-ac
blob: 0bf215913ae095ddc6a35e618070627121c52591 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
$NetBSD: patch-ac,v 1.3 2007/12/02 14:33:06 rillig 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	2007-08-01 18:32:29.000000000 +0000
+++ coda-src/venus/worker.cc	2007-11-30 23:12:18.000000000 +0000
@@ -367,11 +367,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, kernDevice, 256);
+	if (error < 0)
+	    error = mount("cfs", venusRoot, 0, 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)