Skip to content

Commit

Permalink
hmp: delvm: use hmp_handle_error
Browse files Browse the repository at this point in the history
This gives us the consistent 'Error:' prefix added in 66363e9,
which helps users like libvirt who still need to scrape hmp error
messages to detect failure.

Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Cole Robinson <[email protected]>
Message-Id: <984634226fa14316641f31f84e7dd0bb770bd94c.1556141033.git.crobinso@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <[email protected]>
  • Loading branch information
crobinso authored and dagrh committed May 1, 2019
1 parent f75d152 commit b4e492d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions hmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1480,10 +1480,11 @@ void hmp_delvm(Monitor *mon, const QDict *qdict)
const char *name = qdict_get_str(qdict, "name");

if (bdrv_all_delete_snapshot(name, &bs, &err) < 0) {
error_reportf_err(err,
"Error while deleting snapshot on device '%s': ",
bdrv_get_device_name(bs));
error_prepend(&err,
"deleting snapshot on device '%s': ",
bdrv_get_device_name(bs));
}
hmp_handle_error(mon, &err);
}

void hmp_info_snapshots(Monitor *mon, const QDict *qdict)
Expand Down

0 comments on commit b4e492d

Please sign in to comment.