]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/dnsmasq/0046-Extra-logging-for-inotify-code.patch
Merge branch 'next' of ssh://git.ipfire.org/pub/git/ipfire-2.x into next
[ipfire-2.x.git] / src / patches / dnsmasq / 0046-Extra-logging-for-inotify-code.patch
CommitLineData
6644c1c7
MT
1From f9c863708c6b0aea31ff7a466647685dc739de50 Mon Sep 17 00:00:00 2001
2From: Simon Kelley <simon@thekelleys.org.uk>
3Date: Tue, 3 Feb 2015 21:52:48 +0000
697b4f04 4Subject: [PATCH 046/113] Extra logging for inotify code.
6644c1c7
MT
5
6---
7 src/cache.c | 9 ++++-----
8 src/inotify.c | 4 +++-
9 src/option.c | 4 +++-
10 3 files changed, 10 insertions(+), 7 deletions(-)
11
12diff --git a/src/cache.c b/src/cache.c
13index 117ae279fd4e..43245b771b53 100644
14--- a/src/cache.c
15+++ b/src/cache.c
16@@ -1022,11 +1022,10 @@ int read_hostsfile(char *filename, unsigned int index, int cache_size, struct cr
17 fclose(f);
18
19 if (rhash)
20- {
21- rehash(name_count);
22- my_syslog(LOG_INFO, _("read %s - %d addresses"), filename, addr_count);
23- }
24-
25+ rehash(name_count);
26+
27+ my_syslog(LOG_INFO, _("read %s - %d addresses"), filename, addr_count);
28+
29 return name_count;
30 }
31
32diff --git a/src/inotify.c b/src/inotify.c
33index 6f4cd79e0030..44ce0c9af051 100644
34--- a/src/inotify.c
35+++ b/src/inotify.c
36@@ -192,7 +192,9 @@ int inotify_check(time_t now)
37 strcpy(path, ah->fname);
38 strcat(path, "/");
39 strcat(path, in->name);
40-
41+
42+ my_syslog(LOG_INFO, _("inotify, new or changed file %s"), path);
43+
44 if (ah->flags & AH_HOSTS)
45 {
46 read_hostsfile(path, ah->index, 0, NULL, 0);
47diff --git a/src/option.c b/src/option.c
48index cb4e76ba0aa2..e4b4865d07a5 100644
49--- a/src/option.c
50+++ b/src/option.c
51@@ -4068,11 +4068,13 @@ static void read_file(char *file, FILE *f, int hard_opt)
52 #ifdef HAVE_DHCP
53 int option_read_dynfile(char *file, int flags)
54 {
55+ my_syslog(MS_DHCP | LOG_INFO, _("read %s"), file);
56+
57 if (flags & AH_DHCP_HST)
58 return one_file(file, LOPT_BANK);
59 else if (flags & AH_DHCP_OPT)
60 return one_file(file, LOPT_OPTS);
61-
62+
63 return 0;
64 }
65 #endif
66--
672.1.0
68