Re: [Qemu-devel] [PATCH] util: Emancipate id_wellformed() from QemuOpts

2014-10-03 Thread Stefan Hajnoczi
On Tue, Sep 30, 2014 at 01:59:30PM +0200, Markus Armbruster wrote: > IDs have long spread beyond QemuOpts: not everything with an ID > necessarily goes through QemuOpts. Commit 9aebf3b is about such a > case: block layer names are meant to be well-formed IDs, but some of > them don't go through Qe

Re: [Qemu-devel] [PATCH] util: Emancipate id_wellformed() from QemuOpts

2014-10-02 Thread Stefan Hajnoczi
On Thu, Oct 02, 2014 at 03:42:21PM +0200, Markus Armbruster wrote: > Stefan Hajnoczi writes: > > > On Tue, Sep 30, 2014 at 01:59:30PM +0200, Markus Armbruster wrote: > >> +bool id_wellformed(const char *id) > >> +{ > >> +int i; > >> + > >> +if (!qemu_isalpha(id[0])) { > >> +return

Re: [Qemu-devel] [PATCH] util: Emancipate id_wellformed() from QemuOpts

2014-10-02 Thread Markus Armbruster
Stefan Hajnoczi writes: > On Tue, Sep 30, 2014 at 01:59:30PM +0200, Markus Armbruster wrote: >> +bool id_wellformed(const char *id) >> +{ >> +int i; >> + >> +if (!qemu_isalpha(id[0])) { >> +return 0; > > false would be a bit nicer since the other return cases use true/false. Miss

Re: [Qemu-devel] [PATCH] util: Emancipate id_wellformed() from QemuOpts

2014-10-02 Thread Stefan Hajnoczi
On Tue, Sep 30, 2014 at 01:59:30PM +0200, Markus Armbruster wrote: > +bool id_wellformed(const char *id) > +{ > +int i; > + > +if (!qemu_isalpha(id[0])) { > +return 0; false would be a bit nicer since the other return cases use true/false. pgpWncgsK8jId.pgp Description: PGP signa

Re: [Qemu-devel] [PATCH] util: Emancipate id_wellformed() from QemuOpts

2014-09-30 Thread Eric Blake
On 09/30/2014 05:59 AM, Markus Armbruster wrote: > IDs have long spread beyond QemuOpts: not everything with an ID > necessarily goes through QemuOpts. Commit 9aebf3b is about such a > case: block layer names are meant to be well-formed IDs, but some of > them don't go through QemuOpts, and thus w

[Qemu-devel] [PATCH] util: Emancipate id_wellformed() from QemuOpts

2014-09-30 Thread Markus Armbruster
IDs have long spread beyond QemuOpts: not everything with an ID necessarily goes through QemuOpts. Commit 9aebf3b is about such a case: block layer names are meant to be well-formed IDs, but some of them don't go through QemuOpts, and thus weren't checked. The commit fixed that the straightforwar