diff options
-rw-r--r-- | bin/pax/ar_subs.c | 10 | ||||
-rw-r--r-- | bin/pax/options.c | 14 | ||||
-rw-r--r-- | bin/pax/pax.h | 6 |
3 files changed, 13 insertions, 17 deletions
diff --git a/bin/pax/ar_subs.c b/bin/pax/ar_subs.c index dafb4cedb8f..19dd7015ed9 100644 --- a/bin/pax/ar_subs.c +++ b/bin/pax/ar_subs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ar_subs.c,v 1.36 2014/01/08 06:41:49 guenther Exp $ */ +/* $OpenBSD: ar_subs.c,v 1.37 2014/01/30 13:30:11 espie Exp $ */ /* $NetBSD: ar_subs.c,v 1.5 1995/03/21 09:07:06 cgd Exp $ */ /*- @@ -100,7 +100,7 @@ list(void) * we need to read, to get the real filename */ off_t cnt; - if (!(*frmt->rd_data)(arcn, arcn->type == PAX_GLF + if (!rd_wrfile(arcn, arcn->type == PAX_GLF ? -1 : -2, &cnt)) (void)rd_skip(cnt + arcn->pad); continue; @@ -193,7 +193,7 @@ extract(void) /* * we need to read, to get the real filename */ - if (!(*frmt->rd_data)(arcn, arcn->type == PAX_GLF + if (!rd_wrfile(arcn, arcn->type == PAX_GLF ? -1 : -2, &cnt)) (void)rd_skip(cnt + arcn->pad); continue; @@ -333,7 +333,7 @@ extract(void) * extract the file from the archive and skip over padding and * any unprocessed data */ - res = (*frmt->rd_data)(arcn, fd, &cnt); + res = rd_wrfile(arcn, fd, &cnt); file_close(arcn, fd); if (vflag && vfpart) { (void)putc('\n', listf); @@ -525,7 +525,7 @@ wr_archive(ARCHD *arcn, int is_app) * which FOLLOWS this one will not be where we expect it to * be). */ - res = (*frmt->wr_data)(arcn, fd, &cnt); + res = wr_rdfile(arcn, fd, &cnt); rdfile_close(arcn, &fd); if (vflag && vfpart) { (void)putc('\n', listf); diff --git a/bin/pax/options.c b/bin/pax/options.c index 1366ee598c5..074d8d9d643 100644 --- a/bin/pax/options.c +++ b/bin/pax/options.c @@ -1,4 +1,4 @@ -/* $OpenBSD: options.c,v 1.81 2014/01/11 05:36:26 deraadt Exp $ */ +/* $OpenBSD: options.c,v 1.82 2014/01/30 13:30:11 espie Exp $ */ /* $NetBSD: options.c,v 1.6 1996/03/26 23:54:18 mrg Exp $ */ /*- @@ -104,32 +104,32 @@ FSUB fsub[] = { /* 0: OLD BINARY CPIO */ {"bcpio", 5120, sizeof(HD_BCPIO), 1, 0, 0, 1, bcpio_id, cpio_strd, bcpio_rd, bcpio_endrd, cpio_stwr, bcpio_wr, cpio_endwr, cpio_trail, - rd_wrfile, wr_rdfile, bad_opt}, + bad_opt}, /* 1: OLD OCTAL CHARACTER CPIO */ {"cpio", 5120, sizeof(HD_CPIO), 1, 0, 0, 1, cpio_id, cpio_strd, cpio_rd, cpio_endrd, cpio_stwr, cpio_wr, cpio_endwr, cpio_trail, - rd_wrfile, wr_rdfile, bad_opt}, + bad_opt}, /* 2: SVR4 HEX CPIO */ {"sv4cpio", 5120, sizeof(HD_VCPIO), 1, 0, 0, 1, vcpio_id, cpio_strd, vcpio_rd, vcpio_endrd, cpio_stwr, vcpio_wr, cpio_endwr, cpio_trail, - rd_wrfile, wr_rdfile, bad_opt}, + bad_opt}, /* 3: SVR4 HEX CPIO WITH CRC */ {"sv4crc", 5120, sizeof(HD_VCPIO), 1, 0, 0, 1, crc_id, crc_strd, vcpio_rd, vcpio_endrd, crc_stwr, vcpio_wr, cpio_endwr, cpio_trail, - rd_wrfile, wr_rdfile, bad_opt}, + bad_opt}, #endif /* 4: OLD TAR */ {"tar", 10240, BLKMULT, 0, 1, BLKMULT, 0, tar_id, no_op, tar_rd, tar_endrd, no_op, tar_wr, tar_endwr, tar_trail, - rd_wrfile, wr_rdfile, tar_opt}, + tar_opt}, /* 5: POSIX USTAR */ {"ustar", 10240, BLKMULT, 0, 1, BLKMULT, 0, ustar_id, ustar_strd, ustar_rd, tar_endrd, ustar_stwr, ustar_wr, tar_endwr, tar_trail, - rd_wrfile, wr_rdfile, tar_opt}, + tar_opt}, }; #define F_OCPIO 0 /* format when called as cpio -6 */ #define F_ACPIO 1 /* format when called as cpio -c */ diff --git a/bin/pax/pax.h b/bin/pax/pax.h index 26477976e4f..290dc58730c 100644 --- a/bin/pax/pax.h +++ b/bin/pax/pax.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pax.h,v 1.17 2005/11/09 19:59:06 otto Exp $ */ +/* $OpenBSD: pax.h,v 1.18 2014/01/30 13:30:11 espie Exp $ */ /* $NetBSD: pax.h,v 1.3 1995/03/21 09:07:41 cgd Exp $ */ /*- @@ -207,10 +207,6 @@ typedef struct { /* CAUTION: parameters to this function are */ /* different for trailers inside or outside */ /* of headers. See get_head() for details */ - int (*rd_data)(ARCHD *, /* read/process file data from the archive */ - int, off_t *); - int (*wr_data)(ARCHD *, /* write/process file data to the archive */ - int, off_t *); int (*options)(void); /* process format specific options (-o) */ } FSUB; |