summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2005-12-09 20:09:42 +0000
committerMiklos Szeredi <miklos@szeredi.hu>2005-12-09 20:09:42 +0000
commit3b534a478324b360d2a9804a28c2a49e06176f30 (patch)
tree386d13bd72ce3f378661778af27424e9dc452f9a
parent659743bc8870afd42bcacecbd6fa571befd5579f (diff)
downloadfuse-3b534a478324b360d2a9804a28c2a49e06176f30.tar.gz
new versionfuse_2_5_0_pre1
-rw-r--r--ChangeLog4
-rw-r--r--NEWS14
-rw-r--r--configure.in2
-rw-r--r--include/fuse_opt.h16
-rw-r--r--kernel/configure.ac2
-rw-r--r--lib/fuse_lowlevel.c12
-rw-r--r--lib/fuse_opt.c14
7 files changed, 42 insertions, 22 deletions
diff --git a/ChangeLog b/ChangeLog
index f71b18d..d1d98e9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2005-12-09 Miklos Szeredi <miklos@szeredi.hu>
+ * Released 2.5.0-pre1
+
+2005-12-09 Miklos Szeredi <miklos@szeredi.hu>
+
* libfuse: added option parsing interface, defined in
<fuse_opt.h>.
diff --git a/NEWS b/NEWS
index f87dab0..a98f7ab 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,17 @@
+What is new in 2.5
+
+ - Merge library part of FreeBSD port
+
+ - New atomic create+open, access and ftruncate operations
+
+ - On filesystems implementing the new create+open operation, and
+ running on Linux kernels 2.6.15 or later, the 'cp' operation will
+ work correctly when copying read-only files.
+
+ - New option parsing interface added to the library
+
+ - Lots of minor improvements and fixes
+
What is new in 2.4
- Simplify device opening. Now '/dev/fuse' is a requirement
diff --git a/configure.in b/configure.in
index bdd9502..a8aeccb 100644
--- a/configure.in
+++ b/configure.in
@@ -1,4 +1,4 @@
-AC_INIT(fuse, 2.5.0-pre0)
+AC_INIT(fuse, 2.5.0-pre1)
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(include/config.h)
diff --git a/include/fuse_opt.h b/include/fuse_opt.h
index 528ec9d..86099cd 100644
--- a/include/fuse_opt.h
+++ b/include/fuse_opt.h
@@ -146,23 +146,23 @@ typedef int (*fuse_opt_proc_t)(void *data, const char *arg, int key);
* If 'argv' is NULL, the values pointed by argcout and argvout will
* be used as input
*
- * A NULL 'opts' is the same as an 'opts' array containing a single
+ * A NULL 'opts' is equivalent to an 'opts' array containing a single
* end marker
*
- * If 'proc' is NULL, then any non-matching options will cause an
- * error to be returned
+ * A NULL 'proc' is equivalent to a processing function always
+ * returning '1'
*
* If argvout is NULL, then any output arguments are discarded
*
* If argcout is NULL, then the output argument count is not stored
*
* @param argc is the input argument count
- * @param argv is the input argument vector, may be NULL
+ * @param argv is the input argument vector
* @param data is the user data
- * @param opts is the option description array, may be NULL
- * @param proc is the processing function, may be NULL
- * @param argcout is pointer to output argument count, may be NULL
- * @param argvout is pointer to output argument vector, may be NULL
+ * @param opts is the option description array
+ * @param proc is the processing function
+ * @param argcout is pointer to output argument count
+ * @param argvout is pointer to output argument vector
* @return -1 on error, 0 on success
*/
int fuse_opt_parse(int argc, char *argv[], void *data,
diff --git a/kernel/configure.ac b/kernel/configure.ac
index eca3a3b..5d85405 100644
--- a/kernel/configure.ac
+++ b/kernel/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT(fuse-kernel, 2.5.0-pre0)
+AC_INIT(fuse-kernel, 2.5.0-pre1)
AC_CONFIG_HEADERS([config.h])
AC_PROG_INSTALL
diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c
index 370e320..b35b16a 100644
--- a/lib/fuse_lowlevel.c
+++ b/lib/fuse_lowlevel.c
@@ -925,6 +925,14 @@ static struct fuse_opt fuse_ll_opts[] = {
FUSE_OPT_END
};
+static int fuse_ll_opt_proc(void *data, const char *arg, int key)
+{
+ (void) data;
+ (void) key;
+ fprintf(stderr, "fuse: unknown option `%s'\n", arg);
+ return -1;
+}
+
int fuse_lowlevel_is_lib_option(const char *opt)
{
return fuse_opt_match(fuse_ll_opts, opt);
@@ -964,8 +972,8 @@ struct fuse_session *fuse_lowlevel_new(const char *opts,
if (opts) {
const char *argv[] = { "", "-o", opts, NULL };
- if (fuse_opt_parse(3, (char **) argv, f, fuse_ll_opts, NULL,
- NULL, NULL) == -1)
+ if (fuse_opt_parse(3, (char **) argv, f, fuse_ll_opts,
+ fuse_ll_opt_proc, NULL, NULL) == -1)
goto out_free;
}
diff --git a/lib/fuse_opt.c b/lib/fuse_opt.c
index f49e85d..e3234f2 100644
--- a/lib/fuse_opt.c
+++ b/lib/fuse_opt.c
@@ -114,17 +114,11 @@ static int insert_arg(struct fuse_opt_context *ctx, int pos, const char *arg)
static int call_proc(struct fuse_opt_context *ctx, const char *arg, int key,
int iso)
{
- int res;
-
- if (!ctx->proc) {
- fprintf(stderr, "fuse: unknown option `%s'\n", arg);
- return -1;
+ if (ctx->proc) {
+ int res = ctx->proc(ctx->data, arg, key);
+ if (res == -1 || !res)
+ return res;
}
-
- res = ctx->proc(ctx->data, arg, key);
- if (res == -1 || !res)
- return res;
-
if (iso)
return add_opt(ctx, arg);
else