From: Richard Henderson <richard.henderson@linaro.org>
To: Lingfeng Yang <lfy@google.com>, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Richard Henderson <rth@twiddle.net>,
Peter Crosthwaite <crosthwaite.peter@gmail.com>,
Eduardo Habkost <ehabkost@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] Improve file-backed RAM
Date: Tue, 12 Jun 2018 05:20:28 -1000 [thread overview]
Message-ID: <6155757f-6dad-9299-80c3-d6ae4cc86e75@linaro.org> (raw)
In-Reply-To: <20180606181352.61144-1-lfy@google.com>
On 06/06/2018 08:13 AM, Lingfeng Yang via Qemu-devel wrote:
> size_t qemu_mempath_getpagesize(const char *mem_path)
> {
> +#ifndef _WIN32
> #ifdef CONFIG_LINUX
> struct statfs fs;
> int ret;
> @@ -73,10 +82,14 @@ size_t qemu_mempath_getpagesize(const char *mem_path)
> #endif
>
> return getpagesize();
> +#else
> + return WIN_FILE_PAGE_SIZE;
> +#endif
> }
As a rule, positive tests are easier to read than negative ones. And when it
comes to nesting ifdefs, doubly so.
r~
next prev parent reply other threads:[~2018-06-12 15:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-06 18:13 [Qemu-devel] [PATCH] Improve file-backed RAM Lingfeng Yang
2018-06-06 21:01 ` no-reply
2018-06-06 21:07 ` no-reply
2018-06-07 1:11 ` no-reply
2018-06-12 15:20 ` Richard Henderson [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-06-06 20:56 Lingfeng Yang
2018-06-06 21:00 ` no-reply
2018-06-06 21:05 ` no-reply
2018-06-07 1:09 ` no-reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6155757f-6dad-9299-80c3-d6ae4cc86e75@linaro.org \
--to=richard.henderson@linaro.org \
--cc=crosthwaite.peter@gmail.com \
--cc=ehabkost@redhat.com \
--cc=lfy@google.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).