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 *,
{
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;
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;
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;
}
}
-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, ...)
{
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;
{
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;
{
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;