« Previous | Next » 

Revision d2ee72a5

IDd2ee72a5b17d95fe0e57e496f1b2ddb2464b5c08

Added by Laurent Vivier about 13 years ago

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 <>

Fixes by Riku Voipio: add casts
Signed-off-by: Riku Voipio <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences