[PATCH 24/33] fsck.minix: check writing to a file descriptor was successful

Sami Kerola
2013-04-13T19:56:14Z

disk-utils/fsck.minix.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/disk-utils/fsck.minix.c b/disk-utils/fsck.minix.c
index 89e96fc..c0ed017 100644
--- a/disk-utils/fsck.minix.c
+++ b/disk-utils/fsck.minix.c
@@ -1385,6 +1385,8 @@ main(int argc, char **argv) {
if (repair && !automatic)
tcsetattr(STDIN_FILENO, TCSANOW, &termios);

+ if (close_fd(IN) != 0)
+ err(FSCK_EX_ERROR, _("write failed"));
if (changed)
retcode += 3;
if (errors_uncorrected)
--
1.8.2.1