Subject: Re: NTFS5
To: Brook Milligan <brook@biology.nmsu.edu>
From: Johan Danielsson <joda@pdc.kth.se>
List: current-users
Date: 05/25/2001 10:49:55
Brook Milligan <brook@biology.nmsu.edu> writes:

> Is there any progress on getting NTFS5 supported by NetBSD?  I am
> having the same problem mentioned in PR kern/10119 when I try to mount
> a windows 2000 filesystem.

See if this patch helps. Please note that there has been reports of
filesystem corruption with NTFS 3.0 and linux, so be careful.

/Johan

--- ntfs_subr.c	2001/05/15 22:38:40	1.28
+++ ntfs_subr.c	2001/05/25 08:48:17
@@ -1527,14 +1527,8 @@
 		off = ntfs_btocnoff(off);
 
 		while (left && ccl) {
-#if defined(__FreeBSD__)
 			tocopy = min(left,
 				  min(ntfs_cntob(ccl) - off, MAXBSIZE - off));
-#else
-			/* under NetBSD, bread() can read
-			 * maximum one block worth of data */
-			tocopy = min(left, ntmp->ntm_bps - off);
-#endif
 			cl = ntfs_btocl(tocopy + off);
 			ddprintf(("ntfs_writentvattr_plain: write: " \
 				"cn: 0x%x cl: %d, off: %d len: %d, left: %d\n",
@@ -1631,16 +1625,9 @@
 				off = ntfs_btocnoff(off);
 
 				while (left && ccl) {
-#if defined(__FreeBSD__)
 					tocopy = min(left,
 						  min(ntfs_cntob(ccl) - off,
 						      MAXBSIZE - off));
-#else
-					/* under NetBSD, bread() can read
-					 * maximum one block worth of data */
-					tocopy = min(left,
-						ntmp->ntm_bps - off);
-#endif
 					cl = ntfs_btocl(tocopy + off);
 					ddprintf(("ntfs_readntvattr_plain: " \
 						"read: cn: 0x%x cl: %d, " \