Kernel+LibC: Update struct stat to use struct timespec instead of time_t

Some programs unconditionally expect struct stat to have nanosecond support.
This commit is contained in:
Gunnar Beutner 2021-04-17 09:35:46 +02:00 committed by Andreas Kling
commit c33592d28c
Notes: sideshowbarker 2024-07-18 19:31:12 +09:00
3 changed files with 42 additions and 34 deletions

View file

@ -117,9 +117,12 @@ struct InodeMetadata {
buffer.st_size = size;
buffer.st_blksize = block_size;
buffer.st_blocks = block_count;
buffer.st_atime = atime;
buffer.st_mtime = mtime;
buffer.st_ctime = ctime;
buffer.st_atim.tv_sec = atime;
buffer.st_atim.tv_nsec = 0;
buffer.st_mtim.tv_sec = mtime;
buffer.st_mtim.tv_nsec = 0;
buffer.st_ctim.tv_sec = ctime;
buffer.st_ctim.tv_nsec = 0;
return KSuccess;
}