]> git.proxmox.com Git - pve-sheepdog.git/commitdiff
fix patch
authorDietmar Maurer <dietmar@proxmox.com>
Thu, 28 Feb 2013 06:30:52 +0000 (07:30 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 28 Feb 2013 06:32:11 +0000 (07:32 +0100)
Makefile
debian/patches/simplify-log-rotation.patch

index 8e88dd72f41a7c3f59f5a595c707f7e5ee7f7e00..dc2d79fb0bb7607535062d2e6aa34cc5fab67590 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-RELEASE=2.2
+RELEASE=2.3
 
 PACKAGE=pve-sheepdog
 PKGREL=1
index 9502aaa6e9e196b9a308092323841bb38523122a..95b04db1dfa73e794d220dac7a490dddd659f08b 100644 (file)
@@ -6,9 +6,9 @@ any logrotate script. max_logfile is set to 256MB.
 
 Index: new/lib/logger.c
 ===================================================================
---- a/lib/logger.c
-+++ b/lib/logger.c
-@@ -97,7 +97,7 @@ static pid_t logger_pid;
+--- new.orig/lib/logger.c      2013-02-28 07:15:26.000000000 +0100
++++ new/lib/logger.c   2013-02-28 07:29:55.000000000 +0100
+@@ -75,7 +75,7 @@
  static key_t semkey;
  static char *log_buff;
  
@@ -17,7 +17,7 @@ Index: new/lib/logger.c
  
  static pthread_mutex_t logsize_lock = PTHREAD_MUTEX_INITIALIZER;
  
-@@ -357,14 +357,7 @@ static notrace void rotate_log(void)
+@@ -243,13 +243,7 @@
  
        if (access(log_nowname, R_OK) == 0) {
                char old_logfile[256];
@@ -25,10 +25,9 @@ Index: new/lib/logger.c
 -              struct tm tm;
 -              time(&t);
 -              localtime_r((const time_t *)&t, &tm);
--              snprintf(old_logfile, sizeof(old_logfile),
--                       "%s.%04d-%02d-%02d-%02d-%02d",
--                       log_nowname, tm.tm_year + 1900, tm.tm_mon + 1,
--                       tm.tm_mday, tm.tm_hour, tm.tm_min);
+-              sprintf(old_logfile, "%s.%04d-%02d-%02d-%02d-%02d",
+-                              log_nowname, tm.tm_year + 1900, tm.tm_mon + 1,
+-                              tm.tm_mday, tm.tm_hour, tm.tm_min);
 +              sprintf(old_logfile, "%s.1", log_nowname);
                rename(log_nowname, old_logfile);
        }