On 3 June 2013 16:58, Richard Henderson wrote:
> On 06/03/2013 08:45 AM, Peter Maydell wrote:
>> Dunno. It's not actually a char array, so I kind of prefer
>> to use plain pointer arithmetic for this kind of thing.
>
> Then drop the unnecessary parenthesis
>
> *((char *)tde + trelen - 1) = type;
On 06/03/2013 08:45 AM, Peter Maydell wrote:
>>> >> +/* The target_dirent type is in what was formerly a
>>> >> padding
>>> >> + * byte at the end of the structure:
>>> >> + */
>>> >> +*(((char *)tde) + treclen - 1) =
On 3 June 2013 16:15, Richard Henderson wrote:
> On 06/02/2013 10:10 AM, Peter Maydell wrote:
>> +tde->d_ino = tswapal(ino);
>> +tde->d_off = tswapal(off);
>> +tde->d_reclen = tswap16(treclen);
>> +memmove(tde->d_name,
On 06/02/2013 10:10 AM, Peter Maydell wrote:
> +tde->d_ino = tswapal(ino);
> +tde->d_off = tswapal(off);
> +tde->d_reclen = tswap16(treclen);
> +memmove(tde->d_name, de->d_name, namelen + 1);
Wouldn't it be better to d
I agree with all your comments.
Tested-by: Laurent Vivier
Reviewed-by: Laurent Vivier
> Le 3 juin 2013 à 13:28, Peter Maydell a écrit :
>
>
> On 3 June 2013 12:11, Laurent Vivier wrote:
> > Tested on m68k on x86_64 as described in the patch comment, in a a
> > debian-etch linux container.
> >
On 3 June 2013 12:11, Laurent Vivier wrote:
> Tested on m68k on x86_64 as described in the patch comment, in a a
> debian-etch linux container.
>
> Works fine, except the drec_len differs between getdents() and getdents64().
>> Le 2 juin 2013 à 19:10, Peter Maydell a écrit :
>> + namelen = strle
Tested on m68k on x86_64 as described in the patch comment, in a a debian-etch
linux container.
Works fine, except the drec_len differs between getdents() and getdents64().
See comment below.
> Le 2 juin 2013 à 19:10, Peter Maydell a écrit :
>
>
> Newer architectures may only implement the getd
Newer architectures may only implement the getdents64 syscall, not
getdents. Provide an implementation of getdents in terms of getdents64
so that we can run getdents-using targets on a getdents64-only host.
Signed-off-by: Peter Maydell
---
Guess which exciting new architecture doesn't have getden