summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2007-02-14 12:58:28 -0500
committerGabe Black <gblack@eecs.umich.edu>2007-02-14 12:58:28 -0500
commit276e52cdecf837fa6de247320f6813cc195f53aa (patch)
tree0a6b01f13c7e2e23230d2403308c0a27aa244fad
parentf72a9993931c7b986df771878e22cada0028955f (diff)
downloadgem5-276e52cdecf837fa6de247320f6813cc195f53aa.tar.xz
Force the st_blksize field of a stat call to be 8k.
--HG-- extra : convert_revision : 6cd2dc622ca95cc1ea89bd5e5cbf33d9510c351c
-rw-r--r--src/sim/syscall_emul.hh4
1 files changed, 3 insertions, 1 deletions
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);