aboutsummaryrefslogtreecommitdiff
path: root/fs/squashfs/sqfs_filesystem.h
diff options
context:
space:
mode:
authorJoao Marcos Costa <joaomarcos.costa@bootlin.com>2020-08-18 17:17:21 +0200
committerTom Rini <trini@konsulko.com>2020-08-24 14:11:31 -0400
commit10f7cf5f12a8721d6c985d4de11dac4d19e0e47e (patch)
tree970ab35116ee4f6882c4b1cc499b71175ee4ea24 /fs/squashfs/sqfs_filesystem.h
parent4a1f0b80adfc9465e8a3efcb884d397e5ab7f07f (diff)
downloadu-boot-10f7cf5f12a8721d6c985d4de11dac4d19e0e47e.zip
u-boot-10f7cf5f12a8721d6c985d4de11dac4d19e0e47e.tar.gz
u-boot-10f7cf5f12a8721d6c985d4de11dac4d19e0e47e.tar.bz2
fs/squashfs: Add init and clean-up functions to decompression
Add sqfs_decompressor_init() and sqfs_decompressor_cleanup(). These functions are called respectively in sqfs_probe() and sqfs_close(). For now, only ZSTD requires an initialization logic. ZSTD support will be added in a follow-up commit. Move squashfs_ctxt definition to sqfs_filesystem.h. This structure is passed to sqfs_decompressor_init() and sqfs_decompressor_cleanup(), so it can no longer be local to sqfs.c. Signed-off-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
Diffstat (limited to 'fs/squashfs/sqfs_filesystem.h')
-rw-r--r--fs/squashfs/sqfs_filesystem.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/squashfs/sqfs_filesystem.h b/fs/squashfs/sqfs_filesystem.h
index d63e3a4..ff2b0b1 100644
--- a/fs/squashfs/sqfs_filesystem.h
+++ b/fs/squashfs/sqfs_filesystem.h
@@ -9,8 +9,9 @@
#define SQFS_FILESYSTEM_H
#include <asm/unaligned.h>
-#include <stdint.h>
#include <fs.h>
+#include <part.h>
+#include <stdint.h>
#define SQFS_UNCOMPRESSED_DATA 0x0002
#define SQFS_MAGIC_NUMBER 0x73717368
@@ -72,6 +73,12 @@ struct squashfs_super_block {
__le64 export_table_start;
};
+struct squashfs_ctxt {
+ struct disk_partition cur_part_info;
+ struct blk_desc *cur_dev;
+ struct squashfs_super_block *sblk;
+};
+
struct squashfs_directory_index {
u32 index;
u32 start;