]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/dnsmasq/0046-Extra-logging-for-inotify-code.patch
Merge remote-tracking branch 'mfischer/python' into next
[people/pmueller/ipfire-2.x.git] / src / patches / dnsmasq / 0046-Extra-logging-for-inotify-code.patch
1 From f9c863708c6b0aea31ff7a466647685dc739de50 Mon Sep 17 00:00:00 2001
2 From: Simon Kelley <simon@thekelleys.org.uk>
3 Date: Tue, 3 Feb 2015 21:52:48 +0000
4 Subject: [PATCH 46/98] Extra logging for inotify code.
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
12 diff --git a/src/cache.c b/src/cache.c
13 index 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
32 diff --git a/src/inotify.c b/src/inotify.c
33 index 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);
47 diff --git a/src/option.c b/src/option.c
48 index 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 --
67 2.1.0
68