summaryrefslogtreecommitdiff
path: root/src/apk_database.h
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2014-11-01 20:18:57 +0200
committerTimo Teräs <timo.teras@iki.fi>2014-11-01 20:18:57 +0200
commit4f823f2a50646d64c506ad8b28ce7e672a87d2ec (patch)
treecd305cb95d799b4c0f01352693c5e547f77016ba /src/apk_database.h
parent36d5b91495e22fe8425277f2d793fd4a284ee2b6 (diff)
downloadapk-tools-4f823f2a50646d64c506ad8b28ce7e672a87d2ec.tar.gz
apk-tools-4f823f2a50646d64c506ad8b28ce7e672a87d2ec.tar.bz2
apk-tools-4f823f2a50646d64c506ad8b28ce7e672a87d2ec.tar.xz
apk-tools-4f823f2a50646d64c506ad8b28ce7e672a87d2ec.zip
make 'mode, uid, gid' triplet separate atomized struct
there are only few combinations for that triplet, and they occur multiple times reducing the struct sizes a bit. make sane defaults and prepare to not write defaults to disk to reduce on-disk installed db size.
Diffstat (limited to 'src/apk_database.h')
-rw-r--r--src/apk_database.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/apk_database.h b/src/apk_database.h
index 731a5fd..089cdd8 100644
--- a/src/apk_database.h
+++ b/src/apk_database.h
@@ -24,16 +24,21 @@
struct apk_name;
APK_ARRAY(apk_name_array, struct apk_name *);
+struct apk_db_acl {
+ mode_t mode;
+ uid_t uid;
+ gid_t gid;
+};
+
struct apk_db_file {
struct hlist_node hash_node;
struct hlist_node diri_files_list;
struct apk_db_dir_instance *diri;
- mode_t mode;
- uid_t uid;
- gid_t gid;
+ struct apk_db_acl *acl;
- unsigned short namelen;
+ unsigned short audited : 1;
+ unsigned short namelen : 15;
struct apk_checksum csum;
char name[];
};
@@ -84,9 +89,7 @@ struct apk_db_dir_instance {
struct hlist_head owned_files;
struct apk_package *pkg;
struct apk_db_dir *dir;
- mode_t mode;
- uid_t uid;
- gid_t gid;
+ struct apk_db_acl *acl;
};
struct apk_name {