diff options
author | Markus Armbruster <armbru@redhat.com> | 2015-02-10 15:02:06 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2015-02-18 10:51:36 +0100 |
commit | 12d0cc2db971cc0888b7d465143c68dee381c88b (patch) | |
tree | f250df70fac79552c4e5d34bcfd02262afd7bcd7 /net | |
parent | 091e38b7dc3255d780f0603b5b93c25078c39856 (diff) | |
download | hqemu-12d0cc2db971cc0888b7d465143c68dee381c88b.zip hqemu-12d0cc2db971cc0888b7d465143c68dee381c88b.tar.gz |
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: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/net.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -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; } |