dissect: use SYNTHETIC_ERRNO() where appropriate
authorLennart Poettering <lennart@poettering.net>
Wed, 23 Jan 2019 15:59:57 +0000 (16:59 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 1 Mar 2019 11:41:32 +0000 (12:41 +0100)
src/shared/dissect-image.c

index d340487..94df2fe 100644 (file)
@@ -343,10 +343,8 @@ int dissect_image(
 
         errno = 0;
         r = blkid_do_safeprobe(b);
-        if (IN_SET(r, -2, 1)) {
-                log_debug("Failed to identify any partition table.");
-                return -ENOPKG;
-        }
+        if (IN_SET(r, -2, 1))
+                return log_debug_errno(SYNTHETIC_ERRNO(ENOPKG), "Failed to identify any partition table.");
         if (r != 0)
                 return -errno ?: -EIO;