* [Qemu-devel] [PATCH] linux-user: Fix target_statfs[64] on 64-bit hosts
@ 2008-07-13 20:29 Jan Kiszka
2008-07-14 7:28 ` [Qemu-devel] " Jan Kiszka
0 siblings, 1 reply; 2+ messages in thread
From: Jan Kiszka @ 2008-07-13 20:29 UTC (permalink / raw)
To: qemu-devel
Testing qemu-x86_64, I happen to run df and came across these mistakes
in the target_statfs/target_statfs64 structure definitions (reference:
linux/include/asm-x86/statfs.h).
Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
---
linux-user/syscall_defs.h | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
Index: b/linux-user/syscall_defs.h
===================================================================
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -1600,31 +1600,31 @@ struct target_statfs64 {
};
#else
struct target_statfs {
- uint32_t f_type;
- uint32_t f_bsize;
- uint32_t f_blocks;
- uint32_t f_bfree;
- uint32_t f_bavail;
- uint32_t f_files;
- uint32_t f_ffree;
+ abi_long f_type;
+ abi_long f_bsize;
+ abi_long f_blocks;
+ abi_long f_bfree;
+ abi_long f_bavail;
+ abi_long f_files;
+ abi_long f_ffree;
target_fsid_t f_fsid;
- uint32_t f_namelen;
- uint32_t f_frsize;
- uint32_t f_spare[5];
+ abi_long f_namelen;
+ abi_long f_frsize;
+ abi_long f_spare[5];
};
struct target_statfs64 {
- uint32_t f_type;
- uint32_t f_bsize;
+ uint64_t f_type;
+ uint64_t f_bsize;
uint64_t f_blocks;
uint64_t f_bfree;
uint64_t f_bavail;
uint64_t f_files;
uint64_t f_ffree;
target_fsid_t f_fsid;
- uint32_t f_namelen;
- uint32_t f_frsize;
- uint32_t f_spare[5];
+ uint64_t f_namelen;
+ uint64_t f_frsize;
+ uint64_t f_spare[5];
};
#endif
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Qemu-devel] Re: [PATCH] linux-user: Fix target_statfs[64] on 64-bit hosts
2008-07-13 20:29 [Qemu-devel] [PATCH] linux-user: Fix target_statfs[64] on 64-bit hosts Jan Kiszka
@ 2008-07-14 7:28 ` Jan Kiszka
0 siblings, 0 replies; 2+ messages in thread
From: Jan Kiszka @ 2008-07-14 7:28 UTC (permalink / raw)
To: qemu-devel
Jan Kiszka wrote:
> Testing qemu-x86_64, I happen to run df and came across these mistakes
> in the target_statfs/target_statfs64 structure definitions (reference:
> linux/include/asm-x86/statfs.h).
Forget this, broke 32-bit guest. The trick is to enable the last but one
#if block also for x86_64 on x86_64. I've nothing to test here, but my
strong feeling is that SPARC64 needs an according fix as well.
--------
Use correct target_statfs[_64] definitions for x86/sparc64 on 64-bit.
Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
---
linux-user/syscall_defs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: b/linux-user/syscall_defs.h
===================================================================
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -1570,7 +1570,7 @@ struct target_statfs64 {
uint32_t f_namelen;
uint32_t f_spare[6];
};
-#elif defined(TARGET_PPC64) && !defined(TARGET_ABI32)
+#elif (defined(TARGET_PPC64) || defined(TARGET_X86_64) || defined(TARGET_SPARC64)) && !defined(TARGET_ABI32)
struct target_statfs {
abi_long f_type;
abi_long f_bsize;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-07-14 7:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-13 20:29 [Qemu-devel] [PATCH] linux-user: Fix target_statfs[64] on 64-bit hosts Jan Kiszka
2008-07-14 7:28 ` [Qemu-devel] " Jan Kiszka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).