58 #if defined(_IOSM_INTERNAL)
62 #define IOSMERR_CHECK_ERRNO 0x00008000
66 enum iosmErrorReturns_e {
67 IOSMERR_BAD_MAGIC = (2 ),
68 IOSMERR_BAD_HEADER = (3 ),
69 IOSMERR_OPEN_FAILED = (4 | IOSMERR_CHECK_ERRNO),
70 IOSMERR_CHMOD_FAILED = (5 | IOSMERR_CHECK_ERRNO),
71 IOSMERR_CHOWN_FAILED = (6 | IOSMERR_CHECK_ERRNO),
72 IOSMERR_WRITE_FAILED = (7 | IOSMERR_CHECK_ERRNO),
73 IOSMERR_UTIME_FAILED = (8 | IOSMERR_CHECK_ERRNO),
74 IOSMERR_UNLINK_FAILED = (9 | IOSMERR_CHECK_ERRNO),
76 IOSMERR_RENAME_FAILED = (10 | IOSMERR_CHECK_ERRNO),
77 IOSMERR_SYMLINK_FAILED = (11 | IOSMERR_CHECK_ERRNO),
78 IOSMERR_STAT_FAILED = (12 | IOSMERR_CHECK_ERRNO),
79 IOSMERR_LSTAT_FAILED = (13 | IOSMERR_CHECK_ERRNO),
80 IOSMERR_MKDIR_FAILED = (14 | IOSMERR_CHECK_ERRNO),
81 IOSMERR_RMDIR_FAILED = (15 | IOSMERR_CHECK_ERRNO),
82 IOSMERR_MKNOD_FAILED = (16 | IOSMERR_CHECK_ERRNO),
83 IOSMERR_MKFIFO_FAILED = (17 | IOSMERR_CHECK_ERRNO),
84 IOSMERR_LINK_FAILED = (18 | IOSMERR_CHECK_ERRNO),
85 IOSMERR_READLINK_FAILED = (19 | IOSMERR_CHECK_ERRNO),
86 IOSMERR_READ_FAILED = (20 | IOSMERR_CHECK_ERRNO),
87 IOSMERR_COPY_FAILED = (21 | IOSMERR_CHECK_ERRNO),
88 IOSMERR_LSETFCON_FAILED = (22 | IOSMERR_CHECK_ERRNO),
89 IOSMERR_HDR_SIZE = (23 ),
90 IOSMERR_HDR_TRAILER = (24 ),
91 IOSMERR_UNKNOWN_FILETYPE= (25 ),
92 IOSMERR_MISSING_HARDLINK= (26 ),
93 IOSMERR_DIGEST_MISMATCH = (27 ),
94 IOSMERR_INTERNAL = (28 ),
95 IOSMERR_UNMAPPED_FILE = (29 ),
96 IOSMERR_ENOENT = (30 ),
97 IOSMERR_ENOTEMPTY = (31 )
103 #define IOSM_VERBOSE 0x8000
104 #define IOSM_INTERNAL 0x4000
105 #define IOSM_SYSCALL 0x2000
106 #define IOSM_DEAD 0x1000
108 #define _fv(_a) ((_a) | IOSM_VERBOSE)
109 #define _fi(_a) ((_a) | IOSM_INTERNAL)
110 #define _fs(_a) ((_a) | (IOSM_INTERNAL | IOSM_SYSCALL))
111 #define _fd(_a) ((_a) | (IOSM_INTERNAL | IOSM_DEAD))
178 #if defined(_IOSM_INTERNAL)
182 typedef struct iosmIterator_s * IOSMI_t;
189 struct hardLink_s * next;
191 const char ** nsuffix;
205 struct iosmIterator_s {
246 struct hardLink_s * links;
248 struct hardLink_s * li;
250 unsigned int * archiveSize;
252 const char ** failedFile;
258 const char * osuffix;
260 const char * nsuffix;
265 unsigned short * dnlx;
290 const char * baseName;
292 const char * fdigest;
294 const unsigned char * digest;
296 const char * fcontext;
307 int (*headerRead) (
void * _iosm,
struct stat *st)
309 int (*headerWrite) (
void * _iosm,
struct stat *st)
311 int (*trailerWrite) (
void * _iosm)
352 #if defined(_IOSM_INTERNAL)
385 unsigned int * archiveSize,
386 const char ** failedFile)
400 #if defined(_IOSM_INTERNAL)
407 void * iosmGetTs(
const IOSM_t iosm)