rpm
4.5
|
00001 #ifndef H_TAR 00002 #define H_TAR 00003 00009 typedef struct tarHeader_s * tarHeader; 00010 00011 /* Tar file constants */ 00012 # define TAR_MAGIC "ustar" /* ustar and a null */ 00013 # define TAR_VERSION " " /* Be compatable with GNU tar format */ 00014 00015 #define TAR_BLOCK_SIZE 512 00016 #define TAR_MAGIC_LEN 6 00017 #define TAR_VERSION_LEN 2 00018 00019 /* POSIX tar Header Block, from POSIX 1003.1-1990 */ 00020 #define TAR_NAME_SIZE 100 00021 00025 struct tarHeader_s { /* byte offset */ 00026 char name[TAR_NAME_SIZE]; /* 0-99 */ 00027 char mode[8]; /* 100-107 */ /* mode */ 00028 char uid[8]; /* 108-115 */ /* uid */ 00029 char gid[8]; /* 116-123 */ /* gid */ 00030 char filesize[12]; /* 124-135 */ /* ilesize */ 00031 char mtime[12]; /* 136-147 */ /* mtime */ 00032 char checksum[8]; /* 148-155 */ /* checksum */ 00033 char typeflag; /* 156-156 */ 00034 char linkname[TAR_NAME_SIZE]; /* 157-256 */ 00035 char magic[6]; /* 257-262 */ /* magic */ 00036 char version[2]; /* 263-264 */ 00037 char uname[32]; /* 265-296 */ 00038 char gname[32]; /* 297-328 */ 00039 char devMajor[8]; /* 329-336 */ /* devMajor */ 00040 char devMinor[8]; /* 337-344 */ /* devMinor */ 00041 char prefix[155]; /* 345-499 */ 00042 char padding[12]; /* 500-512 (pad to exactly TAR_BLOCK_SIZE) */ 00043 }; 00044 00045 /*@unchecked@*/ 00046 extern int _tar_debug; 00047 00048 #ifdef __cplusplus 00049 extern "C" { 00050 #endif 00051 00057 int tarTrailerWrite(FSM_t fsm) 00058 /*@globals h_errno, fileSystem, internalState @*/ 00059 /*@modifies fsm, fileSystem, internalState @*/; 00060 00067 int tarHeaderWrite(FSM_t fsm, struct stat * st) 00068 /*@globals h_errno, fileSystem, internalState @*/ 00069 /*@modifies fsm, fileSystem, internalState @*/; 00070 00077 int tarHeaderRead(FSM_t fsm, struct stat * st) 00078 /*@globals h_errno, fileSystem, internalState @*/ 00079 /*@modifies fsm, *st, fileSystem, internalState @*/; 00080 00081 #ifdef __cplusplus 00082 } 00083 #endif 00084 00085 #endif /* H_TAR */