summaryrefslogtreecommitdiffstats
path: root/isys
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>2001-11-30 01:56:25 +0000
committerErik Troan <ewt@redhat.com>2001-11-30 01:56:25 +0000
commit9225933a820f89b9e3d7091c2fde5030419ea1c9 (patch)
tree6002f8abdb9041e2dee5bb0b7c006ab56ee9919b /isys
parent87c7f532f849d1e6271fee0f32f61fa8ad747b09 (diff)
downloadanaconda-9225933a820f89b9e3d7091c2fde5030419ea1c9.tar.gz
anaconda-9225933a820f89b9e3d7091c2fde5030419ea1c9.tar.xz
anaconda-9225933a820f89b9e3d7091c2fde5030419ea1c9.zip
made more usefull
Diffstat (limited to 'isys')
-rw-r--r--isys/filtertest.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/isys/filtertest.c b/isys/filtertest.c
index 79df82b9e..c74fa7887 100644
--- a/isys/filtertest.c
+++ b/isys/filtertest.c
@@ -1,32 +1,28 @@
#include <stdio.h>
-#include <zlib.h>
+#include <fcntl.h>
#include "cpio.h"
int main(int argc, char ** argv) {
- char * pattern[2];
gzFile in, out;
int rc;
- if (argc != 3) {
- fprintf(stderr, "ack!\n");
+ if (argc < 3) {
+ fprintf(stderr, "bad arguments!\n");
return 1;
}
- in = gzopen(argv[1], "r");
+ in = gunzip_open(argv[1]);
if (!in) {
fprintf(stderr, "failed to open %s\n", argv[1]);
}
- out = gzdopen(1, "w");
+ out = gzip_dopen(1);
- pattern[0] = argv[2];
- pattern[1] = NULL;
-
- rc = myCpioFilterArchive(in, out, pattern);
+ rc = myCpioFilterArchive(in, out, argv + 2);
fprintf(stderr, "returned %d\n", rc);
- gzclose(out);
+ gzip_close(out);
return rc;
}