summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Kelley <simon@thekelleys.org.uk>2015-02-03 21:52:48 +0000
committerSimon Kelley <simon@thekelleys.org.uk>2015-02-03 21:52:48 +0000
commitf9c863708c6b0aea31ff7a466647685dc739de50 (patch)
treec3f9f3d956b91bc61dd3ec8ef142924667c1ad63
parent2941d3ac898cf84b544e47c9735c5e4111711db1 (diff)
downloaddnsmasq-f9c863708c6b0aea31ff7a466647685dc739de50.tar.gz
Extra logging for inotify code.
-rw-r--r--src/cache.c9
-rw-r--r--src/inotify.c4
-rw-r--r--src/option.c4
3 files changed, 10 insertions, 7 deletions
diff --git a/src/cache.c b/src/cache.c
index 117ae27..43245b7 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -1022,11 +1022,10 @@ int read_hostsfile(char *filename, unsigned int index, int cache_size, struct cr
fclose(f);
if (rhash)
- {
- rehash(name_count);
- my_syslog(LOG_INFO, _("read %s - %d addresses"), filename, addr_count);
- }
-
+ rehash(name_count);
+
+ my_syslog(LOG_INFO, _("read %s - %d addresses"), filename, addr_count);
+
return name_count;
}
diff --git a/src/inotify.c b/src/inotify.c
index 6f4cd79..44ce0c9 100644
--- a/src/inotify.c
+++ b/src/inotify.c
@@ -192,7 +192,9 @@ int inotify_check(time_t now)
strcpy(path, ah->fname);
strcat(path, "/");
strcat(path, in->name);
-
+
+ my_syslog(LOG_INFO, _("inotify, new or changed file %s"), path);
+
if (ah->flags & AH_HOSTS)
{
read_hostsfile(path, ah->index, 0, NULL, 0);
diff --git a/src/option.c b/src/option.c
index cb4e76b..e4b4865 100644
--- a/src/option.c
+++ b/src/option.c
@@ -4068,11 +4068,13 @@ static void read_file(char *file, FILE *f, int hard_opt)
#ifdef HAVE_DHCP
int option_read_dynfile(char *file, int flags)
{
+ my_syslog(MS_DHCP | LOG_INFO, _("read %s"), file);
+
if (flags & AH_DHCP_HST)
return one_file(file, LOPT_BANK);
else if (flags & AH_DHCP_OPT)
return one_file(file, LOPT_OPTS);
-
+
return 0;
}
#endif