Skip to content

Commit

Permalink
Merge pull request #453 from Wuerfel21/W21-vfsfs-debloat-1
Browse files Browse the repository at this point in the history
Reclaim 88 bytes of bloat in v_stat
  • Loading branch information
totalspectrum authored Nov 3, 2024
2 parents 2f64d25 + dbd6ac9 commit 172c9e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/filesys/fatfs/fatfs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ int v_stat(const char *name, struct stat *buf)
buf->st_nlink = 1;
buf->st_size = finfo.fsize;
buf->st_blksize = 512;
buf->st_blocks = (buf->st_size + 511) / 512;
buf->st_blocks = (finfo.fsize + 511) / 512;
buf->st_atime = buf->st_mtime = buf->st_ctime = unixtime(finfo.fdate, finfo.ftime);
#ifdef _DEBUG_FATFS
__builtin_printf("v_stat returning %d mode=0x%x\n", r, buf->st_mode);
Expand Down

0 comments on commit 172c9e3

Please sign in to comment.