[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] util: Emancipate id_wellformed() from QemuOpts
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH] util: Emancipate id_wellformed() from QemuOpts |
Date: |
Fri, 3 Oct 2014 09:46:13 +0100 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
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
pgpltx_8fmjFf.pgp
Description: PGP signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH] util: Emancipate id_wellformed() from QemuOpts,
Stefan Hajnoczi <=