From 010d5da4e664e738d1d208aa8aa32d1615469664 Mon Sep 17 00:00:00 2001 From: David Sidrane Date: Mon, 10 Dec 2018 13:25:52 -0600 Subject: [PATCH] fs/vfs: dup() and dup2() were broken some time back. fs_dupfd() was return returing OK on success, not fit the file descriptor of the duplicated fd. --- fs/vfs/fs_dupfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/vfs/fs_dupfd.c b/fs/vfs/fs_dupfd.c index 41650368f9..2ea7deea37 100644 --- a/fs/vfs/fs_dupfd.c +++ b/fs/vfs/fs_dupfd.c @@ -140,7 +140,7 @@ int fs_dupfd(int fd, int minfd) goto errout; } - return OK; + return ret; errout: set_errno(-ret);