summaryrefslogtreecommitdiff
path: root/mkfs/mkfs.h
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-06-10 19:56:52 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-06-10 19:56:52 +0200
commit856e8ae89a3ba86526b71bc811573c7e10d161d4 (patch)
tree102e320bf1e0a83723f98ecf57e8fa70439757b6 /mkfs/mkfs.h
parentdfcb5d93c6fb3d5c1c933275622d938e83da6a70 (diff)
cleanup: move directory serialization to separate file
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'mkfs/mkfs.h')
-rw-r--r--mkfs/mkfs.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/mkfs/mkfs.h b/mkfs/mkfs.h
index c73b74e..15d349e 100644
--- a/mkfs/mkfs.h
+++ b/mkfs/mkfs.h
@@ -2,6 +2,7 @@
#ifndef MKFS_H
#define MKFS_H
+#include "meta_writer.h"
#include "squashfs.h"
#include "compress.h"
#include "id_table.h"
@@ -18,6 +19,18 @@
#include <errno.h>
typedef struct {
+ tree_node_t *node;
+ uint32_t block;
+ uint32_t offset;
+} idx_ref_t;
+
+typedef struct {
+ size_t num_nodes;
+ size_t max_nodes;
+ idx_ref_t idx_nodes[];
+} dir_index_t;
+
+typedef struct {
unsigned int def_uid;
unsigned int def_gid;
unsigned int def_mode;
@@ -65,4 +78,6 @@ int sqfs_write_inodes(sqfs_info_t *info);
int write_xattr(sqfs_info_t *info);
+int write_dir(meta_writer_t *dm, dir_info_t *dir, dir_index_t **index);
+
#endif /* MKFS_H */