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 QemuOpts, and thus weren't checked. The commit > fixed that the straightforward way: rename the internal QemuOpts > helper id_wellformed() to qemu_opts_id_wellformed() and give it > external linkage. > > Instead of using it directly in block.c, the commit adds wrapper > bdrv_is_valid_name(), probably to hide the connection to QemuOpts. > > Go one logical step further: emancipate IDs from QemuOpts. Rename the > function back to id_wellformed(), and put it in another file. While > there, clean up its value to bool. Peel off the bdrv_is_valid_name() > wrapper. > --- > block.c | 9 ++------- > include/qemu-common.h | 3 +++ > include/qemu/option.h | 1 - > util/Makefile.objs | 1 + > util/id.c | 28 ++++++++++++++++++++++++++++ > util/qemu-option.c | 17 +---------------- > 6 files changed, 35 insertions(+), 24 deletions(-) > create mode 100644 util/id.c
Thanks, applied to my block tree: https://github.com/stefanha/qemu/commits/block Stefan
pgp5kUp4pAQAR.pgp
Description: PGP signature