Source-Changes-HG archive

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

[src/trunk]: src/sbin/savecore explicitly set the default compression level t...



details:   https://anonhg.NetBSD.org/src/rev/85e1e7ad3742
branches:  trunk
changeset: 514866:85e1e7ad3742
user:      lukem <lukem%NetBSD.org@localhost>
date:      Wed Sep 12 03:14:08 2001 +0000

description:
explicitly set the default compression level to 1 (from the implicit 6),
because it's significantly faster and doesn't use that much more disk space.

diffstat:

 sbin/savecore/savecore.8 |  4 ++--
 sbin/savecore/savecore.c |  7 ++++---
 2 files changed, 6 insertions(+), 5 deletions(-)

diffs (60 lines):

diff -r e01e0eba0837 -r 85e1e7ad3742 sbin/savecore/savecore.8
--- a/sbin/savecore/savecore.8  Wed Sep 12 02:58:29 2001 +0000
+++ b/sbin/savecore/savecore.8  Wed Sep 12 03:14:08 2001 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: savecore.8,v 1.23 2001/09/12 02:58:29 lukem Exp $
+.\"    $NetBSD: savecore.8,v 1.24 2001/09/12 03:14:08 lukem Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -123,7 +123,7 @@
 .Fl z
 to
 .Ar level .
-Defaults to 6.
+Defaults to 1 (the fastest compression mode).
 Refer to
 .Xr gzip 1
 for more information regarding the compression level.
diff -r e01e0eba0837 -r 85e1e7ad3742 sbin/savecore/savecore.c
--- a/sbin/savecore/savecore.c  Wed Sep 12 02:58:29 2001 +0000
+++ b/sbin/savecore/savecore.c  Wed Sep 12 03:14:08 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: savecore.c,v 1.53 2001/09/12 02:58:29 lukem Exp $      */
+/*     $NetBSD: savecore.c,v 1.54 2001/09/12 03:14:08 lukem Exp $      */
 
 /*-
  * Copyright (c) 1986, 1992, 1993
@@ -43,7 +43,7 @@
 #if 0
 static char sccsid[] = "@(#)savecore.c 8.5 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: savecore.c,v 1.53 2001/09/12 02:58:29 lukem Exp $");
+__RCSID("$NetBSD: savecore.c,v 1.54 2001/09/12 03:14:08 lukem Exp $");
 #endif
 #endif /* not lint */
 
@@ -158,6 +158,7 @@
 
        dirname = NULL;
        kernel = NULL;
+       level = 1;              /* default to fastest gzip compression */
        gzmode[0] = 'w';
 
        openlog("savecore", LOG_PERROR, LOG_DAEMON);
@@ -187,7 +188,6 @@
                                    optarg);
                                usage();
                        }
-                       gzmode[1] = level + '0';
                        break;
                case '?':
                default:
@@ -199,6 +199,7 @@
        if (argc != (clear ? 0 : 1))
                usage();
 
+       gzmode[1] = level + '0';
        if (!clear)
                dirname = argv[0];
 



Home | Main Index | Thread Index | Old Index