From: Sami Kerola Date: Sat, 13 Apr 2013 19:54:52 +0000 (+0100) Subject: fsck.minix: check writing to a file descriptor was successful X-Git-Tag: v2.24-rc1~588 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=564dd4af5d9d54e2d174b03abad6324050e20ef7;p=thirdparty%2Futil-linux.git fsck.minix: check writing to a file descriptor was successful Signed-off-by: Sami Kerola --- diff --git a/disk-utils/fsck.minix.c b/disk-utils/fsck.minix.c index 89e96fcfbf..c0ed0177db 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)