From 318d14cabf4e29373006e04ee855f9583b0ce3a5 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sun, 29 Sep 2019 02:21:49 +0200 Subject: Fix inode writer: do not store the file mode, only permissions SquashFS restores the file mode from the type, so those bits are completely redundant. On a side note: this also reduces entropy, allowing the compressor to *maybe* squeeze a few more bytes out. Signed-off-by: David Oberhollenzer --- lib/sqfs/write_inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sqfs/write_inode.c b/lib/sqfs/write_inode.c index debaa00..af6b1e6 100644 --- a/lib/sqfs/write_inode.c +++ b/lib/sqfs/write_inode.c @@ -32,7 +32,7 @@ int sqfs_meta_writer_write_inode(sqfs_meta_writer_t *ir, int ret; base.type = htole16(n->base.type); - base.mode = htole16(n->base.mode); + base.mode = htole16(n->base.mode & ~SQFS_INODE_MODE_MASK); base.uid_idx = htole16(n->base.uid_idx); base.gid_idx = htole16(n->base.gid_idx); base.mod_time = htole32(n->base.mod_time); -- cgit v1.2.3