rpm
4.5
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
lib
tar.h
Go to the documentation of this file.
1
#ifndef H_TAR
2
#define H_TAR
3
9
typedef
struct
tarHeader_s
*
tarHeader
;
10
11
/* Tar file constants */
12
# define TAR_MAGIC "ustar"
/* ustar and a null */
13
# define TAR_VERSION " "
/* Be compatable with GNU tar format */
14
15
#define TAR_BLOCK_SIZE 512
16
#define TAR_MAGIC_LEN 6
17
#define TAR_VERSION_LEN 2
18
19
/* POSIX tar Header Block, from POSIX 1003.1-1990 */
20
#define TAR_NAME_SIZE 100
21
25
struct
tarHeader_s
{
/* byte offset */
26
char
name
[
TAR_NAME_SIZE
];
/* 0-99 */
27
char
mode
[8];
/* 100-107 */
/* mode */
28
char
uid
[8];
/* 108-115 */
/* uid */
29
char
gid
[8];
/* 116-123 */
/* gid */
30
char
filesize
[12];
/* 124-135 */
/* ilesize */
31
char
mtime
[12];
/* 136-147 */
/* mtime */
32
char
checksum
[8];
/* 148-155 */
/* checksum */
33
char
typeflag
;
/* 156-156 */
34
char
linkname
[
TAR_NAME_SIZE
];
/* 157-256 */
35
char
magic
[6];
/* 257-262 */
/* magic */
36
char
version
[2];
/* 263-264 */
37
char
uname
[32];
/* 265-296 */
38
char
gname
[32];
/* 297-328 */
39
char
devMajor
[8];
/* 329-336 */
/* devMajor */
40
char
devMinor
[8];
/* 337-344 */
/* devMinor */
41
char
prefix
[155];
/* 345-499 */
42
char
padding
[12];
/* 500-512 (pad to exactly TAR_BLOCK_SIZE) */
43
};
44
45
/*@unchecked@*/
46
extern
int
_tar_debug
;
47
48
#ifdef __cplusplus
49
extern
"C"
{
50
#endif
51
57
int
tarTrailerWrite
(
FSM_t
fsm)
58
/*@globals h_errno, fileSystem, internalState @*/
59
/*@modifies fsm, fileSystem, internalState @*/
;
60
67
int
tarHeaderWrite
(
FSM_t
fsm,
struct
stat * st)
68
/*@globals h_errno, fileSystem, internalState @*/
69
/*@modifies fsm, fileSystem, internalState @*/
;
70
77
int
tarHeaderRead
(
FSM_t
fsm,
struct
stat * st)
78
/*@globals h_errno, fileSystem, internalState @*/
79
/*@modifies fsm, *st, fileSystem, internalState @*/
;
80
81
#ifdef __cplusplus
82
}
83
#endif
84
85
#endif
/* H_TAR */
Generated on Tue Aug 28 2012 18:13:47 for rpm by
1.8.2