Skip to content

Commit

Permalink
win test
Browse files Browse the repository at this point in the history
Signed-off-by: Jaegeuk Kim <[email protected]>
  • Loading branch information
Jaegeuk Kim committed Sep 11, 2024
1 parent 22aeb9b commit 5a9a22f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions fsck/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,12 @@ void f2fs_parse_options(int argc, char *argv[])
#endif /* WITH_INJECT */
}

#if defined(__MINGW32__)
if (c.need_whint) {
MSG(0, "-H not supported for Windows\n");
err = EWRONG_OPT;
}
#endif
if (err == NOERROR) {
add_default_options();

Expand Down
2 changes: 2 additions & 0 deletions lib/libf2fs_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,7 @@ static int __dev_write(void *buf, __u64 offset, size_t len, enum rw_hint whint)
if (lseek(fd, (off_t)offset, SEEK_SET) < 0)
return -1;

#if ! defined(__MINGW32__)
if (set_whint) {
u64 hint = whint;
int ret;
Expand All @@ -627,6 +628,7 @@ static int __dev_write(void *buf, __u64 offset, size_t len, enum rw_hint whint)
if (ret != -1)
c.whint = whint;
}
#endif

if (write(fd, buf, len) < 0)
return -1;
Expand Down

0 comments on commit 5a9a22f

Please sign in to comment.