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
1 changed files with 2 additions and 4 deletions

View 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;