[BusyBox-cvs] CVS update of busybox/archival (tar.c)
Glenn McGrath
bug1 at codepoet.org
Wed Jul 21 09:00:40 UTC 2004
Date: Wednesday, July 21, 2004 @ 03:00:40
Author: bug1
Path: /var/cvs/busybox/archival
Modified: tar.c (1.192 -> 1.193)
Fixup -T (--files-from) option, works for non-directories now
Index: busybox/archival/tar.c
diff -u busybox/archival/tar.c:1.192 busybox/archival/tar.c:1.193
--- busybox/archival/tar.c:1.192 Wed May 5 04:37:48 2004
+++ busybox/archival/tar.c Wed Jul 21 03:00:39 2004
@@ -625,7 +625,7 @@
#endif
#ifdef CONFIG_FEATURE_TAR_FROM
-# define TAR_OPT_FROM_FILE (1 << (8 + TAR_OPT_FLAG_CREATE + TAR_OPT_FLAG_BZIP2))
+# define TAR_OPT_INCLUDE_FROM (1 << (8 + TAR_OPT_FLAG_CREATE + TAR_OPT_FLAG_BZIP2))
# define TAR_OPT_EXCLUDE_FROM (1 << (8 + TAR_OPT_FLAG_CREATE + TAR_OPT_FLAG_BZIP2 + 1))
# define TAR_OPT_STR_FROM "T:X:"
# define TAR_OPT_FLAG_FROM 2
@@ -675,7 +675,7 @@
{ "bzip2", 0, NULL, 'j' },
# endif
# ifdef CONFIG_FEATURE_TAR_FROM
- { "from-file", 1, NULL, 'T' },
+ { "files-from", 1, NULL, 'T' },
{ "exclude-from", 1, NULL, 'X' },
# endif
# ifdef CONFIG_FEATURE_TAR_GZIP
@@ -722,7 +722,7 @@
&base_dir, /* Change to dir <optarg> */
&tar_filename /* archive filename */
#ifdef CONFIG_FEATURE_TAR_FROM
- , NULL,
+ , &(tar_handle->accept),
&(tar_handle->reject)
#endif
);
@@ -787,6 +787,9 @@
if(opt & TAR_OPT_EXCLUDE_FROM) {
tar_handle->reject = append_file_list_to_list(tar_handle->reject);
}
+ if(opt & TAR_OPT_INCLUDE_FROM) {
+ tar_handle->accept = append_file_list_to_list(tar_handle->accept);
+ }
#endif
/* Check if we are reading from stdin */
More information about the busybox-cvs
mailing list