aboutsummaryrefslogtreecommitdiff
path: root/tools/virtiofsd/helper.c
diff options
context:
space:
mode:
authorEryu Guan <eguan@linux.alibaba.com>2019-08-09 16:25:36 +0800
committerDr. David Alan Gilbert <dgilbert@redhat.com>2020-01-23 16:41:37 +0000
commitfc1aed0bf96259d0b46b1cfea7497b7762c4ee3d (patch)
treec33a8ff4a94ad38f7eafee85d7ee2abeef05fe5c /tools/virtiofsd/helper.c
parente468d4af5f5192ab33283464a9f6933044ce47f7 (diff)
virtiofsd: convert more fprintf and perror to use fuse log infra
Signed-off-by: Eryu Guan <eguan@linux.alibaba.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'tools/virtiofsd/helper.c')
-rw-r--r--tools/virtiofsd/helper.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/virtiofsd/helper.c b/tools/virtiofsd/helper.c
index 33749bfcb7..f98d8f2eb2 100644
--- a/tools/virtiofsd/helper.c
+++ b/tools/virtiofsd/helper.c
@@ -208,7 +208,8 @@ int fuse_daemonize(int foreground)
char completed;
if (pipe(waiter)) {
- perror("fuse_daemonize: pipe");
+ fuse_log(FUSE_LOG_ERR, "fuse_daemonize: pipe: %s\n",
+ strerror(errno));
return -1;
}
@@ -218,7 +219,8 @@ int fuse_daemonize(int foreground)
*/
switch (fork()) {
case -1:
- perror("fuse_daemonize: fork");
+ fuse_log(FUSE_LOG_ERR, "fuse_daemonize: fork: %s\n",
+ strerror(errno));
return -1;
case 0:
break;
@@ -228,7 +230,8 @@ int fuse_daemonize(int foreground)
}
if (setsid() == -1) {
- perror("fuse_daemonize: setsid");
+ fuse_log(FUSE_LOG_ERR, "fuse_daemonize: setsid: %s\n",
+ strerror(errno));
return -1;
}