source: trunk/minix/include/tar.h@ 20

Last change on this file since 20 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 1.3 KB
Line 
1/* The <tar.h> header is used with the tape archiver, tar. */
2
3#ifndef _TAR_H
4#define _TAR_H
5
6#define TBLOCK 512
7#define NAMSIZ 100
8#define PFXSIZ 155
9
10#define TMODLEN 8
11#define TUIDLEN 8
12#define TGIDLEN 8
13#define TSIZLEN 12
14#define TMTMLEN 12
15#define TCKSLEN 8
16
17#define TMAGIC "ustar"
18#define TMAGLEN 6
19#define TVERSION "00"
20#define TVERSLEN 2
21#define TUNMLEN 32
22#define TGNMLEN 32
23#define TDEVLEN 8
24
25#define REGTYPE '0'
26#define AREGTYPE '\0'
27#define LNKTYPE '1'
28#define SYMTYPE '2'
29#define CHRTYPE '3'
30#define BLKTYPE '4'
31#define DIRTYPE '5'
32#define FIFOTYPE '6'
33#define CONTTYPE '7'
34
35#define TSUID 04000
36#define TSGID 02000
37#define TSVTX 01000
38
39#define TUREAD 00400
40#define TUWRITE 00200
41#define TUEXEC 00100
42#define TGREAD 00040
43#define TGWRITE 00020
44#define TGEXEC 00010
45#define TOREAD 00004
46#define TOWRITE 00002
47#define TOEXEC 00001
48
49union hblock {
50 char dummy[TBLOCK];
51 struct header {
52 char name[NAMSIZ];
53 char mode[TMODLEN];
54 char uid[TUIDLEN];
55 char gid[TGIDLEN];
56 char size[TSIZLEN];
57 char mtime[TMTMLEN];
58 char chksum[TCKSLEN];
59 char typeflag;
60 char linkname[NAMSIZ];
61 char magic[TMAGLEN];
62 char version[TVERSLEN];
63 char uname[TUNMLEN];
64 char gname[TGNMLEN];
65 char devmajor[TDEVLEN];
66 char devminor[TDEVLEN];
67 char prefix[PFXSIZ];
68 } dbuf;
69};
70
71#endif /* _TAR_H */
Note: See TracBrowser for help on using the repository browser.