X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=util.c;h=e31649861d3b642b16396c99a1787cc8baaacc53;hb=c85dc17be718014260e10e41d15ba8f7329fed26;hp=496f55166b7f35a1dad171fbe7c2541a97dd7fa8;hpb=a6a80b4f440bcc1c6087572503c08a72ee674075;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",