various: correct laccess() error check
laccess is our own macro that uses RET_NERRNO.
This commit is contained in:
@@ -1111,12 +1111,10 @@ static int kernel_from_version(const char *version, char **ret_kernel) {
|
||||
return log_oom();
|
||||
|
||||
r = laccess(vmlinuz, F_OK);
|
||||
if (r < 0) {
|
||||
if (r == -ENOENT)
|
||||
return log_error_errno(r, "Kernel image not installed to '%s', requiring manual kernel image path specification.", vmlinuz);
|
||||
|
||||
if (r == -ENOENT)
|
||||
return log_error_errno(r, "Kernel image not installed to '%s', requiring manual kernel image path specification.", vmlinuz);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to determine if kernel image is installed to '%s': %m", vmlinuz);
|
||||
}
|
||||
|
||||
*ret_kernel = TAKE_PTR(vmlinuz);
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user