| 1 |
/* |
| 2 |
* src/bin/pg_dump/pg_backup_tar.h |
| 3 |
* |
| 4 |
* TAR Header (see "ustar interchange format" in POSIX 1003.1) |
| 5 |
* |
| 6 |
* Offset Length Contents |
| 7 |
* 0 100 bytes File name ('\0' terminated, 99 maximum length) |
| 8 |
* 100 8 bytes File mode (in octal ascii) |
| 9 |
* 108 8 bytes User ID (in octal ascii) |
| 10 |
* 116 8 bytes Group ID (in octal ascii) |
| 11 |
* 124 12 bytes File size (in octal ascii) |
| 12 |
* 136 12 bytes Modify time (Unix timestamp in octal ascii) |
| 13 |
* 148 8 bytes Header checksum (in octal ascii) |
| 14 |
* 156 1 bytes Type flag (see below) |
| 15 |
* 157 100 bytes Linkname, if symlink ('\0' terminated, 99 maximum length) |
| 16 |
* 257 6 bytes Magic ("ustar\0") |
| 17 |
* 263 2 bytes Version ("00") |
| 18 |
* 265 32 bytes User name ('\0' terminated, 31 maximum length) |
| 19 |
* 297 32 bytes Group name ('\0' terminated, 31 maximum length) |
| 20 |
* 329 8 bytes Major device ID (in octal ascii) |
| 21 |
* 337 8 bytes Minor device ID (in octal ascii) |
| 22 |
* 345 155 bytes File name prefix (not used in our implementation) |
| 23 |
* 500 12 bytes Padding |
| 24 |
* |
| 25 |
* 512 (s+p)bytes File contents, padded out to 512-byte boundary |
| 26 |
*/ |
| 27 |
|
| 28 |
/* The type flag defines the type of file */ |
| 29 |
#define LF_OLDNORMAL '\0' /* Normal disk file, Unix compatible */ |
| 30 |
#define LF_NORMAL '0' /* Normal disk file */ |
| 31 |
#define LF_LINK '1' /* Link to previously dumped file */ |
| 32 |
#define LF_SYMLINK '2' /* Symbolic link */ |
| 33 |
#define LF_CHR '3' /* Character special file */ |
| 34 |
#define LF_BLK '4' /* Block special file */ |
| 35 |
#define LF_DIR '5' /* Directory */ |
| 36 |
#define LF_FIFO '6' /* FIFO special file */ |
| 37 |
#define LF_CONTIG '7' /* Contiguous file */ |