summaryrefslogtreecommitdiff
path: root/src/apk_io.h
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2008-11-14 14:26:59 +0200
committerTimo Teras <timo.teras@iki.fi>2008-11-14 14:26:59 +0200
commit8e23a2ba4eb7f6192c6bce8a6da81004803eca3f (patch)
tree1450b08f0e2818a4bc12206081b6777b3e92b7f8 /src/apk_io.h
parent86676ac8c40a96880f323c2b1a09a5714d85705e (diff)
downloadapk-tools-8e23a2ba4eb7f6192c6bce8a6da81004803eca3f.tar.gz
apk-tools-8e23a2ba4eb7f6192c6bce8a6da81004803eca3f.tar.bz2
apk-tools-8e23a2ba4eb7f6192c6bce8a6da81004803eca3f.tar.xz
apk-tools-8e23a2ba4eb7f6192c6bce8a6da81004803eca3f.zip
db: checksum installed files, protect config files
Checksum of installed is computed on the fly when extracting them and it'll be saved to fdb. When installing config files those are diverted with suffix .apk-new if earlier version of same file with local changes exist.
Diffstat (limited to 'src/apk_io.h')
-rw-r--r--src/apk_io.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/apk_io.h b/src/apk_io.h
index a0ceac2..0eadec0 100644
--- a/src/apk_io.h
+++ b/src/apk_io.h
@@ -14,15 +14,28 @@
#include "apk_defines.h"
#include "apk_blob.h"
+struct apk_file_info {
+ char *name;
+ char *link_target;
+ char *uname;
+ char *gname;
+ off_t size;
+ uid_t uid;
+ gid_t gid;
+ mode_t mode;
+ time_t mtime;
+ dev_t device;
+ csum_t csum;
+};
+
struct apk_istream {
size_t (*read)(void *stream, void *ptr, size_t size);
- size_t (*splice)(void *stream, int fd, size_t size);
void (*close)(void *stream);
};
struct apk_bstream {
size_t (*read)(void *stream, void **ptr);
- void (*close)(void *stream, csum_t csum);
+ void (*close)(void *stream, csum_p csum);
};
struct apk_istream *apk_istream_from_fd(int fd);