提交 12d0cc2d 编写于 作者: M Markus Armbruster

net: Avoid qerror_report_err() outside QMP command handlers

qerror_report_err() is a transitional interface to help with
converting existing monitor commands to QMP.  It should not be used
elsewhere.  Replace by error_report_err() in HMP command handler
hmp_host_net_add() and initial startup helpers net_init_client(),
net_init_netdev().  Keep it in QMP command handler qmp_netdev_add().
Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
Reviewed-by: NEric Blake <eblake@redhat.com>
上级 091e38b7
......@@ -974,8 +974,7 @@ void net_host_device_add(Monitor *mon, const QDict *qdict)
net_client_init(opts, 0, &local_err);
if (local_err) {
qerror_report_err(local_err);
error_free(local_err);
error_report_err(local_err);
monitor_printf(mon, "adding host network device %s failed\n", device);
}
}
......@@ -1270,8 +1269,7 @@ static int net_init_client(QemuOpts *opts, void *dummy)
net_client_init(opts, 0, &local_err);
if (local_err) {
qerror_report_err(local_err);
error_free(local_err);
error_report_err(local_err);
return -1;
}
......@@ -1285,8 +1283,7 @@ static int net_init_netdev(QemuOpts *opts, void *dummy)
ret = net_client_init(opts, 1, &local_err);
if (local_err) {
qerror_report_err(local_err);
error_free(local_err);
error_report_err(local_err);
return -1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册