From: Gabe Black Date: Wed, 14 Feb 2007 17:58:28 +0000 (-0500) Subject: Force the st_blksize field of a stat call to be 8k. X-Git-Tag: m5_2.0_beta3~193^2~1 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=276e52cdecf837fa6de247320f6813cc195f53aa;p=gem5.git Force the st_blksize field of a stat call to be 8k. --HG-- extra : convert_revision : 6cd2dc622ca95cc1ea89bd5e5cbf33d9510c351c --- diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh index 27356c9f1..f57bd5272 100644 --- a/src/sim/syscall_emul.hh +++ b/src/sim/syscall_emul.hh @@ -377,7 +377,9 @@ convertStatBuf(target_stat &tgt, host_stat *host, bool fakeTTY = false) tgt->st_mtimeX = htog(tgt->st_mtimeX); tgt->st_ctimeX = host->st_ctime; tgt->st_ctimeX = htog(tgt->st_ctimeX); - tgt->st_blksize = host->st_blksize; + // Force the block size to be 8k. This helps to ensure buffered io works + // consistently across different hosts. + tgt->st_blksize = 0x2000; tgt->st_blksize = htog(tgt->st_blksize); tgt->st_blocks = host->st_blocks; tgt->st_blocks = htog(tgt->st_blocks);