]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
hibernate-resume: EINVAL -> ENOTBLK where appropriate
authorMike Yuan <me@yhndnzj.com>
Tue, 2 Apr 2024 16:51:37 +0000 (00:51 +0800)
committerMike Yuan <me@yhndnzj.com>
Wed, 3 Apr 2024 13:59:59 +0000 (21:59 +0800)
src/hibernate-resume/hibernate-resume.c

index 519aefe29faab8e74fc87bb64dbdb0d5b792d8b2..27411faa7f44a0f24b0866f8c747850eec8335fa 100644 (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. */