[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 09/18] Dont initialize fields which aren't avail
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 09/18] Dont initialize fields which aren't available on Windows. |
Date: |
Mon, 6 Nov 2017 15:26:30 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 |
On 29/09/2017 13:13, Michael Fritscher wrote:
> Signed-off-by: Michael Fritscher <address@hidden>
> ---
> hw/9pfs/9p-synth.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/hw/9pfs/9p-synth.c b/hw/9pfs/9p-synth.c
> index df0a8de08a..e1bf0438b8 100644
> --- a/hw/9pfs/9p-synth.c
> +++ b/hw/9pfs/9p-synth.c
> @@ -150,8 +150,10 @@ static void synth_fill_statbuf(V9fsSynthNode *node,
> struct stat *stbuf)
> stbuf->st_gid = 0;
> stbuf->st_rdev = 0;
> stbuf->st_size = 0;
> +#ifndef _WIN32
> stbuf->st_blksize = 0;
> stbuf->st_blocks = 0;
> +#endif
> stbuf->st_atime = 0;
> stbuf->st_mtime = 0;
> stbuf->st_ctime = 0;
>
Just memset the whole stbuf instead, and then overwrite
st_ino/st_mode/st_nlink.
Paolo
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH 09/18] Dont initialize fields which aren't available on Windows.,
Paolo Bonzini <=