X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=util.c;h=e31649861d3b642b16396c99a1787cc8baaacc53;hb=874aa2cc72d1d23d449b26ebc111cf0a01192893;hp=496f55166b7f35a1dad171fbe7c2541a97dd7fa8;hpb=65d2ebdc3408c81a947de8712b37b9398d955465;p=elogind.git diff --git a/util.c b/util.c index 496f55166..e31649861 100644 --- a/util.c +++ b/util.c @@ -1058,6 +1058,20 @@ char *ascii_strlower(char *path) { return p; } +bool ignore_file(const char *filename) { + assert(filename); + + return + filename[0] == '.' || + endswith(filename, "~") || + endswith(filename, ".rpmnew") || + endswith(filename, ".rpmsave") || + endswith(filename, ".rpmorig") || + endswith(filename, ".dpkg-old") || + endswith(filename, ".dpkg-new") || + endswith(filename, ".swp"); +} + static const char *const ioprio_class_table[] = { [IOPRIO_CLASS_NONE] = "none", [IOPRIO_CLASS_RT] = "realtime",