hibernate-resume: EINVAL -> ENOTBLK where appropriate

This commit is contained in:
Mike Yuan 2024-04-03 00:51:37 +08:00
parent fbc88824b6
commit 667b0c48f2
No known key found for this signature in database
GPG key ID: 417471C0A40F58B3

View file

@ -67,7 +67,7 @@ static int run(int argc, char *argv[]) {
return log_error_errno(errno, "Failed to stat resume device '%s': %m", arg_info.device);
if (!S_ISBLK(st.st_mode))
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
return log_error_errno(SYNTHETIC_ERRNO(ENOTBLK),
"Resume device '%s' is not a block device.", arg_info.device);
/* The write shall not return if a resume takes place. */