Merge pull request #28344 from YHNdnzj/compare-device-node
hibernate-resume: add & use devnode_same to compare device nodes
This commit is contained in:
@@ -485,10 +485,6 @@ int path_compare(const char *a, const char *b) {
|
||||
}
|
||||
}
|
||||
|
||||
bool path_equal_or_inode_same(const char *a, const char *b, int flags) {
|
||||
return path_equal(a, b) || inode_same(a, b, flags) > 0;
|
||||
}
|
||||
|
||||
int path_compare_filename(const char *a, const char *b) {
|
||||
_cleanup_free_ char *fa = NULL, *fb = NULL;
|
||||
int r, j, k;
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <stddef.h>
|
||||
|
||||
#include "macro.h"
|
||||
#include "stat-util.h"
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
#include "time-util.h"
|
||||
@@ -77,7 +78,9 @@ static inline bool path_equal_filename(const char *a, const char *b) {
|
||||
return path_compare_filename(a, b) == 0;
|
||||
}
|
||||
|
||||
bool path_equal_or_inode_same(const char *a, const char *b, int flags);
|
||||
static inline bool path_equal_or_inode_same(const char *a, const char *b, int flags) {
|
||||
return path_equal(a, b) || inode_same(a, b, flags) > 0;
|
||||
}
|
||||
|
||||
char* path_extend_internal(char **x, ...);
|
||||
#define path_extend(x, ...) path_extend_internal(x, __VA_ARGS__, POINTER_MAX)
|
||||
|
||||
Reference in New Issue
Block a user