Message ID | 669b29839e890998b68f85355f2feb8943c90c6e.1369085762.git.ydroneaud@opteya.com (mailing list archive) |
---|---|
State | Rejected |
Headers | show |
diff --git a/src/init.c b/src/init.c index 96ecf04..c880b68 100644 --- a/src/init.c +++ b/src/init.c @@ -308,6 +308,9 @@ static void read_config(void) while ((dent = readdir(conf_dir))) { struct stat buf; + if (dent->d_name[0] == '.') + continue; + if (asprintf(&path, "%s/%s", IBV_CONFIG_DIR, dent->d_name) < 0) { fprintf(stderr, PFX "Warning: couldn't read config file %s/%s.\n", IBV_CONFIG_DIR, dent->d_name);
Files beginning with a dot are mostly current and parent directories or, by convention, hidden files. Those path are skipped in find_sysfs_dev(). Signed-off-by: Yann Droneaud <ydroneaud@opteya.com> --- src/init.c | 3 +++ 1 file changed, 3 insertions(+)