[PATCH 3/3] qemuTranslateSnapshotDiskSourcePool: Use proper error code

Peter Krempa via Devel posted 3 patches 3 days, 9 hours ago
There is a newer version of this series
[PATCH 3/3] qemuTranslateSnapshotDiskSourcePool: Use proper error code
Posted by Peter Krempa via Devel 3 days, 9 hours ago
From: Peter Krempa <pkrempa@redhat.com>

The operation is not implemented so it's not really an internal error.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
 src/qemu/qemu_conf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index 712422f995..b2ced2baf0 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -1808,7 +1808,7 @@ qemuTranslateSnapshotDiskSourcePool(virDomainSnapshotDiskDef *def)
     if (def->src->type != VIR_STORAGE_TYPE_VOLUME)
         return 0;

-    virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+    virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
                    _("Snapshots are not yet supported with 'pool' volumes"));
     return -1;
 }
-- 
2.53.0