mirror of
https://github.com/pygos/pkg-utils.git
synced 2024-11-22 04:49:46 +01:00
fixup: squashfs limits number of dirents to 256
The kernel implementation BAILS if a directory header is followed by more than a hard-coded maximum of entries (currently 256). Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
This commit is contained in:
parent
9402492c16
commit
75e169d06a
2 changed files with 4 additions and 0 deletions
|
@ -41,6 +41,9 @@ static int write_dir(meta_writer_t *dm, node_t *node)
|
||||||
count += 1;
|
count += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (count > SQFS_MAX_DIR_ENT)
|
||||||
|
count = SQFS_MAX_DIR_ENT;
|
||||||
|
|
||||||
hdr.count = htole32(count - 1);
|
hdr.count = htole32(count - 1);
|
||||||
hdr.start_block = htole32(c->inode_ref >> 16);
|
hdr.start_block = htole32(c->inode_ref >> 16);
|
||||||
hdr.inode_number = htole32(c->inode_num);
|
hdr.inode_number = htole32(c->inode_num);
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#define SQFS_META_BLOCK_SIZE 8192
|
#define SQFS_META_BLOCK_SIZE 8192
|
||||||
#define SQFS_DEFAULT_BLOCK_SIZE 131072
|
#define SQFS_DEFAULT_BLOCK_SIZE 131072
|
||||||
#define SQFS_DEVBLK_SIZE 4096
|
#define SQFS_DEVBLK_SIZE 4096
|
||||||
|
#define SQFS_MAX_DIR_ENT 256
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint32_t magic;
|
uint32_t magic;
|
||||||
|
|
Loading…
Reference in a new issue