diff options
author | Lennart Poettering <lennart@poettering.net> | 2022-02-14 17:21:41 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2022-02-14 17:27:14 +0100 |
commit | a9dac7a6dd31225dbe9633061dcade12c0c90a32 (patch) | |
tree | 9fdf4d4480ecc18aa7306f8eddce2d9f5a8649d3 /src/coredump/coredump-vacuum.c | |
parent | stat-util: add helper stat_inode_same() for comparing stat's st_dev/st_ino in... (diff) | |
download | systemd-a9dac7a6dd31225dbe9633061dcade12c0c90a32.tar.xz systemd-a9dac7a6dd31225dbe9633061dcade12c0c90a32.zip |
tree-wide: port various places over to new stat_inode_same() helper
Diffstat (limited to 'src/coredump/coredump-vacuum.c')
-rw-r--r-- | src/coredump/coredump-vacuum.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/coredump/coredump-vacuum.c b/src/coredump/coredump-vacuum.c index dcf9cc03cd..c6e201ecf2 100644 --- a/src/coredump/coredump-vacuum.c +++ b/src/coredump/coredump-vacuum.c @@ -13,6 +13,7 @@ #include "hashmap.h" #include "macro.h" #include "memory-util.h" +#include "stat-util.h" #include "string-util.h" #include "time-util.h" #include "user-util.h" @@ -167,9 +168,7 @@ int coredump_vacuum(int exclude_fd, uint64_t keep_free, uint64_t max_use) { if (!S_ISREG(st.st_mode)) continue; - if (exclude_fd >= 0 && - exclude_st.st_dev == st.st_dev && - exclude_st.st_ino == st.st_ino) + if (exclude_fd >= 0 && stat_inode_same(&exclude_st, &st)) continue; r = hashmap_ensure_allocated(&h, NULL); |