On 22.01.2013 12:22, Peter Krempa wrote:
This patch fixes the following issues in the cpu-stats virsh
command:
1) Renames label failed_params to no_memory to match coding style
2) Uses proper typed parameter cleanup in error paths to avoid leaks
3) Adds a ret variable and simplifies error labels
4) Changes error message to a slightly more descriptive one and gets rid
of the newline at the end:
Before:
$ virsh cpu-stats tr
error: Failed to virDomainGetCPUStats()
error: Requested operation is not valid: domain is not running
After:
$ tools/virsh cpu-stats tr
error: Failed to retrieve CPU statistics for domain 'tr'
error: Requested operation is not valid: domain is not running
---
tools/virsh-domain.c | 27 ++++++++++++++-------------
1 file changed, 14 insertions(+), 13 deletions(-)
ACK
Michal