From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48073) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDNvY-0004Pz-5Y for qemu-devel@nongnu.org; Wed, 06 Mar 2013 18:39:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UDNvV-0001d0-PU for qemu-devel@nongnu.org; Wed, 06 Mar 2013 18:39:16 -0500 Received: from mx1.redhat.com ([209.132.183.28]:5812) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDNvV-0001cl-F6 for qemu-devel@nongnu.org; Wed, 06 Mar 2013 18:39:13 -0500 Message-ID: <5137D40B.8020506@redhat.com> Date: Thu, 07 Mar 2013 00:40:59 +0100 From: Laszlo Ersek MIME-Version: 1.0 References: <1362607171-24668-1-git-send-email-lersek@redhat.com> <1362607171-24668-3-git-send-email-lersek@redhat.com> <5137CE15.1080206@redhat.com> In-Reply-To: <5137CE15.1080206@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 2/3] qga: implement qmp_guest_get_vcpus() for Linux with sysfs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: mdroth@linux.vnet.ibm.com, qemu-devel@nongnu.org On 03/07/13 00:15, Eric Blake wrote: > On 03/06/2013 02:59 PM, Laszlo Ersek wrote: >> Signed-off-by: Laszlo Ersek >> --- >> qga/commands-posix.c | 146 +++++++++++++++++++++++++++++++++++++++++++++++-- >> 1 files changed, 140 insertions(+), 6 deletions(-) >> > >> @@ -1027,6 +1031,136 @@ error: >> return NULL; >> } >> >> +#define SYSCONF_EXACT(name, err) sysconf_exact((name), #name, (err)) > > Technically, the inner () are redundant (in a parameter list, there is > no syntax that can be rendered differently if you called > sysconf_exact(name, #name, err)); but I don't mind keeping them for > style purposes (the rule of thumb of parenthesizing macro parameters for > safety is a bit easier to remember if you always do it, even when it is > redundant). You're correct, of course. I was thinking of the comma operator within the macro argument, but one has to parenthesize that even for the macro invocation, and then those parens will show up in the replacement text as well. For example, the following works: #define X(a, b) y(a, b) static void y(int p, int q) { } int main(void) { int t; X((t=1, 2), 3); return 0; } >> + vcpu->has_can_offline = true; /* lolspeak ftw */ > > Indeed :) I was hoping you'd appreciate it :) > > Reviewed-by: Eric Blake Thanks! Laszlo