Commit 7f0df995 authored by Milan Broz's avatar Milan Broz

Properly parse errno to error message for devices.

parent bebd2fe7
......@@ -576,7 +576,7 @@ static int device_info(struct crypt_device *cd,
}
if (fd == -1) {
r = -EINVAL;
r = errno ? -errno : -EINVAL;
goto out;
}
......@@ -619,6 +619,7 @@ out:
break;
default:
log_err(cd, _("Cannot get info about device %s."), device_path(device));
r = -EINVAL;
}
return r;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment