dissect: use SYNTHETIC_ERRNO() where appropriate

This commit is contained in:
Lennart Poettering 2019-01-23 16:59:57 +01:00
parent 46bba8a51c
commit 59ba6d0c17

View file

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