mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-01-22 00:04:31 +03:00
cmd_fsck: Collect return code of kernel fsck with close()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
b2824ebac1
commit
6ff5313cbe
2
Makefile
2
Makefile
@ -1,4 +1,4 @@
|
||||
VERSION=1.4.0
|
||||
VERSION=1.6.2
|
||||
|
||||
PREFIX?=/usr/local
|
||||
LIBEXECDIR?=$(PREFIX)/libexec
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user