aboutsummaryrefslogtreecommitdiff
path: root/toys
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2019-05-22 19:15:13 -0700
committerRob Landley <rob@landley.net>2019-05-23 19:16:06 -0500
commite99f7467524878e3f523241061fec899aefcf683 (patch)
treedf036733833d31f10e370dba5434c38c2db82253 /toys
parentb2a3fad140faf3a7e738cfc070e1043bba5d76f9 (diff)
downloadtoybox-e99f7467524878e3f523241061fec899aefcf683.tar.gz
tar: turns out --sparse is also known as -S.
Found trying to build the aosp_cf_x86_phone-userdebug target. The good news is that the targets that I knew were using tar with sparse files all pass now.
Diffstat (limited to 'toys')
-rw-r--r--toys/posix/tar.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/toys/posix/tar.c b/toys/posix/tar.c
index e8dc319a..16b528fa 100644
--- a/toys/posix/tar.c
+++ b/toys/posix/tar.c
@@ -18,13 +18,13 @@
* Extract into dir same as filename, --restrict? "Tarball is splodey"
*
-USE_TAR(NEWTOY(tar, "&(sparse)(restrict)(full-time)(no-recursion)(numeric-owner)(no-same-permissions)(overwrite)(exclude)*(mtime):(group):(owner):(to-command):o(no-same-owner)p(same-permissions)k(keep-old)c(create)|h(dereference)x(extract)|t(list)|v(verbose)J(xz)j(bzip2)z(gzip)O(to-stdout)m(touch)X(exclude-from)*T(files-from)*C(directory):f(file):a[!txc][!jzJa]", TOYFLAG_USR|TOYFLAG_BIN))
+USE_TAR(NEWTOY(tar, "&(restrict)(full-time)(no-recursion)(numeric-owner)(no-same-permissions)(overwrite)(exclude)*(mtime):(group):(owner):(to-command):o(no-same-owner)p(same-permissions)k(keep-old)c(create)|h(dereference)x(extract)|t(list)|v(verbose)J(xz)j(bzip2)z(gzip)S(sparse)O(to-stdout)m(touch)X(exclude-from)*T(files-from)*C(directory):f(file):a[!txc][!jzJa]", TOYFLAG_USR|TOYFLAG_BIN))
config TAR
bool "tar"
default y
help
- usage: tar [-cxt] [-fvohmjkO] [-XTCf NAME] [FILES]
+ usage: tar [-cxt] [-fvohmjkOS] [-XTCf NAME] [FILES]
Create, extract, or list files in a .tar (or compressed t?z) file.
@@ -309,7 +309,7 @@ static int add_to_tar(struct dirtree *node)
return 0;
}
- if (FLAG(sparse)) {
+ if (FLAG(S)) {
long long lo, ld = 0, len = 0;
// Enumerate the extents