]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virDomainSnapshotDefAssignExternalNames: Improve error message
authorPeter Krempa <pkrempa@redhat.com>
Mon, 26 Jan 2026 15:39:45 +0000 (16:39 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 27 Jan 2026 09:42:24 +0000 (10:42 +0100)
Mention the 'path' where the detection failed as well as include the
possibility that the 'path' doesn't exist in the message itself.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
src/conf/snapshot_conf.c

index 039ed77b846c23f474fde1fd9af2e6e33bbb0e2e..4309667a340fa59cdfac8a2a8fd2caca25d09582 100644 (file)
@@ -541,8 +541,8 @@ virDomainSnapshotDefAssignExternalNames(virDomainSnapshotDef *def,
 
         if (stat(origpath, &sb) < 0 || !S_ISREG(sb.st_mode)) {
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                           _("source for disk '%1$s' is not a regular file; refusing to generate external snapshot name"),
-                           disk->name);
+                           _("source for disk '%1$s' (%2$s) doesn't exist or is not a regular file; refusing to generate external snapshot name"),
+                           disk->name, origpath);
             return -1;
         }