From: Michihiro NAKAJIMA Date: Sat, 13 Oct 2012 09:56:11 +0000 (+0900) Subject: Switch an external program for bzip2 decompression from "bunzip2" X-Git-Tag: v3.1.0~40^2~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9dd48a782431cf4a19a57b8f1b352cf8eef03fa4;p=thirdparty%2Flibarchive.git Switch an external program for bzip2 decompression from "bunzip2" to "bzip2 -d". --- diff --git a/cpio/test/main.c b/cpio/test/main.c index b63c6e38d..6db2b420a 100644 --- a/cpio/test/main.c +++ b/cpio/test/main.c @@ -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); diff --git a/cpio/test/test.h b/cpio/test/test.h index 87f212ec7..a15b8e92e 100644 --- a/cpio/test/test.h +++ b/cpio/test/test.h @@ -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); diff --git a/cpio/test/test_extract_cpio_bz2.c b/cpio/test/test_extract_cpio_bz2.c index bc4c11f78..9525e63ae 100644 --- a/cpio/test/test_extract_cpio_bz2.c +++ b/cpio/test/test_extract_cpio_bz2.c @@ -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)); diff --git a/libarchive/archive_read_support_filter_bzip2.c b/libarchive/archive_read_support_filter_bzip2.c index 0050fab0f..35c6eb01b 100644 --- a/libarchive/archive_read_support_filter_bzip2.c +++ b/libarchive/archive_read_support_filter_bzip2.c @@ -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. */ diff --git a/libarchive/test/main.c b/libarchive/test/main.c index 85a556215..7a85b114d 100644 --- a/libarchive/test/main.c +++ b/libarchive/test/main.c @@ -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); diff --git a/libarchive/test/test.h b/libarchive/test/test.h index 719b08f39..e72a94a84 100644 --- a/libarchive/test/test.h +++ b/libarchive/test/test.h @@ -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); diff --git a/tar/test/main.c b/tar/test/main.c index 4a7b10017..4234dc17b 100644 --- a/tar/test/main.c +++ b/tar/test/main.c @@ -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); diff --git a/tar/test/test.h b/tar/test/test.h index d8b9c5c1f..1ad7bc1fa 100644 --- a/tar/test/test.h +++ b/tar/test/test.h @@ -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); diff --git a/tar/test/test_extract_tar_bz2.c b/tar/test/test_extract_tar_bz2.c index e146d507c..b734dd28b 100644 --- a/tar/test/test_extract_tar_bz2.c +++ b/tar/test/test_extract_tar_bz2.c @@ -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));