aboutsummaryrefslogtreecommitdiff
path: root/lib/sqfs
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2023-09-10 15:02:55 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2023-09-15 21:48:47 +0200
commite543ea3c6f46b336fb5a6f9ecdb9fab89e2f02ee (patch)
treebcfd896b7c541e0afe6d570f6dd8c97f57a13c7e /lib/sqfs
parentc1e8ef8975458c1c814e85d1e3abe3b94c1fc65e (diff)
libsqfs: remove dir reader internal.h, sub hierarchy
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/sqfs')
-rw-r--r--lib/sqfs/Makemodule.am4
-rw-r--r--lib/sqfs/src/dir_reader.c (renamed from lib/sqfs/src/dir_reader/dir_reader.c)42
-rw-r--r--lib/sqfs/src/dir_reader/internal.h52
3 files changed, 42 insertions, 56 deletions
diff --git a/lib/sqfs/Makemodule.am b/lib/sqfs/Makemodule.am
index 00105e8..14fa215 100644
--- a/lib/sqfs/Makemodule.am
+++ b/lib/sqfs/Makemodule.am
@@ -18,8 +18,8 @@ libsquashfs_la_SOURCES = $(LIBSQFS_HEARDS) lib/sqfs/src/id_table.c \
lib/sqfs/src/read_inode.c lib/sqfs/src/write_inode.c \
lib/sqfs/src/dir_writer.c lib/sqfs/src/xattr/xattr_reader.c \
lib/sqfs/src/read_table.c lib/sqfs/src/comp/compressor.c \
- lib/sqfs/src/comp/internal.h lib/sqfs/src/dir_reader/dir_reader.c \
- lib/sqfs/src/dir_reader/internal.h lib/sqfs/src/inode.c \
+ lib/sqfs/src/comp/internal.h lib/sqfs/src/dir_reader.c \
+ lib/sqfs/src/inode.c \
lib/sqfs/src/xattr/xattr_writer.c \
lib/sqfs/src/xattr/xattr_writer_flush.c \
lib/sqfs/src/xattr/xattr_writer_record.c \
diff --git a/lib/sqfs/src/dir_reader/dir_reader.c b/lib/sqfs/src/dir_reader.c
index aea6841..d5a8cbd 100644
--- a/lib/sqfs/src/dir_reader/dir_reader.c
+++ b/lib/sqfs/src/dir_reader.c
@@ -1,11 +1,49 @@
/* SPDX-License-Identifier: LGPL-3.0-or-later */
/*
- * fs_reader.c
+ * dir_reader.c
*
* Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at>
*/
#define SQFS_BUILDING_DLL
-#include "internal.h"
+#include "sqfs/meta_reader.h"
+#include "sqfs/dir_reader.h"
+#include "sqfs/compressor.h"
+#include "sqfs/id_table.h"
+#include "sqfs/super.h"
+#include "sqfs/inode.h"
+#include "sqfs/error.h"
+#include "sqfs/dir.h"
+#include "util/rbtree.h"
+#include "util/util.h"
+
+#include <string.h>
+#include <stdlib.h>
+
+enum {
+ DIR_STATE_NONE = 0,
+ DIR_STATE_OPENED = 1,
+ DIR_STATE_DOT = 2,
+ DIR_STATE_ENTRIES = 3,
+};
+
+struct sqfs_dir_reader_t {
+ sqfs_object_t base;
+
+ sqfs_meta_reader_t *meta_dir;
+ sqfs_meta_reader_t *meta_inode;
+ sqfs_super_t super;
+
+ sqfs_readdir_state_t it;
+
+ sqfs_u32 flags;
+
+ int start_state;
+ int state;
+ sqfs_u64 parent_ref;
+ sqfs_u64 cur_ref;
+ sqfs_u64 ent_ref;
+ rbtree_t dcache;
+};
static int inode_copy(const sqfs_inode_generic_t *inode,
sqfs_inode_generic_t **out)
diff --git a/lib/sqfs/src/dir_reader/internal.h b/lib/sqfs/src/dir_reader/internal.h
deleted file mode 100644
index 471d197..0000000
--- a/lib/sqfs/src/dir_reader/internal.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/* SPDX-License-Identifier: LGPL-3.0-or-later */
-/*
- * internal.h
- *
- * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at>
- */
-#ifndef DIR_READER_INTERNAL_H
-#define DIR_READER_INTERNAL_H
-
-#include "config.h"
-
-#include "sqfs/meta_reader.h"
-#include "sqfs/dir_reader.h"
-#include "sqfs/compressor.h"
-#include "sqfs/id_table.h"
-#include "sqfs/super.h"
-#include "sqfs/inode.h"
-#include "sqfs/error.h"
-#include "sqfs/dir.h"
-#include "util/rbtree.h"
-#include "util/util.h"
-
-#include <string.h>
-#include <stdlib.h>
-
-enum {
- DIR_STATE_NONE = 0,
- DIR_STATE_OPENED = 1,
- DIR_STATE_DOT = 2,
- DIR_STATE_ENTRIES = 3,
-};
-
-struct sqfs_dir_reader_t {
- sqfs_object_t base;
-
- sqfs_meta_reader_t *meta_dir;
- sqfs_meta_reader_t *meta_inode;
- sqfs_super_t super;
-
- sqfs_readdir_state_t it;
-
- sqfs_u32 flags;
-
- int start_state;
- int state;
- sqfs_u64 parent_ref;
- sqfs_u64 cur_ref;
- sqfs_u64 ent_ref;
- rbtree_t dcache;
-};
-
-#endif /* DIR_READER_INTERNAL_H */