diff options
Diffstat (limited to 'lib/mount.c')
-rw-r--r-- | lib/mount.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/mount.c b/lib/mount.c index 7a18c11..979f8d9 100644 --- a/lib/mount.c +++ b/lib/mount.c @@ -175,7 +175,7 @@ static void set_mount_flag(const char *s, int *flags) return; } } - fprintf(stderr, "fuse: internal error, can't find mount flag\n"); + fuse_log(FUSE_LOG_ERR, "fuse: internal error, can't find mount flag\n"); abort(); } @@ -248,7 +248,7 @@ static int receive_fd(int fd) cmsg = CMSG_FIRSTHDR(&msg); if (cmsg->cmsg_type != SCM_RIGHTS) { - fprintf(stderr, "got control message of unknown type %d\n", + fuse_log(FUSE_LOG_ERR, "got control message of unknown type %d\n", cmsg->cmsg_type); return -1; } @@ -312,7 +312,7 @@ static int fuse_mount_fusermount(const char *mountpoint, struct mount_opts *mo, int rv; if (!mountpoint) { - fprintf(stderr, "fuse: missing mountpoint parameter\n"); + fuse_log(FUSE_LOG_ERR, "fuse: missing mountpoint parameter\n"); return -1; } @@ -393,13 +393,13 @@ static int fuse_mount_sys(const char *mnt, struct mount_opts *mo, int res; if (!mnt) { - fprintf(stderr, "fuse: missing mountpoint parameter\n"); + fuse_log(FUSE_LOG_ERR, "fuse: missing mountpoint parameter\n"); return -1; } res = stat(mnt, &stbuf); if (res == -1) { - fprintf(stderr ,"fuse: failed to access mountpoint %s: %s\n", + fuse_log(FUSE_LOG_ERR, "fuse: failed to access mountpoint %s: %s\n", mnt, strerror(errno)); return -1; } @@ -413,9 +413,9 @@ static int fuse_mount_sys(const char *mnt, struct mount_opts *mo, fd = open(devname, O_RDWR | O_CLOEXEC); if (fd == -1) { if (errno == ENODEV || errno == ENOENT) - fprintf(stderr, "fuse: device not found, try 'modprobe fuse' first\n"); + fuse_log(FUSE_LOG_ERR, "fuse: device not found, try 'modprobe fuse' first\n"); else - fprintf(stderr, "fuse: failed to open %s: %s\n", + fuse_log(FUSE_LOG_ERR, "fuse: failed to open %s: %s\n", devname, strerror(errno)); return -1; } @@ -435,7 +435,7 @@ static int fuse_mount_sys(const char *mnt, struct mount_opts *mo, type = malloc((mo->subtype ? strlen(mo->subtype) : 0) + 32); if (!type || !source) { - fprintf(stderr, "fuse: failed to allocate memory\n"); + fuse_log(FUSE_LOG_ERR, "fuse: failed to allocate memory\n"); goto out_close; } @@ -471,10 +471,10 @@ static int fuse_mount_sys(const char *mnt, struct mount_opts *mo, int errno_save = errno; if (mo->blkdev && errno == ENODEV && !fuse_mnt_check_fuseblk()) - fprintf(stderr, + fuse_log(FUSE_LOG_ERR, "fuse: 'fuseblk' support missing\n"); else - fprintf(stderr, "fuse: mount failed: %s\n", + fuse_log(FUSE_LOG_ERR, "fuse: mount failed: %s\n", strerror(errno_save)); } |