linux-user: in linux-user/strace.c, tswap() is useless
commitd2ee72a5b17d95fe0e57e496f1b2ddb2464b5c08
authorLaurent Vivier <laurent@vivier.eu>
Tue, 15 Feb 2011 20:10:44 +0000 (15 21:10 +0100)
committerRiku Voipio <riku.voipio@nokia.com>
Thu, 17 Feb 2011 09:46:34 +0000 (17 11:46 +0200)
treead2f12b9e2666f643cf82bd7f7326158aaaedbc3
parent4de596cb5092fbe125beb5e0b684cf0da7359624
linux-user: in linux-user/strace.c, tswap() is useless

Syscall parameters are already swapped by the caller.

This patch removes useless tswap() from strace.c

$ QEMU_STRACE=1 chroot /m68k mknod myramdisk b 1 1
with tswap()
...
29944 mknod("myramdisk",026630200000) = 0
...

without tswap()

...
30042 mknod("myramdisk",S_IFBLK|0666,makedev(1,1)) = 0
...

natively:

$ strace touch mytouch
...
open("mytouch", O_WRONLY|O_CREAT|O_NOCTTY|O_NONBLOCK, 0666) = 3
...

$ QEMU_STRACE=1 chroot /m68k touch mytouch
with tswap()
...
30368 open("/usr/share/locale/locale.alias",O_RDONLY) = 3
30368 fstat64(50331648,0x4080032c) = 0
...
30368 open("mytouch",O_RDONLY|O_CREAT|O_LARGEFILE|O_NOCTTY|O_NONBLOCK|0x1) = 0
...
without tswap()
...
30572 open("/usr/share/locale/locale.alias",O_RDONLY) = 3
30572 fstat64(3,0x4080032c) = 0
...
30572 open("mytouch",O_WRONLY|O_CREAT|O_LARGEFILE|O_NOCTTY|O_NONBLOCK,0666) = 0

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Fixes by Riku Voipio: add casts
Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
linux-user/strace.c