mirror of
https://github.com/openharmony/third_party_libfuse.git
synced 2026-07-21 00:45:56 -04:00
Check the negative return value after an open syscall
This commit is contained in:
committed by
Miklos Szeredi
parent
d6bec4020f
commit
b0ceaa0670
+4
-2
@@ -366,8 +366,10 @@ static int fuse_mount_fusermount(const char *mountpoint, const char *opts,
|
||||
|
||||
if (quiet) {
|
||||
int fd = open("/dev/null", O_RDONLY);
|
||||
dup2(fd, 1);
|
||||
dup2(fd, 2);
|
||||
if (fd != -1) {
|
||||
dup2(fd, 1);
|
||||
dup2(fd, 2);
|
||||
}
|
||||
}
|
||||
|
||||
argv[a++] = FUSERMOUNT_PROG;
|
||||
|
||||
Reference in New Issue
Block a user