From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=56702 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PJ7Qm-0000sa-8a for qemu-devel@nongnu.org; Thu, 18 Nov 2010 11:33:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PJ7Qk-0007Ue-I9 for qemu-devel@nongnu.org; Thu, 18 Nov 2010 11:33:52 -0500 Received: from e9.ny.us.ibm.com ([32.97.182.139]:55722) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PJ7Qk-0007UR-Fi for qemu-devel@nongnu.org; Thu, 18 Nov 2010 11:33:50 -0500 Received: from d01relay03.pok.ibm.com (d01relay03.pok.ibm.com [9.56.227.235]) by e9.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id oAIGC5e9025547 for ; Thu, 18 Nov 2010 11:12:05 -0500 Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by d01relay03.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id oAIGXmwt316444 for ; Thu, 18 Nov 2010 11:33:48 -0500 Received: from d01av01.pok.ibm.com (loopback [127.0.0.1]) by d01av01.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id oAIGXl28012798 for ; Thu, 18 Nov 2010 11:33:47 -0500 Message-ID: <4CE5556A.1060900@linux.vnet.ibm.com> Date: Thu, 18 Nov 2010 10:33:46 -0600 From: Michael Roth MIME-Version: 1.0 Subject: Re: [Qemu-devel] [RFC][PATCH v4 01/18] virtagent: add common rpc transport defs References: <1289923320-5638-1-git-send-email-mdroth@linux.vnet.ibm.com> <1289923320-5638-2-git-send-email-mdroth@linux.vnet.ibm.com> <4CE52FDF.8020500@redhat.com> In-Reply-To: <4CE52FDF.8020500@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jes Sorensen Cc: aliguori@linux.vnet.ibm.com, ryanh@us.ibm.com, agl@linux.vnet.ibm.com, qemu-devel@nongnu.org, abeekhof@redhat.com On 11/18/2010 07:53 AM, Jes Sorensen wrote: > On 11/16/10 17:01, Michael Roth wrote: >> +#define DEBUG_VA >> + >> +#ifdef DEBUG_VA >> +#define TRACE(msg, ...) do { \ >> + fprintf(stderr, "%s:%s():L%d: " msg "\n", \ >> + __FILE__, __FUNCTION__, __LINE__, ## __VA_ARGS__); \ >> +} while(0) >> +#else >> +#define TRACE(msg, ...) \ >> + do { } while (0) >> +#endif >> + >> +#define LOG(msg, ...) do { \ >> + fprintf(stderr, "%s:%s(): " msg "\n", \ >> + __FILE__, __FUNCTION__, ## __VA_ARGS__); \ >> +} while(0) > > I am sure I saw those macros in a couple of other places in the tree > recently :) > Hehe, too much compartmentalization. I do plan on moving to QEMU tracing statements instead of a macro... I only just now noticed qemu_log(), I take it this is the preferred route? >> +#define TADDR "127.0.0.1:8080" >> +#define URL "http://localhost:8080/RPC2" > > Rather than relying on hard coded addresses for this, how about moving > it to a config file? > > Cheers, > Jes