Remove the pointless "empty path" check and use a better error message
if the disk was not found.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_driver.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index fb0d4a8c7a..5a4357d7a1 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -10963,12 +10963,6 @@ qemuDomainBlockResize(virDomainPtr dom,
virCheckFlags(VIR_DOMAIN_BLOCK_RESIZE_BYTES, -1);
- if (path[0] == '\0') {
- virReportError(VIR_ERR_INVALID_ARG,
- "%s", _("empty path"));
- return -1;
- }
-
/* We prefer operating on bytes. */
if ((flags & VIR_DOMAIN_BLOCK_RESIZE_BYTES) == 0) {
if (size > ULLONG_MAX / 1024) {
@@ -10996,7 +10990,7 @@ qemuDomainBlockResize(virDomainPtr dom,
if (!(disk = virDomainDiskByName(vm->def, path, false))) {
virReportError(VIR_ERR_INVALID_ARG,
- _("invalid path: %s"), path);
+ _("disk '%s' was not found in the domain
config"), path);
goto endjob;
}
--
2.16.2