Received: from eggs.gnu.org ([2001:4830:134:3::10]:50359) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZX1eE-0005FE-PC for qemu-devel@nongnu.org; Wed, 02 Sep 2015 02:35:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZX1eB-0002f2-Iu for qemu-devel@nongnu.org; Wed, 02 Sep 2015 02:35:54 -0400 From: Alberto Garcia In-Reply-To: <45295c490f1d7c2c2209a19fba8c656967d03d5b.1441140367.git.jcody@redhat.com> References: <45295c490f1d7c2c2209a19fba8c656967d03d5b.1441140367.git.jcody@redhat.com> Date: Wed, 02 Sep 2015 08:35:37 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: Jeff Cody , qemu-devel@nongnu.org Cc: kwolf@redhat.com, programmingkidx@gmail.com, armbru@redhat.com, qemu-block@nongnu.org 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. Otherwise, the patch looks good! Reviewed-by: Alberto Garcia Berto