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.
This commit is contained in:
lukem 2001-09-12 03:14:08 +00:00
parent fd08f59ac0
commit fa5157d9fb
2 changed files with 6 additions and 5 deletions

View File

@ -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 @@ Set the compression level for
.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.

View File

@ -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 @@ __COPYRIGHT("@(#) Copyright (c) 1986, 1992, 1993\n\
#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 @@ main(int argc, char *argv[])
dirname = NULL;
kernel = NULL;
level = 1; /* default to fastest gzip compression */
gzmode[0] = 'w';
openlog("savecore", LOG_PERROR, LOG_DAEMON);
@ -187,7 +188,6 @@ main(int argc, char *argv[])
optarg);
usage();
}
gzmode[1] = level + '0';
break;
case '?':
default:
@ -199,6 +199,7 @@ main(int argc, char *argv[])
if (argc != (clear ? 0 : 1))
usage();
gzmode[1] = level + '0';
if (!clear)
dirname = argv[0];