]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
util: make read error of PCI config file more detailed
authorLaine Stump <laine@redhat.com>
Mon, 7 Dec 2020 01:26:01 +0000 (20:26 -0500)
committerLaine Stump <laine@redhat.com>
Sat, 12 Dec 2020 23:36:39 +0000 (18:36 -0500)
The new message is more verbose/useful, but only logged at debug level
instead of as a warning (since it could easily happen in a non-error
situation).

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/util/virpci.c

index 31622cddfae78eb2570c6d5a15cbd714a5b6defb..9109fb4f3a0e0ce66125dacfd0dddccd096f5c24 100644 (file)
@@ -332,8 +332,8 @@ virPCIDeviceRead(virPCIDevicePtr dev,
 
     if (lseek(cfgfd, pos, SEEK_SET) != pos ||
         saferead(cfgfd, buf, buflen) != buflen) {
-        VIR_WARN("Failed to read from '%s' : %s", dev->path,
-                 g_strerror(errno));
+        VIR_DEBUG("Failed to read %u bytes at %u from '%s' : %s",
+                 buflen, pos, dev->path, g_strerror(errno));
         return -1;
     }
     return 0;