This commit is contained in:
Miklos Szeredi 2005-12-10 20:47:46 +00:00
parent af56203290
commit 8720e933f4
2 changed files with 8 additions and 3 deletions

View File

@ -28,9 +28,8 @@ struct fuse_opt_context {
void fuse_opt_free_args(char *args[])
{
int i;
if (args) {
int i;
for (i = 0; args[i]; i++)
free(args[i]);
free(args);
@ -319,6 +318,9 @@ static int opt_parse(struct fuse_opt_context *ctx)
insert_arg(ctx, 2, ctx->opts) == -1)
return -1;
}
if (strcmp(ctx->argv[ctx->argc - 1], "--") == 0)
ctx->argv[--ctx->argc] = NULL;
return 0;
}

View File

@ -226,7 +226,10 @@ static int fuse_parse_cmdline(int argc, const char *argv[],
return -1;
}
sprintf(fsname_opt, "fsname=%s", basename);
fuse_opt_add_opt(&hopts->kernel_opts, fsname_opt);
res = fuse_opt_add_opt(&hopts->kernel_opts, fsname_opt);
free(fsname_opt);
if (res == -1)
return -1;
}
return 0;
}