Only in ifs.5.1a: .desc.txt diff --unified --recursive --new-file ifs.5.1a/fs/ifs/Makefile ifs-module/fs/ifs/Makefile --- ifs.5.1a/fs/ifs/Makefile Tue Apr 26 04:04:48 1994 +++ ifs-module/fs/ifs/Makefile Mon Jan 9 01:28:40 1995 @@ -7,6 +7,10 @@ # # Note 2! The CFLAGS definitions are now in the main makefile... +ifndef CONFIG_IFS_FS +CFLAGS := -I. $(CFLAGS) -DMODULE +endif + .c.s: $(CC) $(CFLAGS) -S $< .c.o: @@ -18,6 +22,8 @@ ifs.o: $(OBJS) $(LD) -r -o ifs.o $(OBJS) + +modules: ifs.o clean: rm -f core *.o *.a tmp_make diff --unified --recursive --new-file ifs.5.1a/fs/ifs/clone.c ifs-module/fs/ifs/clone.c --- ifs.5.1a/fs/ifs/clone.c Tue Apr 26 04:04:48 1994 +++ ifs-module/fs/ifs/clone.c Mon Feb 6 21:34:39 1995 @@ -4,6 +4,10 @@ * Written 1992,1993 by Werner Almesberger */ +#ifdef MODULE +#include +#endif + #include #include @@ -12,6 +16,7 @@ #include #include #include +#include static int ifs_do_build_path(struct inode *dir); @@ -32,7 +37,7 @@ ifs_close_file(filp); Dprintk("retval = %d\n",retval); if (retval <= 0) - return retval ? retval : -ENOENT; + return retval ? de->d_reclen : -ENOENT; return 0; } @@ -144,19 +149,20 @@ struct file *in,*out; unsigned long page; int retval,size; + struct iattr newattr; USE_INODE(dir); retval = dir->i_op->create(dir,name,len,orig->i_mode & ~0777,&new_file); if (retval) return retval; - new_file->i_uid = orig->i_uid; - new_file->i_gid = orig->i_gid; - new_file->i_atime = orig->i_atime; - new_file->i_mtime = orig->i_mtime; - new_file->i_ctime = orig->i_ctime; + new_file->i_uid = newattr.ia_uid = orig->i_uid; + new_file->i_gid = newattr.ia_gid = orig->i_gid; + new_file->i_atime = newattr.ia_atime = orig->i_atime; + new_file->i_mtime = newattr.ia_mtime = orig->i_mtime; + new_file->i_ctime = newattr.ia_ctime = orig->i_ctime; + newattr.ia_valid = ATTR_UID|ATTR_GID|ATTR_ATIME|ATTR_MTIME|ATTR_CTIME; if (new_file->i_sb->s_op && new_file->i_sb->s_op->notify_change) - new_file->i_sb->s_op->notify_change(NOTIFY_UIDGID | NOTIFY_TIME, - new_file); + new_file->i_sb->s_op->notify_change(new_file, &newattr); retval = ifs_open_file(orig,&in,O_RDONLY); if (retval) { USE_INODE(dir); @@ -187,9 +193,10 @@ iput(new_file); return size < 0 ? size : retval < 0 ? retval : -ENOSPC; } - new_file->i_mode = orig->i_mode; + new_file->i_mode = newattr.ia_mode = orig->i_mode; + newattr.ia_valid = ATTR_MODE; if (new_file->i_sb->s_op && new_file->i_sb->s_op->notify_change) - new_file->i_sb->s_op->notify_change(NOTIFY_MODE,new_file); + new_file->i_sb->s_op->notify_change(new_file, &newattr); if (result) *result = new_file; else iput(new_file); diff --unified --recursive --new-file ifs.5.1a/fs/ifs/dir.c ifs-module/fs/ifs/dir.c --- ifs.5.1a/fs/ifs/dir.c Tue Apr 26 04:04:48 1994 +++ ifs-module/fs/ifs/dir.c Tue Jan 24 23:37:51 1995 @@ -6,12 +6,16 @@ * IFS directory handling functions */ +#ifdef MODULE +#include +#endif + #include #include #include #include -#include +#include "linux/ifs_fs.h" #include #include #include @@ -22,7 +26,7 @@ static int ifs_readdir(struct inode *inode,struct file *filp, struct dirent *dirent,int count); static int ifs_dir_ioctl(struct inode *inode,struct file *file,unsigned int op, - unsigned int arg); + unsigned long arg); static int ifs_dir_open(struct inode *inode,struct file *filp); static void ifs_dir_release(struct inode *inode,struct file *filp); @@ -118,6 +122,7 @@ IFS_F(filp)->layer++; continue; } + length = de.d_reclen; Dprintk("length=%d\n",length); if (length == 2 && de.d_name[0] == '.' && de.d_name[1] == '.') { for (n = 0; n < IFS_F(filp)->layer; n++) @@ -171,7 +176,7 @@ static int ifs_dir_ioctl(struct inode *inode,struct file *file,unsigned int op, - unsigned int arg) + unsigned long arg) { char *page; int retval; diff --unified --recursive --new-file ifs.5.1a/fs/ifs/file.c ifs-module/fs/ifs/file.c --- ifs.5.1a/fs/ifs/file.c Tue Apr 26 04:04:49 1994 +++ ifs-module/fs/ifs/file.c Tue Jan 24 23:37:57 1995 @@ -6,11 +6,15 @@ * IFS regular file handling primitives */ +#ifdef MODULE +#include +#endif + #include #include #include #include -#include +#include "linux/ifs_fs.h" static int ifs_lseek(struct inode *inode,struct file *filp,off_t offset, @@ -40,9 +44,8 @@ IFS_F_WRAPPER(read,C_ char *buffer C_ int size,C_ buffer C_ size,-EINVAL) IFS_F_WRAPPER(write,C_ char *buffer C_ int size,C_ buffer C_ size,-EINVAL) IFS_F_WRAPPER(select,C_ int flag C_ select_table *table,C_ flag C_ table,1) -IFS_F_WRAPPER(ioctl,C_ unsigned int op C_ unsigned int arg,C_ op C_ arg,-EINVAL) -IFS_F_WRAPPER(mmap,C_ unsigned long addr C_ size_t length C_ int mask C_ - unsigned long offset,C_ addr C_ length C_ mask C_ offset,-ENODEV) +IFS_F_WRAPPER(ioctl,C_ unsigned int op C_ unsigned long arg,C_ op C_ arg,-EINVAL) +IFS_F_WRAPPER(mmap,C_ struct vm_area_struct * vma,C_ vma,-ENODEV) IFS_F_WRAPPER(fsync,,,0) /* ? */ diff --unified --recursive --new-file ifs.5.1a/fs/ifs/inode.c ifs-module/fs/ifs/inode.c --- ifs.5.1a/fs/ifs/inode.c Tue Apr 26 04:04:49 1994 +++ ifs-module/fs/ifs/inode.c Tue Jan 24 23:43:05 1995 @@ -4,16 +4,23 @@ * Written 1992,1993 by Werner Almesberger */ +#ifdef MODULE +#include +#endif + #include #include -#include +#include "linux/ifs_fs.h" #include #include #include #include #include +#ifdef MODULE + #include +#endif void ifs_put_inode(struct inode *inode) { @@ -41,6 +48,9 @@ lock_super(sb); sb->s_dev = 0; unlock_super(sb); + #ifdef MODULE + MOD_DEC_USE_COUNT; + #endif return; } @@ -116,6 +126,9 @@ Dprintk("initializing root\n"); ifs_init_inode(s->s_mounted,layers); IFS_I(s->s_mounted)->parent = NULL; + #ifdef MODULE + MOD_INC_USE_COUNT; + #endif return s; } @@ -162,27 +175,28 @@ } -int ifs_notify_change(int flags,struct inode *inode) +int ifs_notify_change(struct inode *inode, struct iattr *attr) { int retval; -Dprintk("ifs_notify_change (0x%X,0x%X)\n",flags,(int) inode); - if (flags && IFS_IS_RO(inode)) { +Dprintk("ifs_notify_change (0x%X,0x%X)\n",attr->ia_valid,(int) inode); + if (attr->ia_valid && IFS_IS_RO(inode)) { inode->i_uid = IFS_I(inode)->val_uid; inode->i_gid = IFS_I(inode)->val_gid; inode->i_mode = IFS_I(inode)->val_mode; inode->i_size = IFS_I(inode)->val_size; return -EROFS; } - if (inode->i_uid == IFS_I(inode)->val_uid && inode->i_gid == - IFS_I(inode)->val_gid) - flags &= ~NOTIFY_UIDGID; - if (inode->i_mode == IFS_I(inode)->val_mode) - flags &= ~NOTIFY_MODE; - if (inode->i_size == IFS_I(inode)->val_size || !(S_ISREG(inode->i_mode) - || S_ISDIR(inode->i_mode))) - flags &= ~NOTIFY_SIZE; - if (!flags) + if (attr->ia_valid & ATTR_UID && attr->ia_uid == IFS_I(inode)->val_uid) + attr->ia_valid &= ~ATTR_UID; + if (attr->ia_valid & ATTR_GID && attr->ia_gid == IFS_I(inode)->val_gid) + attr->ia_valid &= ~ATTR_GID; + if (attr->ia_valid & ATTR_MODE && attr->ia_mode == IFS_I(inode)->val_mode) + attr->ia_valid &= ~ATTR_MODE; + if (attr->ia_valid & ATTR_SIZE && (attr->ia_size == IFS_I(inode)->val_size || !(S_ISREG(inode->i_mode) + || S_ISDIR(inode->i_mode)))) + attr->ia_valid &= ~ATTR_SIZE; + if (!attr->ia_valid) return 0; if (!IFS_NTH(inode,0)) { retval = ifs_clone_file(inode); @@ -195,5 +209,26 @@ IFS_NTH(inode,0)->i_size = IFS_I(inode)->val_size = inode->i_size; if (!IFS_CAN_SB(inode,0,notify_change)) return 0; - return IFS_DO_SB(inode,0,notify_change,(flags,IFS_NTH(inode,0))); + return IFS_DO_SB(inode,0,notify_change,(IFS_NTH(inode,0),attr)); +} + +#ifdef MODULE + +char kernel_version[] = UTS_RELEASE; + +static struct file_system_type ifs_fs_type = { + ifs_read_super, "ifs", 0, NULL +}; + +int init_module(void) +{ + register_filesystem(&ifs_fs_type); + return 0; +} + +void cleanup_module(void) +{ + unregister_filesystem(&ifs_fs_type); } + +#endif diff --unified --recursive --new-file ifs.5.1a/fs/ifs/misc.c ifs-module/fs/ifs/misc.c --- ifs.5.1a/fs/ifs/misc.c Tue Apr 26 04:04:49 1994 +++ ifs-module/fs/ifs/misc.c Tue Jan 24 23:43:57 1995 @@ -4,9 +4,13 @@ * Written 1992,1993 by Werner Almesberger */ +#ifdef MODULE +#include +#endif + #include -#include +#include "linux/ifs_fs.h" #include #include #include diff --unified --recursive --new-file ifs.5.1a/fs/ifs/namei.c ifs-module/fs/ifs/namei.c --- ifs.5.1a/fs/ifs/namei.c Tue Apr 26 04:04:49 1994 +++ ifs-module/fs/ifs/namei.c Tue Jan 24 23:44:01 1995 @@ -4,9 +4,13 @@ * Written 1992,1993 by Werner Almesberger */ +#ifdef MODULE +#include +#endif + #include -#include +#include "linux/ifs_fs.h" #include #include #include diff --unified --recursive --new-file ifs.5.1a/fs/ifs/symlink.c ifs-module/fs/ifs/symlink.c --- ifs.5.1a/fs/ifs/symlink.c Tue Apr 26 04:04:49 1994 +++ ifs-module/fs/ifs/symlink.c Wed Jan 25 04:16:56 1995 @@ -6,13 +6,18 @@ * IFS symlink handling code */ +#ifdef MODULE +#include +#endif + #include #include #include #include -#include +#include "linux/ifs_fs.h" #include +#include static int ifs_readlink(struct inode *inode,char *buffer,int buflen); @@ -53,7 +58,7 @@ *res_inode = NULL; if (!dir) { - dir = current->root; + dir = current->fs->root; dir->i_count++; } if (!inode) { diff --unified --recursive --new-file ifs.5.1a/ifs-patch ifs-module/ifs-patch --- ifs.5.1a/ifs-patch Thu Jan 1 01:00:00 1970 +++ ifs-module/ifs-patch Sun Feb 5 22:47:10 1995 @@ -0,0 +1,36 @@ +--- /usr/src/linux/include/linux/fs.h-old Sun Feb 5 22:39:26 1995 ++++ /usr/src/linux/include/linux/fs.h Sun Jan 15 15:31:24 1995 +@@ -251,6 +251,8 @@ + } u; + }; + ++#include ++ + struct file { + mode_t f_mode; + loff_t f_pos; +@@ -262,6 +264,7 @@ + struct inode * f_inode; + struct file_operations * f_op; + unsigned long f_version; ++ struct ifs_file_info ifs_f; + void *private_data; /* needed for tty driver, and maybe others */ + }; + +--- /usr/src/linux/fs/Makefile-old Sun Feb 5 22:43:26 1995 ++++ /usr/src/linux/fs/Makefile Tue Jan 24 23:26:28 1995 +@@ -7,7 +7,13 @@ + # + # Note 2! The CFLAGS definitions are now in the main makefile... + +-SUBDIRS = minix ext ext2 msdos proc isofs nfs xiafs umsdos hpfs sysv ++SUBDIRS = minix ext ext2 msdos proc isofs nfs xiafs umsdos hpfs sysv ifs ++ ++ifdef CONFIG_IFS_FS ++FS_SUBDIRS := $(FS_SUBDIRS) ifs ++else ++MODULE_FS_SUBDIRS := $(MODULE_FS_SUBDIRS) ifs ++endif + + ifdef CONFIG_MINIX_FS + FS_SUBDIRS := $(FS_SUBDIRS) minix diff --unified --recursive --new-file ifs.5.1a/include/linux/ifs_fs.h ifs-module/include/linux/ifs_fs.h --- ifs.5.1a/include/linux/ifs_fs.h Tue Apr 26 04:05:57 1994 +++ ifs-module/include/linux/ifs_fs.h Fri Dec 16 20:38:50 1994 @@ -6,6 +6,8 @@ */ #include +#include +#include #include #define Dprintk (void) @@ -64,11 +66,11 @@ #define IFS_DEL_NAME(n,l) \ (l == 3 && n[2] == '.' && n[0] == '.' && n[1] == '.') -#define IFS_SB(s) (&((s)->u.ifs_sb)) -#define IFS_I(i) (&((i)->u.ifs_i)) -#define IFS_F(f) (&((f)->u.ifs_f)) -#define IFS_NTH(i,n) ((i)->u.ifs_i.layer[n]) -#define IFS_LAYERS(i) ((i)->i_sb->u.ifs_sb.layers) +#define IFS_SB(s) ((struct ifs_sb_info *)&((s)->u.generic_sbp)) +#define IFS_I(i) ((struct ifs_inode_info *)&((i)->u.generic_ip)) +#define IFS_F(f) (&((f)->ifs_f)) +#define IFS_NTH(i,n) (IFS_I(i)->layer[n]) +#define IFS_LAYERS(i) (IFS_SB((i)->i_sb)->layers) #define IFS_IS_RO(i) (IS_RDONLY(IFS_NTH(i->i_sb->s_mounted,0))) @@ -151,7 +153,7 @@ extern void ifs_statfs(struct super_block *sb,struct statfs *buf); extern void ifs_read_inode(struct inode *inode); extern void ifs_write_inode(struct inode *inode); -extern int ifs_notify_change(int flags,struct inode *inode); +extern int ifs_notify_change(struct inode *, struct iattr *); /* dir.c */