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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Sami Kerola <kerolasa@xxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux