Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit87469c4

Browse files
committed
lets zerofill files by hand on windows in fio_send_file_write
1 parenta04f00a commit87469c4

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

‎src/utils/file.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2717,11 +2717,21 @@ fio_send_file_write(FILE* out, send_file_state* st, char *buf, size_t len)
27172717
if (len==0)
27182718
return true;
27192719

2720+
#ifndefWIN32
27202721
if (st->read_size>st->write_size&&
27212722
fseeko(out,st->read_size,SEEK_SET)!=0)
27222723
{
27232724
return false;
27242725
}
2726+
#else
2727+
while (st->read_size>st->write_size)
2728+
{
2729+
size_twr=st->read_size-st->write_size;
2730+
wr=Min(wr,sizeof(zerobuf));
2731+
fwrite(zerobuf,1,wr,out);
2732+
st->write_size+=wr;
2733+
}
2734+
#endif
27252735

27262736
if (fwrite(buf,1,len,out)!=len)
27272737
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp