Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/chs-ubc2]: src/sys/ntfs Update from trunk.
details: https://anonhg.NetBSD.org/src/rev/1161823de8a6
branches: chs-ubc2
changeset: 471443:1161823de8a6
user: thorpej <thorpej%NetBSD.org@localhost>
date: Mon Aug 02 22:40:26 1999 +0000
description:
Update from trunk.
diffstat:
sys/ntfs/ntfs.h | 4 +-
sys/ntfs/ntfs_compr.c | 4 +-
sys/ntfs/ntfs_compr.h | 4 +-
sys/ntfs/ntfs_extern.h | 4 +-
sys/ntfs/ntfs_ihash.c | 6 +-
sys/ntfs/ntfs_ihash.h | 4 +-
sys/ntfs/ntfs_inode.h | 10 ++--
sys/ntfs/ntfs_subr.c | 22 +++++++-
sys/ntfs/ntfs_subr.h | 4 +-
sys/ntfs/ntfs_vfsops.c | 50 ++++++++++++--------
sys/ntfs/ntfs_vfsops.h | 4 +-
sys/ntfs/ntfs_vnops.c | 115 ++++++++++++++++++++----------------------------
sys/ntfs/ntfsmount.h | 4 +-
13 files changed, 118 insertions(+), 117 deletions(-)
diffs (truncated from 810 to 300 lines):
diff -r 95673b9dd41b -r 1161823de8a6 sys/ntfs/ntfs.h
--- a/sys/ntfs/ntfs.h Mon Aug 02 22:30:25 1999 +0000
+++ b/sys/ntfs/ntfs.h Mon Aug 02 22:40:26 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ntfs.h,v 1.2.2.1 1999/07/01 23:49:43 thorpej Exp $ */
+/* $NetBSD: ntfs.h,v 1.2.2.2 1999/08/02 22:40:26 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999 Semen Ustimenko
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * Id: ntfs.h,v 1.4 1999/04/20 21:06:41 semenu Exp
+ * Id: ntfs.h,v 1.5 1999/05/12 09:42:51 semenu Exp
*/
/*#define NTFS_DEBUG 1*/
diff -r 95673b9dd41b -r 1161823de8a6 sys/ntfs/ntfs_compr.c
--- a/sys/ntfs/ntfs_compr.c Mon Aug 02 22:30:25 1999 +0000
+++ b/sys/ntfs/ntfs_compr.c Mon Aug 02 22:40:26 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ntfs_compr.c,v 1.2.2.1 1999/07/01 23:49:43 thorpej Exp $ */
+/* $NetBSD: ntfs_compr.c,v 1.2.2.2 1999/08/02 22:40:26 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999 Semen Ustimenko
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * Id: ntfs_compr.c,v 1.3 1999/04/20 21:06:43 semenu Exp
+ * Id: ntfs_compr.c,v 1.4 1999/05/12 09:42:54 semenu Exp
*/
#include <sys/param.h>
diff -r 95673b9dd41b -r 1161823de8a6 sys/ntfs/ntfs_compr.h
--- a/sys/ntfs/ntfs_compr.h Mon Aug 02 22:30:25 1999 +0000
+++ b/sys/ntfs/ntfs_compr.h Mon Aug 02 22:40:26 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ntfs_compr.h,v 1.2.2.1 1999/07/01 23:49:43 thorpej Exp $ */
+/* $NetBSD: ntfs_compr.h,v 1.2.2.2 1999/08/02 22:40:26 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999 Semen Ustimenko
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * Id: ntfs_compr.h,v 1.3 1999/04/20 21:06:43 semenu Exp
+ * Id: ntfs_compr.h,v 1.4 1999/05/12 09:42:55 semenu Exp
*/
#define NTFS_COMPBLOCK_SIZE 0x1000
diff -r 95673b9dd41b -r 1161823de8a6 sys/ntfs/ntfs_extern.h
--- a/sys/ntfs/ntfs_extern.h Mon Aug 02 22:30:25 1999 +0000
+++ b/sys/ntfs/ntfs_extern.h Mon Aug 02 22:40:26 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ntfs_extern.h,v 1.2.2.1 1999/07/01 23:49:43 thorpej Exp $ */
+/* $NetBSD: ntfs_extern.h,v 1.2.2.2 1999/08/02 22:40:26 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999 Semen Ustimenko
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * Id: ntfs_extern.h,v 1.3 1999/04/20 21:06:43 semenu Exp
+ * Id: ntfs_extern.h,v 1.4 1999/05/12 09:42:57 semenu Exp
*/
struct sockaddr;
diff -r 95673b9dd41b -r 1161823de8a6 sys/ntfs/ntfs_ihash.c
--- a/sys/ntfs/ntfs_ihash.c Mon Aug 02 22:30:25 1999 +0000
+++ b/sys/ntfs/ntfs_ihash.c Mon Aug 02 22:40:26 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ntfs_ihash.c,v 1.2.2.1 1999/07/01 23:49:43 thorpej Exp $ */
+/* $NetBSD: ntfs_ihash.c,v 1.2.2.2 1999/08/02 22:40:26 thorpej Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1991, 1993, 1995
@@ -33,7 +33,7 @@
* SUCH DAMAGE.
*
* @(#)ufs_ihash.c 8.7 (Berkeley) 5/17/95
- * Id: ntfs_ihash.c,v 1.3 1999/04/20 21:06:43 semenu Exp
+ * Id: ntfs_ihash.c,v 1.5 1999/05/12 09:42:58 semenu Exp
*/
#include <sys/param.h>
@@ -55,7 +55,7 @@
*/
static LIST_HEAD(nthashhead, ntnode) *ntfs_nthashtbl;
static u_long ntfs_nthash; /* size of hash table - 1 */
-#define NTNOHASH(device, inum) (&ntfs_nthashtbl[((device) + (inum)) & ntfs_nthash])
+#define NTNOHASH(device, inum) (&ntfs_nthashtbl[(minor(device) + (inum)) & ntfs_nthash])
#ifndef NULL_SIMPLELOCKS
static struct simplelock ntfs_nthash_slock;
#endif
diff -r 95673b9dd41b -r 1161823de8a6 sys/ntfs/ntfs_ihash.h
--- a/sys/ntfs/ntfs_ihash.h Mon Aug 02 22:30:25 1999 +0000
+++ b/sys/ntfs/ntfs_ihash.h Mon Aug 02 22:40:26 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ntfs_ihash.h,v 1.2.2.1 1999/07/01 23:49:43 thorpej Exp $ */
+/* $NetBSD: ntfs_ihash.h,v 1.2.2.2 1999/08/02 22:40:26 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999 Semen Ustimenko
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * Id: ntfs_ihash.h,v 1.2 1999/04/20 21:06:43 semenu Exp
+ * Id: ntfs_ihash.h,v 1.3 1999/05/12 09:42:59 semenu Exp
*/
void ntfs_nthashinit __P((void));
diff -r 95673b9dd41b -r 1161823de8a6 sys/ntfs/ntfs_inode.h
--- a/sys/ntfs/ntfs_inode.h Mon Aug 02 22:30:25 1999 +0000
+++ b/sys/ntfs/ntfs_inode.h Mon Aug 02 22:40:26 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ntfs_inode.h,v 1.2.2.1 1999/07/01 23:49:43 thorpej Exp $ */
+/* $NetBSD: ntfs_inode.h,v 1.2.2.2 1999/08/02 22:40:26 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999 Semen Ustimenko
@@ -25,11 +25,11 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * Id: ntfs_inode.h,v 1.3 1999/04/20 21:06:43 semenu Exp
+ * Id: ntfs_inode.h,v 1.4 1999/05/12 09:43:00 semenu Exp
*/
/* These flags are kept in i_flag. */
-#if __FreeBSD_version >= 300000
+#if defined(__FreeBSD__)
#define IN_ACCESS 0x0001 /* Access time update request. */
#define IN_CHANGE 0x0002 /* Inode change time update request. */
#define IN_UPDATE 0x0004 /* Modification time update request. */
@@ -38,7 +38,7 @@
#define IN_SHLOCK 0x0020 /* File has shared lock. */
#define IN_EXLOCK 0x0040 /* File has exclusive lock. */
#define IN_LAZYMOD 0x0080 /* Modified, but don't write yet. */
-#else
+#else /* defined(__NetBSD__) */
#define IN_ACCESS 0x0001 /* Access time update request. */
#define IN_CHANGE 0x0002 /* Inode change time update request. */
#define IN_EXLOCK 0x0004 /* File has exclusive lock. */
@@ -66,7 +66,7 @@
u_int32_t i_flag;
int i_lock;
int i_usecount;
-#if __FreeBSD_version < 300000
+#if defined(__NetBSD__)
pid_t i_lockholder;
pid_t i_lockwaiter;
int i_lockcount;
diff -r 95673b9dd41b -r 1161823de8a6 sys/ntfs/ntfs_subr.c
--- a/sys/ntfs/ntfs_subr.c Mon Aug 02 22:30:25 1999 +0000
+++ b/sys/ntfs/ntfs_subr.c Mon Aug 02 22:40:26 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ntfs_subr.c,v 1.3.2.1 1999/07/01 23:49:43 thorpej Exp $ */
+/* $NetBSD: ntfs_subr.c,v 1.3.2.2 1999/08/02 22:40:26 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999 Semen Ustimenko (semenu%FreeBSD.org@localhost)
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * Id: ntfs_subr.c,v 1.3 1999/04/20 21:06:43 semenu Exp
+ * Id: ntfs_subr.c,v 1.4 1999/05/12 09:43:01 semenu Exp
*/
#include <sys/param.h>
@@ -39,7 +39,7 @@
#include <sys/buf.h>
#include <sys/file.h>
#include <sys/malloc.h>
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__)
#include <machine/clock.h>
#endif
@@ -55,7 +55,7 @@
#include <ntfs/ntfs_compr.h>
#include <ntfs/ntfs_ihash.h>
-#if __FreeBSD_version >= 300000
+#if defined(__FreeBSD__)
MALLOC_DEFINE(M_NTFSNTVATTR, "NTFS vattr", "NTFS file attribute information");
MALLOC_DEFINE(M_NTFSRDATA, "NTFS res data", "NTFS resident data");
MALLOC_DEFINE(M_NTFSRUN, "NTFS vrun", "NTFS vrun storage");
@@ -1460,9 +1460,16 @@
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, " \
@@ -1567,9 +1574,16 @@
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, " \
diff -r 95673b9dd41b -r 1161823de8a6 sys/ntfs/ntfs_subr.h
--- a/sys/ntfs/ntfs_subr.h Mon Aug 02 22:30:25 1999 +0000
+++ b/sys/ntfs/ntfs_subr.h Mon Aug 02 22:40:26 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ntfs_subr.h,v 1.2.2.1 1999/07/01 23:49:43 thorpej Exp $ */
+/* $NetBSD: ntfs_subr.h,v 1.2.2.2 1999/08/02 22:40:26 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999 Semen Ustimenko
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * Id: ntfs_subr.h,v 1.3 1999/04/20 21:06:43 semenu Exp
+ * Id: ntfs_subr.h,v 1.4 1999/05/12 09:43:02 semenu Exp
*/
#define VA_LOADED 0x0001
diff -r 95673b9dd41b -r 1161823de8a6 sys/ntfs/ntfs_vfsops.c
--- a/sys/ntfs/ntfs_vfsops.c Mon Aug 02 22:30:25 1999 +0000
+++ b/sys/ntfs/ntfs_vfsops.c Mon Aug 02 22:40:26 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ntfs_vfsops.c,v 1.3.2.1 1999/07/01 23:49:43 thorpej Exp $ */
+/* $NetBSD: ntfs_vfsops.c,v 1.3.2.2 1999/08/02 22:40:26 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999 Semen Ustimenko
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * Id: ntfs_vfsops.c,v 1.3 1999/04/20 21:06:43 semenu Exp
+ * Id: ntfs_vfsops.c,v 1.7 1999/05/31 11:28:30 phk Exp
*/
@@ -59,14 +59,14 @@
#include <ntfs/ntfs_extern.h>
#include <ntfs/ntfsmount.h>
-#if __FreeBSD_version >= 300000
+#if defined(__FreeBSD__)
MALLOC_DEFINE(M_NTFSMNT, "NTFS mount", "NTFS mount structure");
MALLOC_DEFINE(M_NTFSNTNODE,"NTFS ntnode", "NTFS ntnode information");
MALLOC_DEFINE(M_NTFSFNODE,"NTFS fnode", "NTFS fnode information");
MALLOC_DEFINE(M_NTFSDIR,"NTFS dir", "NTFS dir buffer");
#endif
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__)
static int ntfs_mount __P((struct mount *, char *, caddr_t,
struct nameidata *, struct proc *));
#else
@@ -88,7 +88,7 @@
struct ntfs_args *, struct proc *));
static int ntfs_vptofh __P((struct vnode *, struct fid *));
-#if __FreeBSD_version >= 300000
+#if defined(__FreeBSD__)
static int ntfs_init __P((struct vfsconf *));
static int ntfs_fhtovp __P((struct mount *, struct fid *,
struct sockaddr *, struct vnode **,
@@ -143,7 +143,7 @@
}
#endif
-#if __FreeBSD_version >= 300000
+#if defined(__FreeBSD__)
static int
ntfs_init (
struct vfsconf *vcp )
@@ -156,7 +156,7 @@
Home |
Main Index |
Thread Index |
Old Index