1 diff -ur fuse.old/include/fuse_common_compat.h fuse.dev/include/fuse_common_compat.h
2 --- fuse.old/include/fuse_common_compat.h 2006-09-22 21:30:16.000000000 +0200
3 +++ fuse.dev/include/fuse_common_compat.h 2007-02-27 15:42:40.370284776 +0100
5 unsigned int keep_cache : 1;
8 +#ifndef DISABLE_COMPAT
9 int fuse_mount_compat25(const char *mountpoint, struct fuse_args *args);
11 int fuse_mount_compat22(const char *mountpoint, const char *opts);
13 int fuse_mount_compat1(const char *mountpoint, const char *args[]);
15 void fuse_unmount_compat22(const char *mountpoint);
18 diff -ur fuse.old/lib/fuse.c fuse.dev/lib/fuse.c
19 --- fuse.old/lib/fuse.c 2007-02-02 12:57:48.000000000 +0100
20 +++ fuse.dev/lib/fuse.c 2007-02-27 15:46:09.721458560 +0100
22 static pthread_mutex_t fuse_context_lock = PTHREAD_MUTEX_INITIALIZER;
23 static int fuse_context_ref;
25 +#ifndef DISABLE_COMPAT
26 static int fuse_compat_open(struct fuse *, fuse_req_t, char *,
27 struct fuse_file_info *);
28 static void fuse_compat_release(struct fuse *, fuse_req_t, char *,
30 static int fuse_compat_opendir(struct fuse *, fuse_req_t, char *,
31 struct fuse_file_info *);
32 static int fuse_compat_statfs(struct fuse *, fuse_req_t, struct statvfs *);
35 static struct node *get_node_nocheck(struct fuse *f, fuse_ino_t nodeid)
37 @@ -1509,10 +1511,12 @@
38 pthread_rwlock_rdlock(&f->tree_lock);
41 +#ifndef DISABLE_COMPAT
42 path = get_path(f, ino);
44 err = fuse_compat_open(f, req, path, fi);
50 printf("OPEN[%llu] flags: 0x%x\n", (unsigned long long) fi->fh,
51 @@ -1535,9 +1539,11 @@
52 if (fuse_reply_open(req, fi) == -ENOENT) {
53 /* The open syscall was interrupted, so it must be cancelled */
54 pthread_mutex_unlock(&f->lock);
55 +#ifndef DISABLE_COMPAT
56 if(f->op.release && path != NULL)
57 fuse_compat_release(f, req, path, fi);
61 get_node(f, ino)->open_count++;
62 pthread_mutex_unlock(&f->lock);
64 @@ -1661,8 +1667,10 @@
66 if (fi->flush && path && f->op.flush)
67 err = fuse_do_flush(f, req, path, fi);
68 +#ifndef DISABLE_COMPAT
70 fuse_compat_release(f, req, path, fi);
73 pthread_mutex_lock(&f->lock);
74 node = get_node(f, ino);
75 @@ -1753,12 +1761,14 @@
78 pthread_rwlock_rdlock(&f->tree_lock);
79 +#ifndef DISABLE_COMPAT
80 path = get_path(f, ino);
82 err = fuse_compat_opendir(f, req, path, &fi);
88 if (fuse_reply_open(req, llfi) == -ENOENT) {
89 /* The opendir syscall was interrupted, so it must be
91 @@ -2011,9 +2021,12 @@
94 pthread_rwlock_unlock(&f->tree_lock);
97 +#ifndef DISABLE_COMPAT
99 err = fuse_compat_statfs(f, req, &buf);
103 err = default_statfs(&buf);
106 @@ -2691,10 +2704,12 @@
107 f->conf.readdir_ino = 1;
110 +#ifndef DISABLE_COMPAT
111 if (compat && compat <= 25) {
112 if (fuse_sync_compat_args(args) == -1)
117 memcpy(&f->op, op, op_size);
119 @@ -2824,6 +2839,7 @@
120 fuse_delete_context_key();
123 +#ifndef DISABLE_COMPAT
124 #include "fuse_common_compat.h"
125 #include "fuse_compat.h"
127 @@ -3037,3 +3053,5 @@
130 __asm__(".symver fuse_new_compat25,fuse_new@FUSE_2.5");
133 diff -ur fuse.old/lib/fuse_lowlevel.c fuse.dev/lib/fuse_lowlevel.c
134 --- fuse.old/lib/fuse_lowlevel.c 2006-12-09 19:52:22.000000000 +0100
135 +++ fuse.dev/lib/fuse_lowlevel.c 2007-02-27 15:32:35.903177744 +0100
136 @@ -1297,6 +1297,7 @@
140 +#ifndef DISABLE_COMPAT
143 static void fill_open_compat(struct fuse_open_out *arg,
144 @@ -1422,3 +1423,4 @@
147 __asm__(".symver fuse_lowlevel_new_compat25,fuse_lowlevel_new@FUSE_2.5");
149 diff -ur fuse.old/lib/helper.c fuse.dev/lib/helper.c
150 --- fuse.old/lib/helper.c 2006-12-09 19:52:22.000000000 +0100
151 +++ fuse.dev/lib/helper.c 2007-02-27 15:35:17.340635520 +0100
153 struct fuse_args *args)
155 struct fuse_chan *ch;
156 - int fd = fuse_mount_compat25(mountpoint, args);
157 + int fd = fuse_kern_mount(mountpoint, args);
165 +#ifndef DISABLE_COMPAT
166 #include "fuse_compat.h"
170 __asm__(".symver fuse_teardown_compat22,fuse_teardown@FUSE_2.2");
171 __asm__(".symver fuse_main_real_compat25,fuse_main_real@FUSE_2.5");
172 __asm__(".symver fuse_mount_compat25,fuse_mount@FUSE_2.5");
174 diff -ur fuse.old/lib/mount.c fuse.dev/lib/mount.c
175 --- fuse.old/lib/mount.c 2007-01-02 18:10:33.000000000 +0100
176 +++ fuse.dev/lib/mount.c 2007-02-27 15:40:13.645590320 +0100
177 @@ -219,11 +219,16 @@
178 waitpid(pid, NULL, 0);
181 +#ifndef DISABLE_COMPAT
182 void fuse_unmount_compat22(const char *mountpoint)
184 fuse_kern_unmount(mountpoint, -1);
188 +#ifdef DISABLE_COMPAT
191 int fuse_mount_compat22(const char *mountpoint, const char *opts)
198 +#ifndef DISABLE_COMPAT
199 __asm__(".symver fuse_mount_compat22,fuse_mount@FUSE_2.2");
200 __asm__(".symver fuse_unmount_compat22,fuse_unmount@FUSE_2.2");