From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40183) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXVnw-0006nn-CB for qemu-devel@nongnu.org; Thu, 03 Sep 2015 10:48:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZXVnq-0005AJ-Qc for qemu-devel@nongnu.org; Thu, 03 Sep 2015 10:47:56 -0400 Date: Thu, 3 Sep 2015 10:47:42 -0400 From: Jeff Cody Message-ID: <20150903144742.GC19447@localhost.localdomain> References: <45295c490f1d7c2c2209a19fba8c656967d03d5b.1441140367.git.jcody@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v2 1/2] util - add automated ID generation utility List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia Cc: kwolf@redhat.com, qemu-block@nongnu.org, qemu-devel@nongnu.org, armbru@redhat.com, programmingkidx@gmail.com On Wed, Sep 02, 2015 at 08:35:37AM +0200, Alberto Garcia wrote: > On Wed 02 Sep 2015 12:30:15 AM CEST, Jeff Cody wrote: > > > Multiple sub-systems in QEMU may find it useful to generate IDs > > for objects that a user may reference via QMP or HMP. This patch > > presents a standardized way to do it, so that automatic ID generation > > follows the same rules. > > > + > > +typedef enum IdSubSystems { > > + ID_QDEV, > > + ID_BLOCK, > > + ID_MAX /* last element, used as array size */ > > +} IdSubSystems; > > + > > +char *id_generate(IdSubSystems); > > Not that it matters much, but it seems that everywhere else in the QEMU > source code the rule is to name the parameters in function prototypes. > Indeed... another syntactic tweak to make if a v3 is needed (or a maintainer insists!) > Otherwise, the patch looks good! > > Reviewed-by: Alberto Garcia > > Berto Thanks! -Jeff