QemuOpts: repurpose qemu_opts_print to replace print_option_parameters
Currently this function is not used anywhere. In later patches, it will replace print_option_parameters. To avoid print info changes, change qemu_opts_print from fprintf stderr to printf, and remove last printf. Signed-off-by: Chunyan Liu <cyliu@suse.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
5e89db7641
commit
e67905426b
@ -156,7 +156,7 @@ QDict *qemu_opts_to_qdict(QemuOpts *opts, QDict *qdict);
|
||||
void qemu_opts_absorb_qdict(QemuOpts *opts, QDict *qdict, Error **errp);
|
||||
|
||||
typedef int (*qemu_opts_loopfunc)(QemuOpts *opts, void *opaque);
|
||||
int qemu_opts_print(QemuOpts *opts, void *dummy);
|
||||
void qemu_opts_print(QemuOpts *opts);
|
||||
int qemu_opts_foreach(QemuOptsList *list, qemu_opts_loopfunc func, void *opaque,
|
||||
int abort_on_failure);
|
||||
|
||||
|
@ -895,17 +895,15 @@ void qemu_opts_del(QemuOpts *opts)
|
||||
g_free(opts);
|
||||
}
|
||||
|
||||
int qemu_opts_print(QemuOpts *opts, void *dummy)
|
||||
void qemu_opts_print(QemuOpts *opts)
|
||||
{
|
||||
QemuOpt *opt;
|
||||
|
||||
fprintf(stderr, "%s: %s:", opts->list->name,
|
||||
opts->id ? opts->id : "<noid>");
|
||||
printf("%s: %s:", opts->list->name,
|
||||
opts->id ? opts->id : "<noid>");
|
||||
QTAILQ_FOREACH(opt, &opts->head, next) {
|
||||
fprintf(stderr, " %s=\"%s\"", opt->name, opt->str);
|
||||
printf(" %s=\"%s\"", opt->name, opt->str);
|
||||
}
|
||||
fprintf(stderr, "\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int opts_do_parse(QemuOpts *opts, const char *params,
|
||||
|
Loading…
Reference in New Issue
Block a user