aboutsummaryrefslogtreecommitdiff
path: root/src/xz/args.c
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2009-11-25 11:19:20 +0200
committerLasse Collin <lasse.collin@tukaani.org>2009-11-25 11:19:20 +0200
commit465d1b0d6518c5d980f2db4c2d769f9905bdd902 (patch)
treea4268eaa071e4cc52da9d56cb5c76168c604ff75 /src/xz/args.c
parentUpdated THANKS. (diff)
downloadxz-465d1b0d6518c5d980f2db4c2d769f9905bdd902.tar.xz
Create sparse files by default when decompressing into
a regular file. Sparse file creation can be disabled with --no-sparse. I don't promise yet that the name of this option won't change before 5.0.0. It's possible that the code, that checks when it is safe to use sparse output on stdout, is not good enough, and a more flexible command line option is needed to configure sparse file handling.
Diffstat (limited to 'src/xz/args.c')
-rw-r--r--src/xz/args.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/xz/args.c b/src/xz/args.c
index 75b62205..bb6e27bb 100644
--- a/src/xz/args.c
+++ b/src/xz/args.c
@@ -43,6 +43,7 @@ parse_real(args_info *args, int argc, char **argv)
OPT_LZMA1,
OPT_LZMA2,
+ OPT_NO_SPARSE,
OPT_FILES,
OPT_FILES0,
OPT_INFO_MEMORY,
@@ -65,6 +66,7 @@ parse_real(args_info *args, int argc, char **argv)
{ "force", no_argument, NULL, 'f' },
{ "stdout", no_argument, NULL, 'c' },
{ "to-stdout", no_argument, NULL, 'c' },
+ { "no-sparse", no_argument, NULL, OPT_NO_SPARSE },
{ "suffix", required_argument, NULL, 'S' },
// { "recursive", no_argument, NULL, 'r' }, // TODO
{ "files", optional_argument, NULL, OPT_FILES },
@@ -339,6 +341,10 @@ parse_real(args_info *args, int argc, char **argv)
break;
}
+ case OPT_NO_SPARSE:
+ io_no_sparse();
+ break;
+
case OPT_FILES:
args->files_delim = '\n';