On 09/02/2015 02:51 AM, Wen Congyang wrote: > Signed-off-by: Wen Congyang <we...@cn.fujitsu.com> > Signed-off-by: zhanghailiang <zhang.zhanghaili...@huawei.com> > Signed-off-by: Gonglei <arei.gong...@huawei.com>
Commit message is a bit sparse. > --- > include/qemu/option.h | 2 ++ > util/qemu-option.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 46 insertions(+) > Missing testsuite exposure of the new function. > /* > + * Adds all QDict entries to the QemuOpts that can be added and removes them > + * from the QDict. The key starts with "%index." in the %qdict. When this "%index." reads awkwardly (I thought it was a printf-style format). But I'm not sure if "starts with %index followed by '.'" is any better. > + * function returns, the QDict contains only those entries that couldn't be > + * added to the QemuOpts. > + */ > +void qemu_opts_absorb_qdict_by_index(QemuOpts *opts, QDict *qdict, > + const char *index, Error **errp) > +{ I didn't review the algorithm closely, but here's a superficial comment: > + const QDictEntry *entry, *next; > + const char *key; > + int len = strlen(index); size_t -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature