[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] qdev: Reject duplicate and anti-social device I
From: |
Paul Brook |
Subject: |
Re: [Qemu-devel] [PATCH] qdev: Reject duplicate and anti-social device IDs |
Date: |
Fri, 4 Jun 2010 16:28:29 +0100 |
User-agent: |
KMail/1.13.3 (Linux/2.6.33-2-amd64; KDE/4.4.3; x86_64; ; ) |
> Paul Brook <address@hidden> 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 '.'.
Paul
P.S. Your regexp doesn't do what you think it does, but I know what you mean.