On 11.10.2012, at 15:36, Riku Voipio wrote: > Hi Alexander, > > On 21 August 2012 16:47, Peter Maydell <peter.mayd...@linaro.org> wrote: >>> +#define TARGET_FS_IOC_GETFLAGS TARGET_IORU('f', 1) >> >> This and the SETFLAGS one in the next patch fail the consistency >> check that an x86_64-on-x86_64 linux-user binary performs: >> >> cam-vm-266:precise:qemu$ ./x86_64-linux-user/qemu-x86_64 /bin/echo hello >> ERROR: ioctl(FS_IOC_GETFLAGS): target=0x80046601 host=0x80086601 >> ERROR: ioctl(FS_IOC_SETFLAGS): target=0x40046602 host=0x40086602 >> hello >> >> This is indicating that your ioctl definition is wrong: >>> + IOCTL(FS_IOC_GETFLAGS, IOC_R, MK_PTR(TYPE_INT)) >> >> ...it should be TYPE_LONG. >> >> Incidentally you could also set the target ioctl at compile >> time rather than making syscall_init patch the size field >> at runtime. I don't know whether one or the other is better >> style... There's an argument for the 'automatic' one as >> it enforces consistency and catches errors like the one above. >> Anyway, the compile-time option woud be: >> >> #define TARGET_FS_IOC_GETFLAGS TARGET_IOR('f', 1, abi_long) >> >> (You could also squash patches 1 and 2 together IMHO.) > > Has there been an updated patch with Peter's suggestions sent the list since?
Didn't get around to it yet, no. Alex > > Riku