| 53 |
/* 500 */ |
/* 500 */ |
| 54 |
}; |
}; |
| 55 |
|
|
| 56 |
|
struct star_header |
| 57 |
|
{ /* byte offset */ |
| 58 |
|
char name[100]; /* 0 */ |
| 59 |
|
char mode[8]; /* 100 */ |
| 60 |
|
char uid[8]; /* 108 */ |
| 61 |
|
char gid[8]; /* 116 */ |
| 62 |
|
char size[12]; /* 124 */ |
| 63 |
|
char mtime[12]; /* 136 */ |
| 64 |
|
char chksum[8]; /* 148 */ |
| 65 |
|
char typeflag; /* 156 */ |
| 66 |
|
char linkname[100]; /* 157 */ |
| 67 |
|
char magic[6]; /* 257 */ |
| 68 |
|
char version[2]; /* 263 */ |
| 69 |
|
char uname[32]; /* 265 */ |
| 70 |
|
char gname[32]; /* 297 */ |
| 71 |
|
char devmajor[8]; /* 329 */ |
| 72 |
|
char devminor[8]; /* 337 */ |
| 73 |
|
char prefix[131]; /* 345 */ |
| 74 |
|
char atime[12]; /* 476 */ |
| 75 |
|
char ctime[12]; /* 488 */ |
| 76 |
|
/* 500 */ |
| 77 |
|
}; |
| 78 |
|
|
| 79 |
#define TMAGIC "ustar" /* ustar and a null */ |
#define TMAGIC "ustar" /* ustar and a null */ |
| 80 |
#define TMAGLEN 6 |
#define TMAGLEN 6 |
| 81 |
#define TVERSION "00" /* 00 and no null */ |
#define TVERSION "00" /* 00 and no null */ |
| 92 |
#define FIFOTYPE '6' /* FIFO special */ |
#define FIFOTYPE '6' /* FIFO special */ |
| 93 |
#define CONTTYPE '7' /* reserved */ |
#define CONTTYPE '7' /* reserved */ |
| 94 |
|
|
| 95 |
|
#define XHDTYPE 'x' /* Extended header referring to the |
| 96 |
|
next file in the archive */ |
| 97 |
|
#define XGLTYPE 'g' /* Global extended header */ |
| 98 |
|
|
| 99 |
/* Bits used in the mode field, values in octal. */ |
/* Bits used in the mode field, values in octal. */ |
| 100 |
#define TSUID 04000 /* set UID on execution */ |
#define TSUID 04000 /* set UID on execution */ |
| 101 |
#define TSGID 02000 /* set GID on execution */ |
#define TSGID 02000 /* set GID on execution */ |
| 252 |
V7_FORMAT, /* old V7 tar format */ |
V7_FORMAT, /* old V7 tar format */ |
| 253 |
OLDGNU_FORMAT, /* GNU format as per before tar 1.12 */ |
OLDGNU_FORMAT, /* GNU format as per before tar 1.12 */ |
| 254 |
POSIX_FORMAT, /* restricted, pure POSIX format */ |
POSIX_FORMAT, /* restricted, pure POSIX format */ |
| 255 |
|
STAR_FORMAT, /* Star format defined in 1994 */ |
| 256 |
GNU_FORMAT /* POSIX format with GNU extensions */ |
GNU_FORMAT /* POSIX format with GNU extensions */ |
| 257 |
}; |
}; |
| 258 |
|
|
| 259 |
|
struct tar_stat_info |
| 260 |
|
{ |
| 261 |
|
char *orig_file_name; /* name of file read from the archive header */ |
| 262 |
|
char *file_name; /* name of file for the current archive entry |
| 263 |
|
after being normalized. */ |
| 264 |
|
int had_trailing_slash; /* nonzero if the current archive entry had a |
| 265 |
|
trailing slash before it was normalized. */ |
| 266 |
|
char *link_name; /* name of link for the current archive entry. */ |
| 267 |
|
|
| 268 |
|
unsigned int devminor; /* device minor number */ |
| 269 |
|
unsigned int devmajor; /* device major number */ |
| 270 |
|
char *uname; /* user name of owner */ |
| 271 |
|
char *gname; /* group name of owner */ |
| 272 |
|
struct stat stat; /* regular filesystem stat */ |
| 273 |
|
}; |
| 274 |
|
|
| 275 |
union block |
union block |
| 276 |
{ |
{ |
| 277 |
char buffer[BLOCKSIZE]; |
char buffer[BLOCKSIZE]; |
| 278 |
struct posix_header header; |
struct posix_header header; |
| 279 |
|
struct star_header star_header; |
| 280 |
struct extra_header extra_header; |
struct extra_header extra_header; |
| 281 |
struct oldgnu_header oldgnu_header; |
struct oldgnu_header oldgnu_header; |
| 282 |
struct sparse_header sparse_header; |
struct sparse_header sparse_header; |