diff mbox

[08/11] Reset timezone information on reconfigure

Message ID CABr-GncpPvTPJW0-HzSDkSxfh70WwwDGeoDTN_w5vUz+X15FFQ@mail.gmail.com (mailing list archive)
State Not Applicable, archived
Delegated to: christophe varoqui
Headers show

Commit Message

Christophe Varoqui Dec. 13, 2013, 10:22 p.m. UTC
Hannes,

FYI, related to your latest patchset,

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

    Add missing includes to support tzget() usage



Best regards,
Christophe Varoqui


On Fri, Dec 13, 2013 at 1:14 PM, Hannes Reinecke <hare@suse.de> 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@suse.de>
> ---
>  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@redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel
>
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
diff mbox

Patch

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