diff --git a/Makefile b/Makefile index 876efbb7..8e850ec4 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION=1.4.0 +VERSION=1.6.2 PREFIX?=/usr/local LIBEXECDIR?=$(PREFIX)/libexec diff --git a/c_src/cmd_fsck.c b/c_src/cmd_fsck.c index 321463ca..0d4070a3 100644 --- a/c_src/cmd_fsck.c +++ b/c_src/cmd_fsck.c @@ -70,15 +70,17 @@ static int splice_fd_to_stdinout(int fd) select(fd + 1, &fds, NULL, NULL, NULL); int r = do_splice(fd, STDOUT_FILENO); + if (r < 0) + return r; if (r) - return r < 0 ? r : 0; + break; r = do_splice(STDIN_FILENO, fd); if (r < 0) return r; } - return 0; + return close(fd); } static int fsck_online(const char *dev_path)