Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/newsyslog PR/46608: Jim Bernard: Add xz conversion "X"



details:   https://anonhg.NetBSD.org/src/rev/5dc0f745df2b
branches:  trunk
changeset: 779767:5dc0f745df2b
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Jun 17 03:52:32 2012 +0000

description:
PR/46608: Jim Bernard: Add xz conversion "X"

diffstat:

 usr.bin/newsyslog/newsyslog.8 |  8 ++++++--
 usr.bin/newsyslog/newsyslog.c |  7 ++++---
 2 files changed, 10 insertions(+), 5 deletions(-)

diffs (64 lines):

diff -r 4cf0ada5afa0 -r 5dc0f745df2b usr.bin/newsyslog/newsyslog.8
--- a/usr.bin/newsyslog/newsyslog.8     Sun Jun 17 02:13:13 2012 +0000
+++ b/usr.bin/newsyslog/newsyslog.8     Sun Jun 17 03:52:32 2012 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: newsyslog.8,v 1.36 2007/12/21 19:45:33 snj Exp $
+.\"    $NetBSD: newsyslog.8,v 1.37 2012/06/17 03:52:32 christos Exp $
 .\"
 .\" Copyright (c) 1999, 2000 Andrew Doran <ad%NetBSD.org@localhost>
 .\" All rights reserved.
@@ -40,7 +40,7 @@
 .\"
 .\" from FreeBSD: newsyslog.8,v 1.14.2.1 1999/02/25 18:38:33 wollman Exp
 .\"
-.Dd December 21, 2007
+.Dd June 16, 2012
 .Dt NEWSYSLOG 8
 .Os
 .Sh NAME
@@ -334,6 +334,10 @@
 Archived log files should be compressed with
 .Xr bzip2 1
 to save space.
+.It Sy x
+Archived log files should be compressed with
+.Xr xz 1
+to save space.
 .It Sy z
 Archived log files should be compressed with
 .Xr gzip 1
diff -r 4cf0ada5afa0 -r 5dc0f745df2b usr.bin/newsyslog/newsyslog.c
--- a/usr.bin/newsyslog/newsyslog.c     Sun Jun 17 02:13:13 2012 +0000
+++ b/usr.bin/newsyslog/newsyslog.c     Sun Jun 17 03:52:32 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: newsyslog.c,v 1.59 2009/08/21 08:20:19 manu Exp $      */
+/*     $NetBSD: newsyslog.c,v 1.60 2012/06/17 03:52:32 christos Exp $  */
 
 /*
  * Copyright (c) 1999, 2000 Andrew Doran <ad%NetBSD.org@localhost>
@@ -55,7 +55,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: newsyslog.c,v 1.59 2009/08/21 08:20:19 manu Exp $");
+__RCSID("$NetBSD: newsyslog.c,v 1.60 2012/06/17 03:52:32 christos Exp $");
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -121,6 +121,7 @@
        {NULL, "", "", ""}, /* 0th compressor is "no compression" */
        {"/usr/bin/gzip", "-f", ".gz", "Z"},
        {"/usr/bin/bzip2", "-9f", ".bz2", "J"},
+       {"/usr/bin/xz", "-f", ".xz", "X"},
 };
 
 #define _PATH_NEWSYSLOGCONF    "/etc/newsyslog.conf"
@@ -377,7 +378,7 @@
                case 'P':
                        log->flags |= CE_PLAIN0;
                        break;
-               case 'J': case 'Z':
+               case 'J': case 'X': case 'Z':
                        for (ziptype = __arraycount(compress); --ziptype; ) {
                                if (*compress[ziptype].flag == qq)
                                    break;



Home | Main Index | Thread Index | Old Index