aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2001-11-07 12:09:43 +0000
committerMiklos Szeredi <miklos@szeredi.hu>2001-11-07 12:09:43 +0000
commit97c61e98b4cb4115c5d1191edefdab125a9e16fd (patch)
treeb67b00056e2bf76ef5019b81817b3e1817e99427 /kernel
parent2df1c04f30802df9a23a19e22042884430c429d2 (diff)
downloadlibfuse-97c61e98b4cb4115c5d1191edefdab125a9e16fd.tar.gz
build with automake
Diffstat (limited to 'kernel')
-rw-r--r--kernel/.cvsignore3
-rw-r--r--kernel/Makefile16
-rw-r--r--kernel/Makefile.am21
-rw-r--r--kernel/dev.c2
-rw-r--r--kernel/dir.c11
-rw-r--r--kernel/file.c2
-rw-r--r--kernel/fuse_i.h4
-rw-r--r--kernel/inode.c2
-rw-r--r--kernel/util.c2
9 files changed, 35 insertions, 28 deletions
diff --git a/kernel/.cvsignore b/kernel/.cvsignore
new file mode 100644
index 0000000..e440faf
--- /dev/null
+++ b/kernel/.cvsignore
@@ -0,0 +1,3 @@
+Makefile.in
+Makefile
+.deps
diff --git a/kernel/Makefile b/kernel/Makefile
deleted file mode 100644
index 4646162..0000000
--- a/kernel/Makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-CC = gcc
-CFLAGS = -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -pipe
-CPPFLAGS = -I /lib/modules/`uname -r`/build/include/ -D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES -I../include
-
-
-all: fuse.o
-
-fuse_objs = dev.o inode.o dir.o file.o util.o
-
-fuse.o: $(fuse_objs)
- ld -r -o fuse.o $(fuse_objs)
-
-
-clean:
- rm -f *.o
- rm -f *~
diff --git a/kernel/Makefile.am b/kernel/Makefile.am
new file mode 100644
index 0000000..cefcf63
--- /dev/null
+++ b/kernel/Makefile.am
@@ -0,0 +1,21 @@
+## Process this file with automake to produce Makefile.in
+
+EXTRA_DIST = dev.c dir.c file.c inode.c util.c fuse_i.h
+
+all-local: fuse.o
+
+clean-local:
+ rm -f *.o *.s
+
+CFLAGS = -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -pipe
+CPPFAGS = -I@KERNINCLUDE@ -I../include -D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES
+
+SUFFIXES = .c .o .s
+
+.c.o:
+ $(CC) $(CFLAGS) $(CPPFAGS) -c $<
+
+fuse_objs = dev.o dir.o file.o inode.o util.o
+
+fuse.o: $(fuse_objs)
+ ld -r -o fuse.o $(fuse_objs)
diff --git a/kernel/dev.c b/kernel/dev.c
index 8fdb37f..1ff6342 100644
--- a/kernel/dev.c
+++ b/kernel/dev.c
@@ -8,8 +8,6 @@
#include "fuse_i.h"
-#include <linux/module.h>
-#include <linux/kernel.h>
#include <linux/poll.h>
#include <linux/proc_fs.h>
#include <linux/file.h>
diff --git a/kernel/dir.c b/kernel/dir.c
index f506816..a4018ca 100644
--- a/kernel/dir.c
+++ b/kernel/dir.c
@@ -8,8 +8,6 @@
#include "fuse_i.h"
-#include <linux/module.h>
-#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/file.h>
@@ -21,6 +19,8 @@ static struct file_operations fuse_dir_operations;
static struct dentry_operations fuse_dentry_opertations;
+#define FUSE_REVALIDATE_TIME (HZ / 100)
+
static void change_attributes(struct inode *inode, struct fuse_attr *attr)
{
if(S_ISREG(inode->i_mode) && inode->i_size != attr->size)
@@ -314,7 +314,7 @@ static int fuse_revalidate(struct dentry *entry)
struct fuse_getattr_out arg;
if(inode->i_ino != FUSE_ROOT_INO &&
- time_before_eq(jiffies, entry->d_time + HZ / 100))
+ time_before_eq(jiffies, entry->d_time + FUSE_REVALIDATE_TIME))
return 0;
in.h.opcode = FUSE_GETATTR;
@@ -540,7 +540,10 @@ static int fuse_setattr(struct dentry *entry, struct iattr *attr)
static int fuse_dentry_revalidate(struct dentry *entry, int flags)
{
- if(!entry->d_inode || !(flags & LOOKUP_CONTINUE))
+ if(!entry->d_inode)
+ return 0;
+ else if(!(flags & LOOKUP_CONTINUE) &&
+ time_after(jiffies, entry->d_time + FUSE_REVALIDATE_TIME))
return 0;
else
return 1;
diff --git a/kernel/file.c b/kernel/file.c
index a677d4c..a67bdcd 100644
--- a/kernel/file.c
+++ b/kernel/file.c
@@ -7,8 +7,6 @@
*/
#include "fuse_i.h"
-#include <linux/module.h>
-#include <linux/kernel.h>
#include <linux/pagemap.h>
#include <linux/slab.h>
diff --git a/kernel/fuse_i.h b/kernel/fuse_i.h
index b3f3a9c..9bb48b0 100644
--- a/kernel/fuse_i.h
+++ b/kernel/fuse_i.h
@@ -7,6 +7,10 @@
*/
#include <linux/fuse.h>
+
+#include <linux/modversions.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/list.h>
#include <linux/spinlock.h>
diff --git a/kernel/inode.c b/kernel/inode.c
index 5fb4a66..d4d573a 100644
--- a/kernel/inode.c
+++ b/kernel/inode.c
@@ -8,8 +8,6 @@
#include "fuse_i.h"
-#include <linux/module.h>
-#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/file.h>
diff --git a/kernel/util.c b/kernel/util.c
index 9b7bec1..3e8253d 100644
--- a/kernel/util.c
+++ b/kernel/util.c
@@ -8,8 +8,6 @@
#include "fuse_i.h"
-#include <linux/module.h>
-#include <linux/kernel.h>
#include <linux/slab.h>
spinlock_t fuse_lock = SPIN_LOCK_UNLOCKED;