X-Git-Url: https://git.xinqibao.xyz/slstatus.git/blobdiff_plain/7246dc4381c6c95454672a5c1aff65a02d6d3747..709549b4bd9fee0e0054c0dfa75fff9ac18f2862:/components/num_files.c diff --git a/components/num_files.c b/components/num_files.c index a8a3894..acf9dfa 100644 --- a/components/num_files.c +++ b/components/num_files.c @@ -1,6 +1,6 @@ /* See LICENSE file for copyright and license details. */ +#include #include -#include #include #include @@ -14,7 +14,7 @@ num_files(const char *dir) int num = 0; if ((fd = opendir(dir)) == NULL) { - warn("Failed to get number of files in directory %s", dir); + fprintf(stderr, "opendir '%s': %s\n", dir, strerror(errno)); return NULL; }