From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d4db,42a150c9752b1692,start X-Google-Attributes: gid10d4db,public From: ah@doc.ic.ac.uk (Angelo Haritsis) Subject: ntfs : patches for 1.3.4x+ Date: 1995/12/01 Message-ID: X-Deja-AN: 120595357 followup-to: comp.os.linux.development.system content-type: text/plain; charset=ISO-8859-1 organization: Dept. of Computing, Imperial College, London mime-version: 1.0 newsgroups: comp.os.linux.announce -----BEGIN PGP SIGNED MESSAGE----- Hello, I just installed NTFS by Martin von Loewis under linux 1.3.45 and works like a charm. I used his official release and needed to apply some quick (and dirty?) patches (at the end of this posting) What to do: Find his ntfs sources from: http://www.informatik.hu-berlin.de/~loewis/ntfs Download the official release (not extra alphas) untar it and apply the patches here. Follow CAREFULLY the instructions in INSTALL. The NTFS loads as a module. Angelo =========================================================================== - --- ./Makefile.OLD Thu Nov 30 13:27:07 1995 +++ ./Makefile Thu Nov 30 13:25:11 1995 @@ -1,6 +1,7 @@ - -CFLAGS= -g +CFLAGS= -O6 -s -m486 -fomit-frame-pointer +#CFLAGS= -g -DDEBUG #MODFLAGS= -Wall -D__KERNEL__ -DMODULE -DDEBUG -O2 - -MODFLAGS= -Wall -D__KERNEL__ -DMODULE -O2 +MODFLAGS= -Wall -D__KERNEL__ -DMODULE -O6 -m486 -s -fomit-frame-pointer COFLAGS= -l KVERSION=$(shell uname -r) @@ -19,10 +20,13 @@ ntcat: dir.o inode.o ntcat.o ntfstools.o dump.o +mem.o: mem.c + $(CC) $(CFLAGS) -c mem.c + ntfs_fs.o: ntfs_fs.c $(CC) $(MODFLAGS) -c ntfs_fs.c - -ntfs.o: ntfs_fs.o inode.o dir.o super.o +ntfs.o: ntfs_fs.o inode.o dir.o super.o mem.o $(LD) -r $^ /usr/src/linux/lib/lib.a -o ntfs.o ntfs2.o: ntfs_fs.c inode.o dir.o super.o @@ -30,7 +34,7 @@ ld -r ntfs_fs2.o inode.o dir.o super.o -o ntfs2.o clean: - - rm core *.o $(PROGRAMS) + rm -f core *.o $(PROGRAMS) install: all install -d /usr/local/bin /lib/modules/$(KVERSION)/fs - --- ./config.h.OLD Thu Nov 30 13:59:04 1995 +++ ./config.h Thu Nov 30 13:28:10 1995 @@ -4,7 +4,12 @@ * Copyright (C) 1995 Martin von Lvwis */ - -#define NTFS_VOLUME "/dev/hdb7" + +/* !!! PUT HERE YOUR NT PARTITION !!! */ +/* #define NTFS_VOLUME "/dev/hdb7" */ +#define NTFS_VOLUME "/dev/sda2" + +/* THESE ARE GUESSES - THEY COULD BE WRONG FOR YOU - READ INSTALL! */ #define NTFS_BLOCKSIZE 512 #define NTFS_CLUSTERFACTOR 1 #define NTFS_CLUSTERSIZE (NTFS_BLOCKSIZE*NTFS_CLUSTERFACTOR) - --- ./ntfs_fs.c.OLD Thu Nov 30 04:28:07 1995 +++ ./ntfs_fs.c Thu Nov 30 13:24:35 1995 @@ -5,12 +5,7 @@ * Copyright (C) 1995 Martin von Lvwis */ - -#ifdef MODULE #include - -#else - -#define MOD_INC_USE_COUNT - -#define MOD_DEC_USE_COUNT - -#endif #include #include @@ -20,7 +15,8 @@ #include #include #include - -#include +/* #include */ +#include #include #include #include "config.h" @@ -144,13 +140,13 @@ As the root directory contains a entry for itself, '.' is not emulated for the root directory */ static int ntfs_readdir(struct inode* dir, struct file *filp, - - struct dirent *dirent, int count) + struct dirent *dirent, filldir_t filldir) { char name[260]; char item[300]; int length; - - PRINTK((KERN_DEBUG "ntfs_readdir %x items ino %x mode %x\n", - - count,(unsigned)dir->i_ino,(unsigned int)dir->i_mode)); + /*PRINTK((KERN_DEBUG "ntfs_readdir %x items ino %x mode %x\n", + count,(unsigned)dir->i_ino,(unsigned int)dir->i_mode));*/ if(!dir || (dir->i_ino==0) || !S_ISDIR(dir->i_mode))return -EBADF; PRINTK((KERN_DEBUG "readdir: Looking for file %x dircount %d\n", @@ -189,11 +185,15 @@ PRINTK((KERN_DEBUG "new position:%x\n",filp->f_pos)); PRINTK((KERN_DEBUG "Name is %s,%d\n",name,length)); /* Return the name to user space */ - - put_user_long(*(int*)item,(int*)&dirent->d_ino); + /* + put_user_long((*(int*)item),(int*)&dirent->d_ino); memcpy_tofs(dirent->d_name,name,length+1); put_user_word(length,&dirent->d_reclen); + */ + filldir(dirent, name, length, filp->f_pos, item); + /* What are we supposed to return here, anyways? */ - - return length; + return 0; } static void ntfs_put_inode(struct inode *ino) @@ -555,7 +555,6 @@ }; #ifdef MODULE - -char kernel_version[] = UTS_RELEASE; int init_module(void) { - --- ./mem.c.OLD Thu Nov 30 13:32:17 1995 +++ ./mem.c Thu Nov 30 13:43:17 1995 @@ -0,0 +1,8 @@ +#include + +#undef memcpy + +void *memcpy(char *dst, const char *src, size_t n) +{ + __memcpy((dst),(src),(n)); +} =========================================================================== - -- #include Angelo Haritsis, Applied Systems Section s-mail: Computing Dpt,Imperial College,180 Queen's Gate,London SW7 2BZ,UK e-mail: ah@doc.ic.ac.uk - tel:+44 171 594 8390 - fax:+44 171 581 8024 -----BEGIN PGP SIGNATURE----- Version: 2.6.2i iQCVAwUBML8rXIQRll5MupLRAQFivQQAgXGaDzzDCMUJ6zx7HWoLEyUCUlQ0DUf+ /E+FbwEsCXwwQErKP3zwIXs6V9YekPQCu8IejADUiBt9HKzTF/zC22DPxDsI/ofO GCVd7AegxHNbWBzghETbTTKa17MTQGWyRM/QQ3/8MlqBBczDE4zM3unLJ/d6/pW9 YNKygSxoP2g= =cU6M -----END PGP SIGNATURE----- -- This article has been digitally signed by the moderator, using PGP. Finger wirzeniu@kruuna.helsinki.fi for PGP key needed for validating signature. Send submissions for comp.os.linux.announce to: linux-announce@news.ornl.gov PLEASE remember a short description of the software and the LOCATION.