diff options
Diffstat (limited to 'lib/fuse_opt.c')
-rw-r--r-- | lib/fuse_opt.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/fuse_opt.c b/lib/fuse_opt.c index f6cae4f..93066b9 100644 --- a/lib/fuse_opt.c +++ b/lib/fuse_opt.c @@ -10,6 +10,7 @@ */ #include "config.h" +#include "fuse_i.h" #include "fuse_opt.h" #include "fuse_misc.h" @@ -47,7 +48,7 @@ void fuse_opt_free_args(struct fuse_args *args) static int alloc_failed(void) { - fprintf(stderr, "fuse: memory allocation failed\n"); + fuse_log(FUSE_LOG_ERR, "fuse: memory allocation failed\n"); return -1; } @@ -99,7 +100,7 @@ int fuse_opt_insert_arg(struct fuse_args *args, int pos, const char *arg) static int next_arg(struct fuse_opt_context *ctx, const char *opt) { if (ctx->argctr + 1 >= ctx->argc) { - fprintf(stderr, "fuse: missing argument after `%s'\n", opt); + fuse_log(FUSE_LOG_ERR, "fuse: missing argument after `%s'\n", opt); return -1; } ctx->argctr++; @@ -217,7 +218,7 @@ static int process_opt_param(void *var, const char *format, const char *param, *s = copy; } else { if (sscanf(param, format, var) != 1) { - fprintf(stderr, "fuse: invalid parameter in option `%s'\n", arg); + fuse_log(FUSE_LOG_ERR, "fuse: invalid parameter in option `%s'\n", arg); return -1; } } @@ -336,7 +337,7 @@ static int process_option_group(struct fuse_opt_context *ctx, const char *opts) char *copy = strdup(opts); if (!copy) { - fprintf(stderr, "fuse: memory allocation failed\n"); + fuse_log(FUSE_LOG_ERR, "fuse: memory allocation failed\n"); return -1; } res = process_real_option_group(ctx, copy); |