mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-12-18 10:25:00 +02:00
b947ccab5d
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7716 3c298f89-4303-0410-b956-a3cf2f4a3e73
207 lines
5.9 KiB
Diff
207 lines
5.9 KiB
Diff
Index: fuse-2.6.5/include/fuse_common_compat.h
|
|
===================================================================
|
|
--- fuse-2.6.5.orig/include/fuse_common_compat.h 2007-06-23 13:03:50.000000000 +0200
|
|
+++ fuse-2.6.5/include/fuse_common_compat.h 2007-06-23 13:03:51.000000000 +0200
|
|
@@ -17,6 +17,7 @@
|
|
unsigned int keep_cache : 1;
|
|
};
|
|
|
|
+#ifndef DISABLE_COMPAT
|
|
int fuse_mount_compat25(const char *mountpoint, struct fuse_args *args);
|
|
|
|
int fuse_mount_compat22(const char *mountpoint, const char *opts);
|
|
@@ -24,4 +25,4 @@
|
|
int fuse_mount_compat1(const char *mountpoint, const char *args[]);
|
|
|
|
void fuse_unmount_compat22(const char *mountpoint);
|
|
-
|
|
+#endif
|
|
Index: fuse-2.6.5/lib/fuse.c
|
|
===================================================================
|
|
--- fuse-2.6.5.orig/lib/fuse.c 2007-06-23 13:03:50.000000000 +0200
|
|
+++ fuse-2.6.5/lib/fuse.c 2007-06-23 13:03:51.000000000 +0200
|
|
@@ -128,6 +128,7 @@
|
|
static pthread_mutex_t fuse_context_lock = PTHREAD_MUTEX_INITIALIZER;
|
|
static int fuse_context_ref;
|
|
|
|
+#ifndef DISABLE_COMPAT
|
|
static int fuse_compat_open(struct fuse *, fuse_req_t, char *,
|
|
struct fuse_file_info *);
|
|
static void fuse_compat_release(struct fuse *, fuse_req_t, char *,
|
|
@@ -135,6 +136,7 @@
|
|
static int fuse_compat_opendir(struct fuse *, fuse_req_t, char *,
|
|
struct fuse_file_info *);
|
|
static int fuse_compat_statfs(struct fuse *, fuse_req_t, struct statvfs *);
|
|
+#endif
|
|
|
|
static struct node *get_node_nocheck(struct fuse *f, fuse_ino_t nodeid)
|
|
{
|
|
@@ -1509,10 +1511,12 @@
|
|
pthread_rwlock_rdlock(&f->tree_lock);
|
|
if (f->op.open) {
|
|
err = -ENOENT;
|
|
+#ifndef DISABLE_COMPAT
|
|
path = get_path(f, ino);
|
|
if (path != NULL)
|
|
err = fuse_compat_open(f, req, path, fi);
|
|
- }
|
|
+#endif
|
|
+ }
|
|
if (!err) {
|
|
if (f->conf.debug) {
|
|
printf("OPEN[%llu] flags: 0x%x\n", (unsigned long long) fi->fh,
|
|
@@ -1535,9 +1539,11 @@
|
|
if (fuse_reply_open(req, fi) == -ENOENT) {
|
|
/* The open syscall was interrupted, so it must be cancelled */
|
|
pthread_mutex_unlock(&f->lock);
|
|
+#ifndef DISABLE_COMPAT
|
|
if(f->op.release && path != NULL)
|
|
fuse_compat_release(f, req, path, fi);
|
|
- } else {
|
|
+#endif
|
|
+ } else {
|
|
get_node(f, ino)->open_count++;
|
|
pthread_mutex_unlock(&f->lock);
|
|
}
|
|
@@ -1661,8 +1667,10 @@
|
|
}
|
|
if (fi->flush && path && f->op.flush)
|
|
err = fuse_do_flush(f, req, path, fi);
|
|
+#ifndef DISABLE_COMPAT
|
|
if (f->op.release)
|
|
fuse_compat_release(f, req, path, fi);
|
|
+#endif
|
|
|
|
pthread_mutex_lock(&f->lock);
|
|
node = get_node(f, ino);
|
|
@@ -1753,12 +1761,14 @@
|
|
|
|
err = -ENOENT;
|
|
pthread_rwlock_rdlock(&f->tree_lock);
|
|
+#ifndef DISABLE_COMPAT
|
|
path = get_path(f, ino);
|
|
if (path != NULL) {
|
|
err = fuse_compat_opendir(f, req, path, &fi);
|
|
dh->fh = fi.fh;
|
|
}
|
|
- if (!err) {
|
|
+#endif
|
|
+ if (!err) {
|
|
if (fuse_reply_open(req, llfi) == -ENOENT) {
|
|
/* The opendir syscall was interrupted, so it must be
|
|
cancelled */
|
|
@@ -2011,9 +2021,12 @@
|
|
free(path);
|
|
}
|
|
pthread_rwlock_unlock(&f->tree_lock);
|
|
- } else
|
|
+ }
|
|
+#ifndef DISABLE_COMPAT
|
|
+ else
|
|
err = fuse_compat_statfs(f, req, &buf);
|
|
- } else
|
|
+#endif
|
|
+ } else
|
|
err = default_statfs(&buf);
|
|
|
|
if (!err)
|
|
@@ -2691,10 +2704,12 @@
|
|
f->conf.readdir_ino = 1;
|
|
#endif
|
|
|
|
+#ifndef DISABLE_COMPAT
|
|
if (compat && compat <= 25) {
|
|
if (fuse_sync_compat_args(args) == -1)
|
|
goto out_free;
|
|
}
|
|
+#endif
|
|
|
|
memcpy(&f->op, op, op_size);
|
|
if (!f->op.lock) {
|
|
@@ -2824,6 +2839,7 @@
|
|
fuse_delete_context_key();
|
|
}
|
|
|
|
+#ifndef DISABLE_COMPAT
|
|
#include "fuse_common_compat.h"
|
|
#include "fuse_compat.h"
|
|
|
|
@@ -3037,3 +3053,5 @@
|
|
}
|
|
|
|
__asm__(".symver fuse_new_compat25,fuse_new@FUSE_2.5");
|
|
+
|
|
+#endif
|
|
Index: fuse-2.6.5/lib/fuse_lowlevel.c
|
|
===================================================================
|
|
--- fuse-2.6.5.orig/lib/fuse_lowlevel.c 2007-06-23 13:03:50.000000000 +0200
|
|
+++ fuse-2.6.5/lib/fuse_lowlevel.c 2007-06-23 13:03:51.000000000 +0200
|
|
@@ -1297,6 +1297,7 @@
|
|
}
|
|
|
|
|
|
+#ifndef DISABLE_COMPAT
|
|
#ifndef __FreeBSD__
|
|
|
|
static void fill_open_compat(struct fuse_open_out *arg,
|
|
@@ -1422,3 +1423,4 @@
|
|
}
|
|
|
|
__asm__(".symver fuse_lowlevel_new_compat25,fuse_lowlevel_new@FUSE_2.5");
|
|
+#endif
|
|
Index: fuse-2.6.5/lib/helper.c
|
|
===================================================================
|
|
--- fuse-2.6.5.orig/lib/helper.c 2007-06-23 13:03:50.000000000 +0200
|
|
+++ fuse-2.6.5/lib/helper.c 2007-06-23 13:03:51.000000000 +0200
|
|
@@ -195,7 +195,7 @@
|
|
struct fuse_args *args)
|
|
{
|
|
struct fuse_chan *ch;
|
|
- int fd = fuse_mount_compat25(mountpoint, args);
|
|
+ int fd = fuse_kern_mount(mountpoint, args);
|
|
if (fd == -1)
|
|
return NULL;
|
|
|
|
@@ -338,6 +338,7 @@
|
|
return -1;
|
|
}
|
|
|
|
+#ifndef DISABLE_COMPAT
|
|
#include "fuse_compat.h"
|
|
|
|
#ifndef __FreeBSD__
|
|
@@ -431,3 +432,4 @@
|
|
__asm__(".symver fuse_teardown_compat22,fuse_teardown@FUSE_2.2");
|
|
__asm__(".symver fuse_main_real_compat25,fuse_main_real@FUSE_2.5");
|
|
__asm__(".symver fuse_mount_compat25,fuse_mount@FUSE_2.5");
|
|
+#endif
|
|
Index: fuse-2.6.5/lib/mount.c
|
|
===================================================================
|
|
--- fuse-2.6.5.orig/lib/mount.c 2007-06-23 13:03:50.000000000 +0200
|
|
+++ fuse-2.6.5/lib/mount.c 2007-06-23 13:03:51.000000000 +0200
|
|
@@ -219,11 +219,16 @@
|
|
waitpid(pid, NULL, 0);
|
|
}
|
|
|
|
+#ifndef DISABLE_COMPAT
|
|
void fuse_unmount_compat22(const char *mountpoint)
|
|
{
|
|
fuse_kern_unmount(mountpoint, -1);
|
|
}
|
|
+#endif
|
|
|
|
+#ifdef DISABLE_COMPAT
|
|
+static
|
|
+#endif
|
|
int fuse_mount_compat22(const char *mountpoint, const char *opts)
|
|
{
|
|
int fds[2], pid;
|
|
@@ -304,5 +309,7 @@
|
|
return res;
|
|
}
|
|
|
|
+#ifndef DISABLE_COMPAT
|
|
__asm__(".symver fuse_mount_compat22,fuse_mount@FUSE_2.2");
|
|
__asm__(".symver fuse_unmount_compat22,fuse_unmount@FUSE_2.2");
|
|
+#endif
|