Received: from eggs.gnu.org ([2001:4830:134:3::10]:44192) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcvN3-0008Po-MY for qemu-devel@nongnu.org; Fri, 18 Sep 2015 09:06:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZcvN2-000639-Qw for qemu-devel@nongnu.org; Fri, 18 Sep 2015 09:06:33 -0400 From: Markus Armbruster References: Date: Fri, 18 Sep 2015 15:06:25 +0200 In-Reply-To: (Jeff Cody's message of "Tue, 1 Sep 2015 18:30:14 -0400") Message-ID: <87bncz3mi6.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v2 0/2] Auto-generated IDs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jeff Cody Cc: kwolf@redhat.com, programmingkidx@gmail.com, jsnow@redhat.com, qemu-devel@nongnu.org, qemu-block@nongnu.org Jeff Cody writes: > Changes from RFC v1: > > Patch 1: Several typos / grammatical errors (thanks Eric, John) > Make id_subsys_str[] const pointer to const strings (thanks Eric) > Moved id_subsys_str[] out from id_generate() (thanks John) > Assert on null string for given id (thanks Eric) > Zero-pad the 2-digit random # (thanks John) > > Patch 2: None > > Born from the conversation on qemu-devel, this generation scheme uses the > format ultimately proposed by Kevin, after list discussion. > > It attempts to keep the ID strings as small as possible, while fulfilling: > > 1.) Guarantee no collisions with a user-specified ID > 2.) Identify the sub-system the ID belongs to > 3.) Guarantee of uniqueness > 4.) Spoiling predictibility, to avoid creating an assumption > of object ordering and parsing (i.e., we don't want users to think > they can guess the next ID based on prior behavior). > > See patch 1 for the generation scheme details. Since PATCH 1 defines an ID for the qdev subsystem, I expected a patch to put it to use. As long as there is none, PATCH 1 shouldn't define ID_QDEV. Looks good apart from a harmless off-by-one and a few style nits.