summaryrefslogtreecommitdiff
path: root/lib/init.c
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2009-02-18 10:17:13 +0000
committerJean Delvare <khali@linux-fr.org>2009-02-18 10:17:13 +0000
commit680d5515f604c6d5c8a0a1bbef2da73f5e958a33 (patch)
tree142e5415434f3a524e1426545edc72f217510071 /lib/init.c
parent0d394245dc0f44a3baadbb295be83aa614bcce5b (diff)
downloadlm-sensors-git-680d5515f604c6d5c8a0a1bbef2da73f5e958a33.tar.gz
It is not an error if /etc/sensors.d doesn't exist.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5656 7894878c-1315-0410-8ee3-d5d059ff63e0
Diffstat (limited to 'lib/init.c')
-rw-r--r--lib/init.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/init.c b/lib/init.c
index 10cfc10e..b5a98c3f 100644
--- a/lib/init.c
+++ b/lib/init.c
@@ -125,6 +125,10 @@ static int add_config_from_dir(const char *dir)
count = scandir(dir, &namelist, config_file_filter, alphasort);
if (count < 0) {
+ /* Do not return an error if directory does not exist */
+ if (errno == ENOENT)
+ return 0;
+
sensors_parse_error_wfn(strerror(errno), NULL, 0);
return -SENSORS_ERR_PARSE;
}