[BusyBox-cvs] busybox/archival tar.c,1.178,1.179

Glenn McGrath bug1 at busybox.net
Fri Nov 14 12:53:48 UTC 2003


Update of /var/cvs/busybox/archival
In directory winder:/tmp/cvs-serv13782/archival

Modified Files:
	tar.c 
Log Message:
Catch unsupported features


Index: tar.c
===================================================================
RCS file: /var/cvs/busybox/archival/tar.c,v
retrieving revision 1.178
retrieving revision 1.179
diff -u -d -r1.178 -r1.179
--- tar.c	2 Oct 2003 14:33:23 -0000	1.178
+++ tar.c	14 Nov 2003 12:53:42 -0000	1.179
@@ -596,6 +596,7 @@
 
 
 static const char tar_options[]="ctxjT:X:C:f:Opvz";
+
 #define CTX_CREATE	1
 #define CTX_TEST	2
 #define CTX_EXTRACT	4
@@ -670,21 +671,28 @@
 				tar_handle->action_header = header_list;
 			}
 	}
-#ifdef CONFIG_FEATURE_TAR_GZIP
+
 	if(opt & TAR_OPT_GZIP) {
-			get_header_ptr = get_header_tar_gz;
-	}
+#ifdef CONFIG_FEATURE_TAR_GZIP
+		get_header_ptr = get_header_tar_gz;
+#else
+		bb_show_usage();
 #endif
-#ifdef CONFIG_FEATURE_TAR_BZIP2
+	}
 	if(opt & TAR_OPT_BZIP2) {
+#ifdef CONFIG_FEATURE_TAR_BZIP2
 			get_header_ptr = get_header_tar_bz2;
-	}
+#else
+		bb_show_usage();
 #endif
-#ifdef CONFIG_FEATURE_TAR_EXCLUDE
+	}
 	if(opt & TAR_OPT_EXCLUDE) {
+#ifdef CONFIG_FEATURE_TAR_EXCLUDE
 		tar_handle->reject = append_file_list_to_list(tar_handle->reject);
-	}
+#else
+		bb_show_usage();
 #endif
+	}
 	/* Check if we are reading from stdin */
 	if ((argv[optind]) && (*argv[optind] == '-')) {
 		/* Default is to read from stdin, so just skip to next arg */




More information about the busybox-cvs mailing list