qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 4/6] bsd-user/bsd-file.h: Add implementations for read, pread


From: Warner Losh
Subject: Re: [PATCH 4/6] bsd-user/bsd-file.h: Add implementations for read, pread, readv and preadv
Date: Tue, 7 Jun 2022 19:02:26 -0700



On Tue, Jun 7, 2022 at 2:45 PM Richard Henderson <richard.henderson@linaro.org> wrote:
On 6/7/22 13:14, Warner Losh wrote:
> +/* read(2) */
> +static inline abi_long do_bsd_read(abi_long arg1, abi_long arg2, abi_long arg3)

Why the inline markers?  Best to drop them.

static inline ensures that we don't get a warning if bsd-file.h is included in multiple places and these routines aren't used.

Though it turns out....
 
> +        /*
> +         * File system calls.
> +         */
> +    case TARGET_FREEBSD_NR_read: /* read(2) */
> +        ret = do_bsd_read(arg1, arg2, arg3);
> +        break;
> +
> +    case TARGET_FREEBSD_NR_pread: /* pread(2) */
> +        ret = do_bsd_pread(cpu_env, arg1, arg2, arg3, arg4, arg5, arg6);
> +        break;
> +
> +    case TARGET_FREEBSD_NR_readv: /* readv(2) */
> +        ret = do_bsd_readv(arg1, arg2, arg3);
> +        break;

Missing preadv, which you added above.

It would have caught this :)  I'll update this and the write changes...

Warner 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]