From 680d5515f604c6d5c8a0a1bbef2da73f5e958a33 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Wed, 18 Feb 2009 10:17:13 +0000 Subject: [PATCH] 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 --- lib/init.c | 4 ++++ 1 file changed, 4 insertions(+) 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; }