Files
bpfire/src/patches/dnsmasq/0046-Extra-logging-for-inotify-code.patch
Michael Tremer 697b4f04bf dnsmasq: Import patches from upstream
These fix minor bugs and contain smaller improvements.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2015-06-18 12:38:38 +02:00

69 lines
1.8 KiB
Diff

From f9c863708c6b0aea31ff7a466647685dc739de50 Mon Sep 17 00:00:00 2001
From: Simon Kelley <simon@thekelleys.org.uk>
Date: Tue, 3 Feb 2015 21:52:48 +0000
Subject: [PATCH 046/113] Extra logging for inotify code.
---
src/cache.c | 9 ++++-----
src/inotify.c | 4 +++-
src/option.c | 4 +++-
3 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/src/cache.c b/src/cache.c
index 117ae279fd4e..43245b771b53 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 6f4cd79e0030..44ce0c9af051 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 cb4e76ba0aa2..e4b4865d07a5 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
--
2.1.0