[PATCH 5/5] fuse2fs: redirect all messages when FUSE2FS_LOGFILE is set

Darrick J. Wong
2025-04-24T21:40:00Z

From: Darrick J. Wong <djwong@kernel.org>

If the user sets FUSE2FS_LOGFILE, redirect all debug messages and error
reports to that file.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
misc/fuse2fs.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/misc/fuse2fs.c b/misc/fuse2fs.c
index 9fd35d14e10556..fa48956396e9d1 100644
--- a/misc/fuse2fs.c
+++ b/misc/fuse2fs.c
@@ -3856,6 +3856,7 @@ int main(int argc, char *argv[])
goto out;
}
stderr = fp;
+ stdout = fp;
}

/* Will we allow users to allocate every last block? */