rpmarchive.h
Go to the documentation of this file.
#ifndef H_ARCHIVE
#define H_ARCHIVE
#define RPMERR_CHECK_ERRNO -32768
enum rpmfilesErrorCodes {
RPMERR_ITER_END = -1,
RPMERR_BAD_MAGIC = -2,
RPMERR_BAD_HEADER = -3,
RPMERR_HDR_SIZE = -4,
RPMERR_UNKNOWN_FILETYPE= -5,
RPMERR_MISSING_FILE = -6,
RPMERR_DIGEST_MISMATCH = -7,
RPMERR_INTERNAL = -8,
RPMERR_UNMAPPED_FILE = -9,
RPMERR_ENOENT = -10,
RPMERR_ENOTEMPTY = -11,
RPMERR_FILE_SIZE = -12,
RPMERR_ITER_SKIP = -13,
RPMERR_EXIST_AS_DIR = -14,
RPMERR_OPEN_FAILED = -32768,
RPMERR_CHMOD_FAILED = -32769,
RPMERR_CHOWN_FAILED = -32770,
RPMERR_WRITE_FAILED = -32771,
RPMERR_UTIME_FAILED = -32772,
RPMERR_UNLINK_FAILED = -32773,
RPMERR_RENAME_FAILED = -32774,
RPMERR_SYMLINK_FAILED = -32775,
RPMERR_STAT_FAILED = -32776,
RPMERR_LSTAT_FAILED = -32777,
RPMERR_MKDIR_FAILED = -32778,
RPMERR_RMDIR_FAILED = -32779,
RPMERR_MKNOD_FAILED = -32780,
RPMERR_MKFIFO_FAILED = -32781,
RPMERR_LINK_FAILED = -32782,
RPMERR_READLINK_FAILED = -32783,
RPMERR_READ_FAILED = -32784,
RPMERR_COPY_FAILED = -32785,
RPMERR_LSETFCON_FAILED = -32786,
RPMERR_SETCAP_FAILED = -32787,
};
#ifdef __cplusplus
extern "C" {
#endif
char * rpmfileStrerror(int rc);
rpmfi rpmfiNewArchiveWriter(FD_t fd, rpmfiles files);
rpmfi rpmfiNewArchiveReader(FD_t fd, rpmfiles files, int itype);
int rpmfiArchiveClose(rpmfi fi);
rpm_loff_t rpmfiArchiveTell(rpmfi fi);
size_t rpmfiArchiveWrite(rpmfi fi, const void * buf, size_t size);
int rpmfiArchiveWriteFile(rpmfi fi, FD_t fd);
size_t rpmfiArchiveRead(rpmfi fi, void * buf, size_t size);
int rpmfiArchiveHasContent(rpmfi fi);
int rpmfiArchiveReadToFile(rpmfi fi, FD_t fd, int nodigest);
#ifdef __cplusplus
}
#endif
#endif /* H_ARCHIVE */
rpmfileStrerror
char * rpmfileStrerror(int rc)
Return formatted error message on payload handling failure.
rpmfiArchiveClose
int rpmfiArchiveClose(rpmfi fi)
Close payload archive.
RPMERR_MKNOD_FAILED
Definition: rpmarchive.h:42
rpmfiArchiveRead
size_t rpmfiArchiveRead(rpmfi fi, void *buf, size_t size)
Read content from current file in archive.
RPMERR_SYMLINK_FAILED
Definition: rpmarchive.h:37
RPMERR_ENOENT
Definition: rpmarchive.h:24
RPMERR_MKDIR_FAILED
Definition: rpmarchive.h:40
RPMERR_UNKNOWN_FILETYPE
Definition: rpmarchive.h:19
RPMERR_READLINK_FAILED
Definition: rpmarchive.h:45
RPMERR_HDR_SIZE
Definition: rpmarchive.h:18
RPMERR_UTIME_FAILED
Definition: rpmarchive.h:34
RPMERR_COPY_FAILED
Definition: rpmarchive.h:47
RPMERR_INTERNAL
Definition: rpmarchive.h:22
RPMERR_READ_FAILED
Definition: rpmarchive.h:46
RPMERR_WRITE_FAILED
Definition: rpmarchive.h:33
RPMERR_SETCAP_FAILED
Definition: rpmarchive.h:49
RPMERR_RENAME_FAILED
Definition: rpmarchive.h:36
RPMERR_FILE_SIZE
Definition: rpmarchive.h:26
RPMERR_STAT_FAILED
Definition: rpmarchive.h:38
rpmfiArchiveTell
rpm_loff_t rpmfiArchiveTell(rpmfi fi)
Return current position in payload archive.
rpmfi
struct rpmfi_s * rpmfi
Definition: rpmtypes.h:66
RPMERR_LSETFCON_FAILED
Definition: rpmarchive.h:48
rpmfiArchiveWrite
size_t rpmfiArchiveWrite(rpmfi fi, const void *buf, size_t size)
Write content into current file in archive.
FD_t
struct _FD_s * FD_t
RPM IO file descriptor type.
Definition: rpmtypes.h:98
rpmfiArchiveHasContent
int rpmfiArchiveHasContent(rpmfi fi)
Has current file content stored in the archive.
RPMERR_UNMAPPED_FILE
Definition: rpmarchive.h:23
RPMERR_MISSING_FILE
Definition: rpmarchive.h:20
RPMERR_RMDIR_FAILED
Definition: rpmarchive.h:41
rpmfiArchiveReadToFile
int rpmfiArchiveReadToFile(rpmfi fi, FD_t fd, int nodigest)
Write content from current file in archive to a file.
RPMERR_LSTAT_FAILED
Definition: rpmarchive.h:39
RPMERR_EXIST_AS_DIR
Definition: rpmarchive.h:28
RPMERR_CHMOD_FAILED
Definition: rpmarchive.h:31
RPMERR_LINK_FAILED
Definition: rpmarchive.h:44
RPMERR_BAD_HEADER
Definition: rpmarchive.h:17
rpmfiNewArchiveReader
rpmfi rpmfiNewArchiveReader(FD_t fd, rpmfiles files, int itype)
Get new file iterator for looping over the archive content.
RPMERR_ITER_END
Definition: rpmarchive.h:15
rpmfiArchiveWriteFile
int rpmfiArchiveWriteFile(rpmfi fi, FD_t fd)
Write content from given file into current file in archive.
rpmfilesErrorCodes
rpmfilesErrorCodes
Error codes for archive and file handling.
Definition: rpmarchive.h:14
RPMERR_CHOWN_FAILED
Definition: rpmarchive.h:32
RPMERR_MKFIFO_FAILED
Definition: rpmarchive.h:43
rpmfiNewArchiveWriter
rpmfi rpmfiNewArchiveWriter(FD_t fd, rpmfiles files)
Get new file iterator for writing the archive content.
RPMERR_DIGEST_MISMATCH
Definition: rpmarchive.h:21
RPMERR_ENOTEMPTY
Definition: rpmarchive.h:25
RPMERR_UNLINK_FAILED
Definition: rpmarchive.h:35
RPMERR_OPEN_FAILED
Definition: rpmarchive.h:30
rpmfiles
struct rpmfiles_s * rpmfiles
Definition: rpmtypes.h:67
rpm_loff_t
uint64_t rpm_loff_t
Definition: rpmtypes.h:51
RPMERR_ITER_SKIP
Definition: rpmarchive.h:27
RPMERR_BAD_MAGIC
Definition: rpmarchive.h:16