pax.h (b97fa2ef508bb1cc99621edb8b6d03845b55b8bd) pax.h (46be34b90213ebd9037cb2c24aec0009d7f2f5c1)
1/*-
2 * Copyright (c) 1992 Keith Muller.
3 * Copyright (c) 1992, 1993
4 * The Regents of the University of California. All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * Keith Muller of the University of California, San Diego.
8 *

--- 21 unchanged lines hidden (view full) ---

30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 * SUCH DAMAGE.
36 *
37 * @(#)pax.h 8.2 (Berkeley) 4/18/94
1/*-
2 * Copyright (c) 1992 Keith Muller.
3 * Copyright (c) 1992, 1993
4 * The Regents of the University of California. All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * Keith Muller of the University of California, San Diego.
8 *

--- 21 unchanged lines hidden (view full) ---

30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 * SUCH DAMAGE.
36 *
37 * @(#)pax.h 8.2 (Berkeley) 4/18/94
38 * $Id$
38 * $Id: pax.h,v 1.6 1997/02/22 14:04:40 peter Exp $
39 */
40
41/*
42 * BSD PAX global data structures and constants.
43 */
44
45#define MAXBLK 32256 /* MAX blocksize supported (posix SPEC) */
46 /* WARNING: increasing MAXBLK past 32256 */
47 /* will violate posix spec. */
48#define BLKMULT 512 /* blocksize must be even mult of 512 bytes */
49 /* Don't even think of changing this */
50#define DEVBLK 8192 /* default read blksize for devices */
51#define FILEBLK 10240 /* default read blksize for files */
39 */
40
41/*
42 * BSD PAX global data structures and constants.
43 */
44
45#define MAXBLK 32256 /* MAX blocksize supported (posix SPEC) */
46 /* WARNING: increasing MAXBLK past 32256 */
47 /* will violate posix spec. */
48#define BLKMULT 512 /* blocksize must be even mult of 512 bytes */
49 /* Don't even think of changing this */
50#define DEVBLK 8192 /* default read blksize for devices */
51#define FILEBLK 10240 /* default read blksize for files */
52#define PAXPATHLEN 3072 /* maximium path length for pax. MUST be */
52#define PAXPATHLEN 3072 /* maximum path length for pax. MUST be */
53 /* longer than the system MAXPATHLEN */
54
55/*
56 * Pax modes of operation
57 */
58#define LIST 0 /* List the file in an archive */
59#define EXTRACT 1 /* extract the files in an archive */
60#define ARCHIVE 2 /* write a new archive */

--- 11 unchanged lines hidden (view full) ---

72#define ISPIPE 4 /* pipe/socket */
73
74/*
75 * Format Specific Routine Table
76 *
77 * The format specific routine table allows new archive formats to be quickly
78 * added. Overall pax operation is independent of the actual format used to
79 * form the archive. Only those routines which deal directly with the archive
53 /* longer than the system MAXPATHLEN */
54
55/*
56 * Pax modes of operation
57 */
58#define LIST 0 /* List the file in an archive */
59#define EXTRACT 1 /* extract the files in an archive */
60#define ARCHIVE 2 /* write a new archive */

--- 11 unchanged lines hidden (view full) ---

72#define ISPIPE 4 /* pipe/socket */
73
74/*
75 * Format Specific Routine Table
76 *
77 * The format specific routine table allows new archive formats to be quickly
78 * added. Overall pax operation is independent of the actual format used to
79 * form the archive. Only those routines which deal directly with the archive
80 * are tailored to the oddities of the specifc format. All other routines are
80 * are tailored to the oddities of the specific format. All other routines are
81 * independent of the archive format. Data flow in and out of the format
82 * dependent routines pass pointers to ARCHD structure (described below).
83 */
84typedef struct {
85 char *name; /* name of format, this is the name the user */
86 /* gives to -x option to select it. */
87 int bsz; /* default block size. used when the user */
88 /* does not specify a blocksize for writing */

--- 9 unchanged lines hidden (view full) ---

98 /* to specify hard links. when members in */
99 /* the archive have the same inode/dev they */
100 /* are assumed to be hard links. During */
101 /* append we may have to generate unique ids */
102 /* to avoid creating incorrect hard links */
103 int hlk; /* does archive store hard links info? if */
104 /* not, we do not bother to look for them */
105 /* during archive write operations */
81 * independent of the archive format. Data flow in and out of the format
82 * dependent routines pass pointers to ARCHD structure (described below).
83 */
84typedef struct {
85 char *name; /* name of format, this is the name the user */
86 /* gives to -x option to select it. */
87 int bsz; /* default block size. used when the user */
88 /* does not specify a blocksize for writing */

--- 9 unchanged lines hidden (view full) ---

98 /* to specify hard links. when members in */
99 /* the archive have the same inode/dev they */
100 /* are assumed to be hard links. During */
101 /* append we may have to generate unique ids */
102 /* to avoid creating incorrect hard links */
103 int hlk; /* does archive store hard links info? if */
104 /* not, we do not bother to look for them */
105 /* during archive write operations */
106 int blkalgn; /* writes must be aligned to blkalgn boundry */
106 int blkalgn; /* writes must be aligned to blkalgn boundary */
107 int inhead; /* is the trailer encoded in a valid header? */
108 /* if not, trailers are assumed to be found */
109 /* in invalid headers (i.e like tar) */
110 int (*id)(); /* checks if a buffer is a valid header */
111 /* returns 1 if it is, o.w. returns a 0 */
112 int (*st_rd)(); /* initialize routine for read. so format */
113 /* can set up tables etc before it starts */
114 /* reading an archive */

--- 21 unchanged lines hidden (view full) ---

136 /* added. A -1 is returned if a write */
137 /* operation to the archive failed. this */
138 /* function sets the skip and pad fields so */
139 /* the proper padding can be added after */
140 /* file data. This routine must NEVER write */
141 /* a flawed archive header. */
142 int (*end_wr)(); /* end write. write the trailer and do any */
143 /* other format specific functions needed */
107 int inhead; /* is the trailer encoded in a valid header? */
108 /* if not, trailers are assumed to be found */
109 /* in invalid headers (i.e like tar) */
110 int (*id)(); /* checks if a buffer is a valid header */
111 /* returns 1 if it is, o.w. returns a 0 */
112 int (*st_rd)(); /* initialize routine for read. so format */
113 /* can set up tables etc before it starts */
114 /* reading an archive */

--- 21 unchanged lines hidden (view full) ---

136 /* added. A -1 is returned if a write */
137 /* operation to the archive failed. this */
138 /* function sets the skip and pad fields so */
139 /* the proper padding can be added after */
140 /* file data. This routine must NEVER write */
141 /* a flawed archive header. */
142 int (*end_wr)(); /* end write. write the trailer and do any */
143 /* other format specific functions needed */
144 /* at the ecnd of a archive write */
144 /* at the end of a archive write */
145 int (*trail)(); /* returns 0 if a valid trailer, -1 if not */
146 /* For formats which encode the trailer */
147 /* outside of a valid header, a return value */
148 /* of 1 indicates that the block passed to */
149 /* it can never contain a valid header (skip */
150 /* this block, no point in looking at it) */
151 /* CAUTION: parameters to this function are */
152 /* different for trailers inside or outside */

--- 87 unchanged lines hidden ---
145 int (*trail)(); /* returns 0 if a valid trailer, -1 if not */
146 /* For formats which encode the trailer */
147 /* outside of a valid header, a return value */
148 /* of 1 indicates that the block passed to */
149 /* it can never contain a valid header (skip */
150 /* this block, no point in looking at it) */
151 /* CAUTION: parameters to this function are */
152 /* different for trailers inside or outside */

--- 87 unchanged lines hidden ---