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