qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 13/22] bsd-user/bsd-file.h: Implementation details for the fi


From: Warner Losh
Subject: Re: [PATCH 13/22] bsd-user/bsd-file.h: Implementation details for the filesystem calls
Date: Tue, 1 Feb 2022 16:55:11 -0700



On Tue, Feb 1, 2022 at 10:43 AM Richard Henderson <richard.henderson@linaro.org> wrote:
On 2/1/22 22:14, Warner Losh wrote:
> +#ifndef BSD_FILE_H_
> +#define BSD_FILE_H_
> +
> +#include <sys/types.h>
> +#include <sys/mount.h>
> +#include <sys/uio.h>
> +#include <fcntl.h>
> +#include <poll.h>
> +#include <stdio.h>
> +#include <stdlib.h>
> +#include <unistd.h>

Many of these should be done by "qemu/osdep.h" already.  Otherwise I question putting them
into this header, as opposed to as needed by other syscall handling c files.

I can remove the ones that are done by qemu/osdep.h easily enough. That's changed over time
and these used to be required. I'm hesitant to remove the others since that's starting to get
into restructuring the code we have working upstream. On the other hand, the ordering of these
files make it such that these are often included just once, so moving to a bsd-file.h that's just the
functions and bsd-file.c that's the definition and relying on LTO to optimize. That would make things
less fragile than they are now. So I'm torn since part of floating these patches is to do a small sliver
to get feedback...  I may need to sleep on this to figure out how to weigh the 'cleaner code' vs 'risk
of introducing regressions during refactoring'.

Warner

reply via email to

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