]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Switch an external program for bzip2 decompression from "bunzip2"
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Sat, 13 Oct 2012 09:56:11 +0000 (18:56 +0900)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Sat, 13 Oct 2012 09:56:11 +0000 (18:56 +0900)
to "bzip2 -d".

cpio/test/main.c
cpio/test/test.h
cpio/test/test_extract_cpio_bz2.c
libarchive/archive_read_support_filter_bzip2.c
libarchive/test/main.c
libarchive/test/test.h
tar/test/main.c
tar/test/test.h
tar/test/test_extract_tar_bz2.c

index b63c6e38d96e69a4d9ea622128451e6ccf8a267a..6db2b420a2953bcc19c74950eec2400b1f330b56 100644 (file)
@@ -1843,15 +1843,15 @@ static const char *redirectArgs = ">NUL 2>NUL"; /* Win32 cmd.exe */
 static const char *redirectArgs = ">/dev/null 2>/dev/null"; /* POSIX 'sh' */
 #endif
 /*
- * Can this platform run the bunzip2 program?
+ * Can this platform run the bzip2 program?
  */
 int
-canBunzip2(void)
+canBzip2(void)
 {
        static int tested = 0, value = 0;
        if (!tested) {
                tested = 1;
-               if (systemf("bunzip2 -V %s", redirectArgs) == 0)
+               if (systemf("bzip2 -V %s", redirectArgs) == 0)
                        value = 1;
        }
        return (value);
index 87f212ec735bd9d7126db39547c3fee7161bc9b1..a15b8e92eb8107a06a388476c3cbe3ebbbb72837 100644 (file)
@@ -266,8 +266,8 @@ void sleepUntilAfter(time_t);
 /* Return true if this platform can create symlinks. */
 int canSymlink(void);
 
-/* Return true if this platform can run the "bunzip2" program. */
-int canBunzip2(void);
+/* Return true if this platform can run the "bzip2" program. */
+int canBzip2(void);
 
 /* Return true if this platform can run the "grzip" program. */
 int canGrzip(void);
index bc4c11f78d8944e1e5fb667741886b4e22cc8aaa..9525e63ae906be325400658f6287e3616b22f3da 100644 (file)
@@ -32,7 +32,7 @@ DEFINE_TEST(test_extract_cpio_bz2)
 
        extract_reference_file(reffile);
        f = systemf("%s -it < %s >test.out 2>test.err", testprog, reffile);
-       if (f == 0 || canBunzip2()) {
+       if (f == 0 || canBzip2()) {
                assertEqualInt(0, systemf("%s -i < %s >test.out 2>test.err",
                    testprog, reffile));
 
index 0050fab0f126c6637ddc2de01198d8e033a7c73c..35c6eb01ba5c5f932a65df00a20b2291b4e321a2 100644 (file)
@@ -102,7 +102,7 @@ archive_read_support_filter_bzip2(struct archive *_a)
        return (ARCHIVE_OK);
 #else
        archive_set_error(_a, ARCHIVE_ERRNO_MISC,
-           "Using external bunzip2 program");
+           "Using external bzip2 program");
        return (ARCHIVE_WARN);
 #endif
 }
@@ -170,7 +170,7 @@ bzip2_reader_init(struct archive_read_filter *self)
 {
        int r;
 
-       r = __archive_read_program(self, "bunzip2");
+       r = __archive_read_program(self, "bzip2 -d");
        /* Note: We set the format here even if __archive_read_program()
         * above fails.  We do, after all, know what the format is
         * even if we weren't able to read it. */
index 85a556215941d0f1cbb41d35b833687135ae0bfa..7a85b114de55766b580c929e12134622bec51b62 100644 (file)
@@ -1841,15 +1841,15 @@ static const char *redirectArgs = ">NUL 2>NUL"; /* Win32 cmd.exe */
 static const char *redirectArgs = ">/dev/null 2>/dev/null"; /* POSIX 'sh' */
 #endif
 /*
- * Can this platform run the bunzip2 program?
+ * Can this platform run the bzip2 program?
  */
 int
-canBunzip2(void)
+canBzip2(void)
 {
        static int tested = 0, value = 0;
        if (!tested) {
                tested = 1;
-               if (systemf("bunzip2 -V %s", redirectArgs) == 0)
+               if (systemf("bzip2 -V %s", redirectArgs) == 0)
                        value = 1;
        }
        return (value);
index 719b08f39aa2c0cc67f35a53b633bc54dd506fd1..e72a94a84332f870072a0d00161db26b80778d96 100644 (file)
@@ -266,8 +266,8 @@ void sleepUntilAfter(time_t);
 /* Return true if this platform can create symlinks. */
 int canSymlink(void);
 
-/* Return true if this platform can run the "bunzip2" program. */
-int canBunzip2(void);
+/* Return true if this platform can run the "bzip2" program. */
+int canBzip2(void);
 
 /* Return true if this platform can run the "grzip" program. */
 int canGrzip(void);
index 4a7b100174195277a20f2b9046a93ec8403f16a7..4234dc17b8f2096c2f32aec58c61ccd5ef5aef8f 100644 (file)
@@ -1843,15 +1843,15 @@ static const char *redirectArgs = ">NUL 2>NUL"; /* Win32 cmd.exe */
 static const char *redirectArgs = ">/dev/null 2>/dev/null"; /* POSIX 'sh' */
 #endif
 /*
- * Can this platform run the bunzip2 program?
+ * Can this platform run the bzip2 program?
  */
 int
-canBunzip2(void)
+canBzip2(void)
 {
        static int tested = 0, value = 0;
        if (!tested) {
                tested = 1;
-               if (systemf("bunzip2 -V %s", redirectArgs) == 0)
+               if (systemf("bzip2 -V %s", redirectArgs) == 0)
                        value = 1;
        }
        return (value);
index d8b9c5c1f31657dab5110c328927d6dc692e756c..1ad7bc1fa449f82d31de017cf336e69e9978a8ef 100644 (file)
@@ -268,8 +268,8 @@ void sleepUntilAfter(time_t);
 /* Return true if this platform can create symlinks. */
 int canSymlink(void);
 
-/* Return true if this platform can run the "bunzip2" program. */
-int canBunzip2(void);
+/* Return true if this platform can run the "bzip2" program. */
+int canBzip2(void);
 
 /* Return true if this platform can run the "grzip" program. */
 int canGrzip(void);
index e146d507c53fac27b9843d66d725f427fc8d1021..b734dd28ba740ff61bd279039f8754b32a5cd42c 100644 (file)
@@ -32,7 +32,7 @@ DEFINE_TEST(test_extract_tar_bz2)
 
        extract_reference_file(reffile);
        f = systemf("%s -tf %s >test.out 2>test.err", testprog, reffile);
-       if (f == 0 || canBunzip2()) {
+       if (f == 0 || canBzip2()) {
                assertEqualInt(0, systemf("%s -xf %s >test.out 2>test.err",
                    testprog, reffile));