From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=57044 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHz8h-0002PW-3W for qemu-devel@nongnu.org; Fri, 28 May 2010 08:58:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OHz8Z-0002h7-Nx for qemu-devel@nongnu.org; Fri, 28 May 2010 08:58:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:20468) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHz8Z-0002gx-Hc for qemu-devel@nongnu.org; Fri, 28 May 2010 08:58:07 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4SCw6Fj014961 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 28 May 2010 08:58:06 -0400 Date: Fri, 28 May 2010 18:29:52 +0530 From: Amit Shah Subject: Re: [Qemu-devel] [RFC PATCH 3/3] net.h: Add description fields for qdev properites Message-ID: <20100528125952.GC9122@amit-laptop.redhat.com> References: <24764499566cd2edeb02b44be2d53150e076d5b5.1275040675.git.amit.shah@redhat.com> <24764499566cd2edeb02b44be2d53150e076d5b5.1275040675.git.amit.shah@redhat.com> <4df39362e877c2702834d869e9098ef77dc348fb.1275040675.git.amit.shah@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Gerd Hoffmann , qemu list , Juan Quintela On (Fri) May 28 2010 [14:50:46], Markus Armbruster wrote: > Amit Shah writes: > > > Signed-off-by: Amit Shah > > --- > > net.h | 13 ++++++++++--- > > 1 files changed, 10 insertions(+), 3 deletions(-) > > > > diff --git a/net.h b/net.h > > index 0e9cc5d..8ad439a 100644 > > --- a/net.h > > +++ b/net.h > > @@ -20,10 +20,17 @@ typedef struct NICConf { > > VLANClientState *peer; > > } NICConf; > > > > +#define PROP_NET_MACADDR_DESC \ > > + "The MAC address for the NIC" > > +#define PROP_NET_VLAN_DESC \ > > + "The VLAN to associate the NIC with" > > +#define PROP_NET_NETDEV_DESC \ > > + "The peer net device to associate with this virtual NIC" > > + > > #define DEFINE_NIC_PROPERTIES(_state, _conf) \ > > - DEFINE_PROP_MACADDR("mac", _state, _conf.macaddr, ""), \ > > - DEFINE_PROP_VLAN("vlan", _state, _conf.vlan, ""), \ > > - DEFINE_PROP_NETDEV("netdev", _state, _conf.peer, "") > > + DEFINE_PROP_MACADDR("mac", _state, _conf.macaddr, PROP_NET_MACADDR_DESC),\ > > + DEFINE_PROP_VLAN("vlan", _state, _conf.vlan, PROP_NET_VLAN_DESC), \ > > + DEFINE_PROP_NETDEV("netdev", _state, _conf.peer, PROP_NET_NETDEV_DESC) > > > > /* VLANs support */ > > Why the macros? Just seems cleaner; big strings can become an eyesore in such places. What do you think? Amit