summaryrefslogtreecommitdiffstats
path: root/include/qemu/option.h
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2014-09-30 13:59:30 +0200
committerStefan Hajnoczi <stefanha@redhat.com>2014-10-03 10:30:33 +0100
commitf5bebbbb28dc7a149a891f0f1e112fb50bb72664 (patch)
tree8bf30a59e4ce61326a92cefc7d03036104bdb170 /include/qemu/option.h
parentd93162e13c1f4a5b2a4de6b1997f32e3fca19e67 (diff)
downloadhqemu-f5bebbbb28dc7a149a891f0f1e112fb50bb72664.zip
hqemu-f5bebbbb28dc7a149a891f0f1e112fb50bb72664.tar.gz
util: Emancipate id_wellformed() from QemuOpts
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. [Replaced stray return 0 with return false to match bool returns used elsewhere in id_wellformed(). --Stefan] Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include/qemu/option.h')
-rw-r--r--include/qemu/option.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/include/qemu/option.h b/include/qemu/option.h
index 945347c..59bea75 100644
--- a/include/qemu/option.h
+++ b/include/qemu/option.h
@@ -103,7 +103,6 @@ typedef int (*qemu_opt_loopfunc)(const char *name, const char *value, void *opaq
int qemu_opt_foreach(QemuOpts *opts, qemu_opt_loopfunc func, void *opaque,
int abort_on_failure);
-int qemu_opts_id_wellformed(const char *id);
QemuOpts *qemu_opts_find(QemuOptsList *list, const char *id);
QemuOpts *qemu_opts_create(QemuOptsList *list, const char *id,
int fail_if_exists, Error **errp);
OpenPOWER on IntegriCloud