blob: e8efa73bee420f8259eeccad23870feb4cd118d3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
/* SPDX-License-Identifier: GPL-3.0-or-later */
/*
* data.h
*
* Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at>
*/
#ifndef SQFS_DATA_H
#define SQFS_DATA_H
#include "sqfs/predef.h"
#define SQFS_META_BLOCK_SIZE 8192
#define SQFS_IS_BLOCK_COMPRESSED(size) (((size) & (1 << 24)) == 0)
#define SQFS_ON_DISK_BLOCK_SIZE(size) ((size) & ((1 << 24) - 1))
#define SQFS_IS_SPARSE_BLOCK(size) (SQFS_ON_DISK_BLOCK_SIZE(size) == 0)
struct sqfs_fragment_t {
uint64_t start_offset;
uint32_t size;
uint32_t pad0;
};
#endif /* SQFS_DATA_H */
|