diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-11-28 23:43:06 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-11-28 23:43:06 -0500 |
commit | 6829fb201072c495ce9e97850664540a0f8294f1 (patch) | |
tree | ddab42da9b0aafa68b02d41a94e2f25eb97ca149 | |
parent | d4932bf0e32375451e7cfd4b776bb5c470e9afb8 (diff) |
fix online fsck options
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r-- | c_src/cmd_fsck.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/c_src/cmd_fsck.c b/c_src/cmd_fsck.c index 8beb108d..2ea51ff2 100644 --- a/c_src/cmd_fsck.c +++ b/c_src/cmd_fsck.c @@ -90,12 +90,14 @@ static int splice_fd_to_stdinout(int fd) return close(fd); } -static int fsck_online(const char *dev_path) +static int fsck_online(const char *dev_path, const char *opt_str) { int dev_idx; struct bchfs_handle fs = bchu_fs_open_by_dev(dev_path, &dev_idx); - struct bch_ioctl_fsck_online fsck = { 0 }; + struct bch_ioctl_fsck_online fsck = { + .opts = (unsigned long) opt_str + }; int fsck_fd = ioctl(fs.ioctl_fd, BCH_IOCTL_FSCK_ONLINE, &fsck); if (fsck_fd < 0) @@ -271,7 +273,7 @@ int cmd_fsck(int argc, char *argv[]) darray_for_each(devs, i) if (dev_mounted(*i)) { printf("Running fsck online\n"); - return fsck_online(*i); + return fsck_online(*i, opts_str.buf); } int kernel_probed = kernel; |