From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=60530 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OLxZV-00083H-93 for qemu-devel@nongnu.org; Tue, 08 Jun 2010 08:06:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OLxZS-0005kb-Pt for qemu-devel@nongnu.org; Tue, 08 Jun 2010 08:06:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:29845) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OLxZS-0005kM-JL for qemu-devel@nongnu.org; Tue, 08 Jun 2010 08:06:18 -0400 From: Markus Armbruster Subject: Re: [Qemu-devel] [PATCH] qdev: Reject duplicate and anti-social device IDs References: <201006030751.37918.paul@codesourcery.com> <201006041628.30920.paul@codesourcery.com> Date: Tue, 08 Jun 2010 14:06:04 +0200 In-Reply-To: <201006041628.30920.paul@codesourcery.com> (Paul Brook's message of "Fri, 4 Jun 2010 16:28:29 +0100") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: Anthony Liguori , Juan Quintela , Jan Kiszka , qemu-devel@nongnu.org, Luiz Capitulino , Blue Swirl , Jan Kiszka , Gerd Hoffmann , Avi Kivity Paul Brook writes: >> Paul Brook writes: >> >> Also require IDs to start with a letter to provide for possible future >> >> extensions. >> > >> > I'd go further than that, and require that user specified IDs match >> > [A-Za-z][A-Za-z0-9_-]* >> >> I talked with Dan (cc'ed) to make sure we don't trample on existing >> libvirt usage without need. What about >> >> [A-Za-z][A-Za-z0-9_-:.]* >> >> i.e. your regexp plus ':' and '.' in the second bracket? > > I was deliberately avoiding those as they're often used as separators - we > already use ':' in other contexts so there's potential ambiguity and > parsing/quoting issues. I'm not aware of any current issues with '.'. I checked with Dan, and we can outlaw ':'. I just posted a new patch that covers all qemu-option IDs, not just qdev. [...]