Skip to content
  • Laurent Vivier's avatar
    linux-user: in linux-user/strace.c, tswap() is useless · d2ee72a5
    Laurent Vivier authored
    
    
    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: default avatarLaurent Vivier <laurent@vivier.eu>
    
    Fixes by Riku Voipio: add casts
    Signed-off-by: default avatarRiku Voipio <riku.voipio@nokia.com>
    d2ee72a5