]> git.ipfire.org Git - thirdparty/libvirt.git/commit
fix a ambiguous output of the command:'virsh vol-create-as'
authorHongwei Bi <hwbi2008@gmail.com>
Mon, 7 Oct 2013 14:04:26 +0000 (22:04 +0800)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 7 Oct 2013 16:26:09 +0000 (18:26 +0200)
commit91875896d5bacbc74ef6bf8152edecea468d79be
tree25f80f4222d7350653aebf7dd910acfe391c4bc3
parentba1a91cd1fb3b82b40da654c3ade1fecd41537e1
fix a ambiguous output of the command:'virsh vol-create-as'

I created a storage volume(eg: test) from a storage pool(eg:vg10) using
the following command:"virsh vol-create-as --pool vg10 --name test --capacity 300M."
When I re-executed the above command, the output was as the following:
"error: Failed to create vol test
 error: Storage volume not found: storage vol 'test' already exists"

I think the output "Storage volume not found" is not appropriate. Because in fact storage
vol test has been found at this time. And then I think virErrorNumber should includes
VIR_ERR_STORAGE_EXIST which can also be used elsewhere. So I make this patch. The result
is as following:
"error: Failed to create vol test
 error: storage volume 'test' exists already"
include/libvirt/virterror.h
src/storage/storage_driver.c
src/util/virerror.c