diff options
author | Mike Yuan <me@yhndnzj.com> | 2023-07-09 18:40:13 +0200 |
---|---|---|
committer | Mike Yuan <me@yhndnzj.com> | 2023-07-09 18:54:13 +0200 |
commit | 4427194292311fb9899eae1543effdcb09efa19b (patch) | |
tree | 51f1611129dc947e387897330ba1d341a82b96b8 /src/hibernate-resume/hibernate-resume-generator.c | |
parent | hibernate-resume: add missing newline to the generated unit (diff) | |
download | systemd-4427194292311fb9899eae1543effdcb09efa19b.tar.xz systemd-4427194292311fb9899eae1543effdcb09efa19b.zip |
hibernate-resume: compare device nodes using path_equal_or_inode_same
Follow-up for 9deeca127520b1098c3dfab9cdfd3b9c6bf983a4
Diffstat (limited to 'src/hibernate-resume/hibernate-resume-generator.c')
-rw-r--r-- | src/hibernate-resume/hibernate-resume-generator.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/hibernate-resume/hibernate-resume-generator.c b/src/hibernate-resume/hibernate-resume-generator.c index 9d4c8704a3..b6d3d257ac 100644 --- a/src/hibernate-resume/hibernate-resume-generator.c +++ b/src/hibernate-resume/hibernate-resume-generator.c @@ -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); |