Skip to content

Commit 564dd4a

Browse files
kerolasakarelzak
authored andcommitted
fsck.minix: check writing to a file descriptor was successful
Signed-off-by: Sami Kerola <[email protected]>
1 parent 83f210e commit 564dd4a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

disk-utils/fsck.minix.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,6 +1385,8 @@ main(int argc, char **argv) {
13851385
if (repair && !automatic)
13861386
tcsetattr(STDIN_FILENO, TCSANOW, &termios);
13871387

1388+
if (close_fd(IN) != 0)
1389+
err(FSCK_EX_ERROR, _("write failed"));
13881390
if (changed)
13891391
retcode += 3;
13901392
if (errors_uncorrected)

0 commit comments

Comments
 (0)