aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/fuse_i.h2
-rw-r--r--kernel/inode.c13
-rw-r--r--kernel/util.c4
3 files changed, 8 insertions, 11 deletions
diff --git a/kernel/fuse_i.h b/kernel/fuse_i.h
index b738bed..b3f3a9c 100644
--- a/kernel/fuse_i.h
+++ b/kernel/fuse_i.h
@@ -12,8 +12,6 @@
#include <linux/spinlock.h>
#include <linux/rwsem.h>
-#define FUSE_VERSION "0.1"
-
#define MAX_CLEARED 256
/**
diff --git a/kernel/inode.c b/kernel/inode.c
index 77e8469..5fb4a66 100644
--- a/kernel/inode.c
+++ b/kernel/inode.c
@@ -66,8 +66,8 @@ static struct fuse_conn *get_conn(struct fuse_mount_data *d)
return NULL;
}
- if(d->version != FUSE_MOUNT_VERSION) {
- printk("fuse_read_super: Bad mount version: %i\n", d->version);
+ if(d->version != FUSE_KERNEL_VERSION) {
+ printk("fuse_read_super: Bad version: %i\n", d->version);
return NULL;
}
@@ -89,12 +89,12 @@ static struct fuse_conn *get_conn(struct fuse_mount_data *d)
}
-static struct inode *get_root_inode(struct super_block *sb)
+static struct inode *get_root_inode(struct super_block *sb, unsigned int mode)
{
struct fuse_attr attr;
memset(&attr, 0, sizeof(attr));
- attr.mode = S_IFDIR;
+ attr.mode = mode;
return fuse_iget(sb, 1, &attr, 0);
}
@@ -103,20 +103,21 @@ static struct super_block *fuse_read_super(struct super_block *sb,
{
struct fuse_conn *fc;
struct inode *root;
+ struct fuse_mount_data *d = data;
sb->s_blocksize = 1024;
sb->s_blocksize_bits = 10;
sb->s_magic = FUSE_SUPER_MAGIC;
sb->s_op = &fuse_super_operations;
- root = get_root_inode(sb);
+ root = get_root_inode(sb, d->rootmode);
if(root == NULL) {
printk("fuse_read_super: failed to get root inode\n");
return NULL;
}
spin_lock(&fuse_lock);
- fc = get_conn(data);
+ fc = get_conn(d);
if(fc == NULL)
goto err;
diff --git a/kernel/util.c b/kernel/util.c
index 57b1a90..9b7bec1 100644
--- a/kernel/util.c
+++ b/kernel/util.c
@@ -12,8 +12,6 @@
#include <linux/kernel.h>
#include <linux/slab.h>
-#define FUSE_VERSION "0.1"
-
spinlock_t fuse_lock = SPIN_LOCK_UNLOCKED;
/* Must be called with the fuse lock held */
@@ -28,7 +26,7 @@ int init_module(void)
{
int res;
- printk(KERN_DEBUG "fuse init (version %s)\n", FUSE_VERSION);
+ printk(KERN_DEBUG "fuse init (version %i)\n", FUSE_KERNEL_VERSION);
res = fuse_fs_init();
if(res)