* syscalls.cc (stat_worker): Make stat return correct st_blocks for files with

size bigger than 2Gb and less than 4Gb
This commit is contained in:
Christopher Faylor 2000-07-26 17:48:49 +00:00
parent a246b47b67
commit f489e86b8f
2 changed files with 155 additions and 149 deletions

View File

@ -1,3 +1,8 @@
Wed Jul 26 14:32:38 2000 Egor Duda <deo@logos-m.ru>
* syscalls.cc (stat_worker): Make stat return correct st_blocks for
files with size bigger than 2Gb and less than 4Gb
Wed Jul 26 17:43:00 2000 Corinna Vinschen <corinna@vinschen.de>
* security.cc (lookup_name): Search on local machine first if

View File

@ -1088,7 +1088,8 @@ stat_worker (const char *caller, const char *name, struct stat *buf,
buf->st_ctime = to_time_t (&wfd.ftCreationTime);
buf->st_size = wfd.nFileSizeLow;
buf->st_blksize = S_BLKSIZE;
buf->st_blocks = (buf->st_size + S_BLKSIZE-1) / S_BLKSIZE;
buf->st_blocks = ((unsigned long) buf->st_size +
S_BLKSIZE-1) / S_BLKSIZE;
FindClose (handle);
}
res = 0;