From 9b2ab7ebed39ab680e0d9a489e213cb8c4f49970 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Mon, 8 Nov 2010 15:47:36 +0100 Subject: Open /dev/null for write Open /dev/null for write instead of read for redirecting stdout and stderr --- lib/mount_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/mount_util.c') diff --git a/lib/mount_util.c b/lib/mount_util.c index dbf9219..25b7e43 100644 --- a/lib/mount_util.c +++ b/lib/mount_util.c @@ -163,7 +163,7 @@ static int add_mount(const char *progname, const char *fsname, * Hide output, because old versions don't support * --no-canonicalize */ - int fd = open("/dev/null", O_RDONLY); + int fd = open("/dev/null", O_WRONLY); dup2(fd, 1); dup2(fd, 2); -- cgit v1.2.3