Re: [PATCH 08/11] Reset timezone information on reconfigure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hannes,

FYI, related to your latest patchset,

commit dd205886ed2d41bb8e2602cb9771be403a99cd27
Author: Christophe Varoqui <christophe.varoqui@xxxxxxxxxxx>
Date:   Fri Dec 13 23:20:40 2013 +0100

    Add missing includes to support tzget() usage

diff --git a/libmultipath/log.c b/libmultipath/log.c
index 74702d8..ab92e2a 100644
--- a/libmultipath/log.c
+++ b/libmultipath/log.c
@@ -8,6 +8,7 @@
 #include <stdarg.h>
 #include <string.h>
 #include <syslog.h>
+#include <time.h>
 
 #include "memory.h"
 #include "log.h"
diff --git a/multipathd/main.c b/multipathd/main.c
index 37a9bc2..fd70b70 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -22,6 +22,7 @@
 #endif
 #include <semaphore.h>
 #include <mpath_persist.h>
+#include <time.h>
 
 /*
  * libcheckers


Best regards,
Christophe Varoqui


On Fri, Dec 13, 2013 at 1:14 PM, Hannes Reinecke <hare@xxxxxxx> wrote:
Whenever 'reconfigure' is called we need to re-initialize the
timezone information as it might have been changed in the
meantime.

References: bnc#830511

Signed-off-by: Hannes Reinecke <hare@xxxxxxx>
---
 libmultipath/log.c | 1 +
 multipathd/main.c  | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/libmultipath/log.c b/libmultipath/log.c
index 37c7cd7..74702d8 100644
--- a/libmultipath/log.c
+++ b/libmultipath/log.c
@@ -99,6 +99,7 @@ void log_close (void)
 void log_reset (char *program_name)
 {
        closelog();
+       tzset();
        openlog(program_name, 0, LOG_DAEMON);
 }

diff --git a/multipathd/main.c b/multipathd/main.c
index 96564f8..1a1aa2d 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -1416,6 +1416,9 @@ reconfigure (struct vectors * vecs)
        vecs->pathvec = NULL;
        conf = NULL;

+       /* Re-read any timezone changes */
+       tzset();
+
        if (!load_config(DEFAULT_CONFIGFILE, udev)) {
                conf->verbosity = old->verbosity;
                conf->daemon = 1;
--
1.8.1.4

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux