]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Remove __archive_read_program(), use __archive_read_programl() instead.
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Sat, 6 Oct 2012 07:21:45 +0000 (16:21 +0900)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Sat, 6 Oct 2012 07:21:45 +0000 (16:21 +0900)
libarchive/archive_read_private.h
libarchive/archive_read_support_filter_bzip2.c
libarchive/archive_read_support_filter_gzip.c
libarchive/archive_read_support_filter_lrzip.c
libarchive/archive_read_support_filter_program.c
libarchive/archive_read_support_filter_xz.c

index 03a7733f10a6edb6a9b6da5c5e684773e51ce726..9f580c94db6ff78fec69327b650cb37a3a9dfeca 100644 (file)
@@ -225,7 +225,6 @@ int64_t     __archive_read_seek(struct archive_read*, int64_t, int);
 int64_t        __archive_read_filter_seek(struct archive_read_filter *, int64_t, int);
 int64_t        __archive_read_consume(struct archive_read *, int64_t);
 int64_t        __archive_read_filter_consume(struct archive_read_filter *, int64_t);
-int __archive_read_program(struct archive_read_filter *, const char *);
 int __archive_read_programl(struct archive_read_filter *, const char *,
     const char *, .../*, (char *)0 */);
 int __archive_read_programv(struct archive_read_filter *, const char *,
index 8d5bd1c4aca64ad22fc3cfff3c31e6db2bc2adff..96647ee2a7c46cb94e41baa86d91f6a69c6d8e90 100644 (file)
@@ -170,8 +170,8 @@ bzip2_reader_init(struct archive_read_filter *self)
 {
        int r;
 
-       r = __archive_read_program(self, "bunzip2");
-       /* Note: We set the format here even if __archive_read_program()
+       r = __archive_read_programl(self, "bunzip2", "bunzip2", NULL);
+       /* Note: We set the format here even if __archive_read_programl()
         * above fails.  We do, after all, know what the format is
         * even if we weren't able to read it. */
        self->code = ARCHIVE_COMPRESSION_BZIP2;
index b98ccf6f97e108b56002899d4aea25c0924b92d2..c0feb8aa974942a83531419af486988c2158e577 100644 (file)
@@ -232,7 +232,7 @@ gzip_bidder_init(struct archive_read_filter *self)
        int r;
 
        r = __archive_read_programl(self, "gzip", "gzip", "-d", NULL);
-       /* Note: We set the format here even if __archive_read_program()
+       /* Note: We set the format here even if __archive_read_programl()
         * above fails.  We do, after all, know what the format is
         * even if we weren't able to read it. */
        self->code = ARCHIVE_COMPRESSION_GZIP;
index c61076f2446b43395aeab180f1c0193db159f617..d0cf31de79d03b09680fd0416feab6d0de2d8743 100644 (file)
@@ -118,7 +118,7 @@ lrzip_bidder_init(struct archive_read_filter *self)
        int r;
 
        r = __archive_read_programl(self, "lrzip", "lrzip", "-q", "-d", NULL);
-       /* Note: We set the format here even if __archive_read_program()
+       /* Note: We set the format here even if __archive_read_programl()
         * above fails.  We do, after all, know what the format is
         * even if we weren't able to read it. */
        self->code = ARCHIVE_COMPRESSION_LRZIP;
index ae6f3990d281e4cd3b72897fb6004aad3308b8ff..5b052d7cb671b423bdd41030c5766a2b6b41b164 100644 (file)
@@ -578,24 +578,6 @@ child_read(struct archive_read_filter *self, char *buf, size_t buf_len)
        }
 }
 
-int
-__archive_read_program(struct archive_read_filter *self, const char *cmd)
-{
-       char *argv[2];
-       int r;
-
-       argv[0] = strdup(cmd);
-       if (argv[0] == NULL) {
-               archive_set_error(&self->archive->archive, ENOMEM,
-                   "Can't allocate input data");
-               return (ARCHIVE_FATAL);
-       }
-       argv[1] = NULL;
-       r = __archive_read_programv(self, cmd, argv);
-       free(argv[0]);
-       return (r);
-}
-
 int
 __archive_read_programl(struct archive_read_filter *self, const char *cmd,
     const char *arg, ...)
index cf762a46d9842352942b4d7d4496e7b1be607f84..baf318840a76f06eccc027eba66b6cde4a1a2d75 100644 (file)
@@ -941,8 +941,8 @@ lzma_bidder_init(struct archive_read_filter *self)
 {
        int r;
 
-       r = __archive_read_program(self, "unlzma");
-       /* Note: We set the format here even if __archive_read_program()
+       r = __archive_read_programl(self, "unlzma", "unlzma", NULL);
+       /* Note: We set the format here even if __archive_read_programl()
         * above fails.  We do, after all, know what the format is
         * even if we weren't able to read it. */
        self->code = ARCHIVE_COMPRESSION_LZMA;
@@ -958,8 +958,8 @@ xz_bidder_init(struct archive_read_filter *self)
 {
        int r;
 
-       r = __archive_read_program(self, "unxz");
-       /* Note: We set the format here even if __archive_read_program()
+       r = __archive_read_programl(self, "unxz", "unxz", NULL);
+       /* Note: We set the format here even if __archive_read_programl()
         * above fails.  We do, after all, know what the format is
         * even if we weren't able to read it. */
        self->code = ARCHIVE_COMPRESSION_XZ;
@@ -972,8 +972,8 @@ lzip_bidder_init(struct archive_read_filter *self)
 {
        int r;
 
-       r = __archive_read_program(self, "unlzip");
-       /* Note: We set the format here even if __archive_read_program()
+       r = __archive_read_programl(self, "unlzip", "unlzip", NULL);
+       /* Note: We set the format here even if __archive_read_programl()
         * above fails.  We do, after all, know what the format is
         * even if we weren't able to read it. */
        self->code = ARCHIVE_COMPRESSION_LZIP;