diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2005-07-21 07:59:37 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2005-07-21 07:59:37 +0000 |
commit | 9b813af8631729cf7f626f0cbac08863bb315863 (patch) | |
tree | 1ccd7493b978e83e85f27063d88045dbdddec7bb /lib | |
parent | e2aa2e243d729e29ad67f1b30aa3392ca9a9cdb2 (diff) | |
download | libfuse-9b813af8631729cf7f626f0cbac08863bb315863.tar.gz |
fixes
Diffstat (limited to 'lib')
-rw-r--r-- | lib/fuse.c | 6 | ||||
-rw-r--r-- | lib/fuse_lowlevel.c | 12 | ||||
-rw-r--r-- | lib/fuse_mt.c | 2 | ||||
-rw-r--r-- | lib/helper.c | 1 | ||||
-rw-r--r-- | lib/mount.c | 17 |
5 files changed, 23 insertions, 15 deletions
@@ -550,7 +550,7 @@ static void reply_entry(fuse_req_t req, const struct fuse_entry_param *e, int err) { if (!err) { - if (fuse_reply_entry(req, e) == -ENOENT) + if (fuse_reply_entry(req, e) == -ENOENT) forget_node(req_fuse(req), e->ino, 1); } else reply_err(req, err); @@ -1353,7 +1353,7 @@ static void fuse_releasedir(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *llfi) { struct fuse *f = req_fuse_prepare(req); - struct fuse_file_info fi; + struct fuse_file_info fi; struct fuse_dirhandle *dh = get_dirhandle(llfi, &fi); if (f->op.releasedir) { char *path; @@ -1698,7 +1698,7 @@ static int parse_lib_opts(struct fuse *f, const char *opts, char **llopts) if (fuse_ll_is_lib_option(opt)) { size_t optlen = strlen(opt); if (strcmp(opt, "debug") == 0) - f->flags |= FUSE_DEBUG; + f->flags |= FUSE_DEBUG; memmove(d, opt, optlen); d += optlen; *d++ = ','; diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c index b89ad93..4635e32 100644 --- a/lib/fuse_lowlevel.c +++ b/lib/fuse_lowlevel.c @@ -319,7 +319,7 @@ int fuse_reply_open(fuse_req_t req, const struct fuse_file_info *f) memset(&arg, 0, sizeof(arg)); arg.fh = f->fh; - + return send_reply_req(req, &arg, sizeof(arg)); } @@ -329,7 +329,7 @@ int fuse_reply_write(fuse_req_t req, size_t count) memset(&arg, 0, sizeof(arg)); arg.size = count; - + return send_reply_req(req, &arg, sizeof(arg)); } @@ -344,7 +344,7 @@ int fuse_reply_statfs(fuse_req_t req, const struct statfs *statfs) memset(&arg, 0, sizeof(arg)); convert_statfs(statfs, &arg.st); - + return send_reply_req(req, &arg, sizeof(arg)); } @@ -354,7 +354,7 @@ int fuse_reply_xattr(fuse_req_t req, size_t count) memset(&arg, 0, sizeof(arg)); arg.size = count; - + return send_reply_req(req, &arg, sizeof(arg)); } @@ -468,7 +468,7 @@ static void do_open(fuse_req_t req, fuse_ino_t nodeid, struct fuse_open_in *arg) { struct fuse_file_info fi; - + memset(&fi, 0, sizeof(fi)); fi.flags = arg->flags; @@ -735,7 +735,7 @@ void fuse_ll_process_cmd(struct fuse_ll *f, struct fuse_cmd *cmd) fprintf(stderr, "fuse: failed to allocate request\n"); goto out; } - + req->f = f; req->unique = in->unique; req->ctx.uid = in->uid; diff --git a/lib/fuse_mt.c b/lib/fuse_mt.c index c9fe63c..c9d85a8 100644 --- a/lib/fuse_mt.c +++ b/lib/fuse_mt.c @@ -22,7 +22,7 @@ static int context_ref; static struct fuse_context *mt_getcontext(void) { struct fuse_context *ctx; - + ctx = (struct fuse_context *) pthread_getspecific(context_key); if (ctx == NULL) { ctx = (struct fuse_context *) malloc(sizeof(struct fuse_context)); diff --git a/lib/helper.c b/lib/helper.c index d8e694f..681197d 100644 --- a/lib/helper.c +++ b/lib/helper.c @@ -293,7 +293,6 @@ static int fuse_parse_cmdline(int argc, const char *argv[], char **kernel_opts, } static struct fuse *fuse_setup_common(int argc, char *argv[], - const struct fuse_operations *op, size_t op_size, char **mountpoint, diff --git a/lib/mount.c b/lib/mount.c index 86ad2be..01081bb 100644 --- a/lib/mount.c +++ b/lib/mount.c @@ -72,8 +72,8 @@ void fuse_unmount(const char *mountpoint) const char *mountprog = FUSERMOUNT_PROG; char umount_cmd[1024]; - snprintf(umount_cmd, sizeof(umount_cmd) - 1, "%s -u -q -z %s", mountprog, - mountpoint); + snprintf(umount_cmd, sizeof(umount_cmd) - 1, "%s -u -q -z -- %s", + mountprog, mountpoint); umount_cmd[sizeof(umount_cmd) - 1] = '\0'; system(umount_cmd); @@ -106,8 +106,17 @@ int fuse_mount(const char *mountpoint, const char *opts) if(pid == 0) { char env[10]; - const char *argv[] = {mountprog, opts ? "-o" : mountpoint, opts, - mountpoint, NULL}; + const char *argv[32]; + int a = 0; + + argv[a++] = mountprog; + if (opts) { + argv[a++] = "-o"; + argv[a++] = opts; + } + argv[a++] = "--"; + argv[a++] = mountpoint; + argv[a++] = NULL; close(fds[1]); fcntl(fds[0], F_SETFD, 0); |