summaryrefslogtreecommitdiff
path: root/lib/cpio.h
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2000-03-23 15:49:50 +0000
committerjbj <devnull@localhost>2000-03-23 15:49:50 +0000
commitcab176172b8ef247f24e5aa0928c3aa0b8adabd9 (patch)
treea76b37e5b22003d56ec39a8128ee794080be4ec0 /lib/cpio.h
parent46e17d7a2d27cb91d1c930de46c0a8026410b0d5 (diff)
downloadrpm-cab176172b8ef247f24e5aa0928c3aa0b8adabd9.tar.gz
rpm-cab176172b8ef247f24e5aa0928c3aa0b8adabd9.tar.bz2
rpm-cab176172b8ef247f24e5aa0928c3aa0b8adabd9.zip
- API: change dbi to pass by reference, not value.
- cram all of db1, db_185, and db2 interfaces into rpmlib. CVS patchset: 3636 CVS date: 2000/03/23 15:49:50
Diffstat (limited to 'lib/cpio.h')
-rw-r--r--lib/cpio.h29
1 files changed, 17 insertions, 12 deletions
diff --git a/lib/cpio.h b/lib/cpio.h
index ed19f89d8..fb95c72eb 100644
--- a/lib/cpio.h
+++ b/lib/cpio.h
@@ -8,7 +8,7 @@
* standard cpio.
* The implementation is pretty close, but it has some behaviors which are
* more to RPM's liking. I tried to document the differing behavior in cpio.c,
- * but I may have missed some.
+ * but I may have missed some (ewt).
*
*/
@@ -52,35 +52,36 @@
#define CPIO_MAP_GID (1 << 3)
#define CPIO_FOLLOW_SYMLINKS (1 << 4) /* only for building */
-/** The structure used to define a cpio payload file. */
+/**
+ * Defines a single file to be included in a cpio payload.
+ */
struct cpioFileMapping {
-/*@{*/
- /*@owned@*/ const char * archivePath; /*!< Path to store in cpio archive. */
- /*@owned@*/ const char * fsPath; /*!< Location of payload file. */
+/*@dependent@*/ const char * archivePath; /*!< Path to store in cpio archive. */
+/*@dependent@*/ const char * fsPath; /*!< Location of payload file. */
mode_t finalMode; /*!< Mode of payload file (from header). */
uid_t finalUid; /*!< Uid of payload file (from header). */
gid_t finalGid; /*!< Gid of payload file (from header). */
int mapFlags;
-/*@}*/
};
-/** The structure passed as first argument during a cpio progress callback.
+/**
+ * The first argument passed in a cpio progress callback.
*
* Note: When building the cpio payload, only "file" is filled in.
*/
struct cpioCallbackInfo {
-/*@{*/
- /*@dependent@*/ const char * file; /*!< File name being installed. */
+/*@dependent@*/ const char * file; /*!< File name being installed. */
long fileSize; /*!< Total file size. */
long fileComplete; /*!< Amount of file unpacked. */
long bytesProcessed; /*!< No. bytes in archive read. */
-/*@}*/
};
#ifdef __cplusplus
extern "C" {
#endif
+/**
+ */
typedef void (*cpioCallback) (struct cpioCallbackInfo * filespec, void * data);
/**
@@ -103,10 +104,14 @@ int cpioBuildArchive(FD_t cfd, struct cpioFileMapping * mappings,
int numMappings, cpioCallback cb, void * cbData,
unsigned int * archiveSize, /*@out@*/const char ** failedFile);
-/** This is designed to be qsort/bsearch compatible */
+/**
+ * Compare two cpio file map entries.
+ * This is designed to be qsort/bsearch compatible.
+ */
int cpioFileMapCmp(const void * a, const void * b);
-/** */
+/**
+ */
/*@observer@*/ const char *cpioStrerror(int rc);
#ifdef __cplusplus