From e34c133ec6053025124416a3861f9f4c4f7fd772 Mon Sep 17 00:00:00 2001 From: Dees_Troy Date: Wed, 6 Feb 2013 19:13:00 +0000 Subject: Add write buffer for tar writes update fuse to 2.9.2 catch return from unlink so that we don't print error messages when things work Change-Id: I1115039a0fa5d9d73f78ef1abd79755d7ffd9d96 --- fuse/fuse_opt.c | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'fuse/fuse_opt.c') diff --git a/fuse/fuse_opt.c b/fuse/fuse_opt.c index b15e7db11..a2118cedc 100644 --- a/fuse/fuse_opt.c +++ b/fuse/fuse_opt.c @@ -54,10 +54,15 @@ int fuse_opt_add_arg(struct fuse_args *args, const char *arg) assert(!args->argv || args->allocated); + newarg = strdup(arg); + if (!newarg) + return alloc_failed(); + newargv = realloc(args->argv, (args->argc + 2) * sizeof(char *)); - newarg = newargv ? strdup(arg) : NULL; - if (!newargv || !newarg) + if (!newargv) { + free(newarg); return alloc_failed(); + } args->argv = newargv; args->allocated = 1; @@ -304,9 +309,21 @@ static int process_real_option_group(struct fuse_opt_context *ctx, char *opts) return -1; d = opts; } else { - if (s[0] == '\\' && s[1] != '\0') + if (s[0] == '\\' && s[1] != '\0') { s++; - *d++ = *s; + if (s[0] >= '0' && s[0] <= '3' && + s[1] >= '0' && s[1] <= '7' && + s[2] >= '0' && s[2] <= '7') { + *d++ = (s[0] - '0') * 0100 + + (s[1] - '0') * 0010 + + (s[2] - '0'); + s += 2; + } else { + *d++ = *s; + } + } else { + *d++ = *s; + } } s++; } -- cgit v1.2.3