]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
hibernate-resume: compare device nodes using path_equal_or_inode_same 28321/head
authorMike Yuan <me@yhndnzj.com>
Sun, 9 Jul 2023 16:40:13 +0000 (00:40 +0800)
committerMike Yuan <me@yhndnzj.com>
Sun, 9 Jul 2023 16:54:13 +0000 (00:54 +0800)
Follow-up for 9deeca127520b1098c3dfab9cdfd3b9c6bf983a4

src/hibernate-resume/hibernate-resume-generator.c

index 9d4c8704a3e0c574fd3cd94a1cc4984da3b08888..b6d3d257ac699de4758ec74ddc0eed2a1ab340ee 100644 (file)
@@ -21,6 +21,7 @@
 #include "main-func.h"
 #include "os-util.h"
 #include "parse-util.h"
+#include "path-util.h"
 #include "proc-cmdline.h"
 #include "special.h"
 #include "string-util.h"
@@ -169,7 +170,7 @@ static int parse_efi_hibernate_location(void) {
                 arg_resume_device = TAKE_PTR(device);
                 arg_resume_offset = location.offset;
         } else {
-                if (!streq(arg_resume_device, device))
+                if (!path_equal_or_inode_same(arg_resume_device, device, 0))
                         log_warning("resume=%s doesn't match with HibernateLocation device '%s', proceeding anyway with resume=.",
                                     arg_resume_device, device);