~ubuntu-branches/ubuntu/oneiric/postgresql-9.1/oneiric-security

« back to all changes in this revision

Viewing changes to src/bin/pg_dump/pg_backup_tar.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-05-11 10:41:53 UTC
  • Revision ID: james.westby@ubuntu.com-20110511104153-psbh2o58553fv1m0
Tags: upstream-9.1~beta1
ImportĀ upstreamĀ versionĀ 9.1~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * src/bin/pg_dump/pg_backup_tar.h
 
3
 *
 
4
 * TAR Header
 
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 (s) (in octal ascii)
 
12
 * 136     12 bytes  Modify time (in octal ascii)
 
13
 * 148          8 bytes  Header checksum (in octal ascii)
 
14
 * 156          1 bytes  Link flag
 
15
 * 157    100 bytes  Linkname ('\0' terminated, 99 maximum length)
 
16
 * 257          8 bytes  Magic ("ustar  \0")
 
17
 * 265     32 bytes  User name ('\0' terminated, 31 maximum length)
 
18
 * 297     32 bytes  Group name ('\0' terminated, 31 maximum length)
 
19
 * 329          8 bytes  Major device ID (in octal ascii)
 
20
 * 337          8 bytes  Minor device ID (in octal ascii)
 
21
 * 345    167 bytes  Padding
 
22
 * 512   (s+p)bytes  File contents (s+p) := (((s) + 511) & ~511), round up to 512 bytes
 
23
 */
 
24
 
 
25
/* The linkflag defines the type of file */
 
26
#define  LF_OLDNORMAL '\0'              /* Normal disk file, Unix compatible */
 
27
#define  LF_NORMAL        '0'           /* Normal disk file */
 
28
#define  LF_LINK          '1'           /* Link to previously dumped file */
 
29
#define  LF_SYMLINK   '2'               /* Symbolic link */
 
30
#define  LF_CHR           '3'           /* Character special file */
 
31
#define  LF_BLK           '4'           /* Block special file */
 
32
#define  LF_DIR           '5'           /* Directory */
 
33
#define  LF_FIFO          '6'           /* FIFO special file */
 
34
#define  LF_CONTIG        '7'           /* Contiguous file */