summaryrefslogtreecommitdiff
path: root/lib/sqfs/write_inode.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-29 02:21:49 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-29 02:24:29 +0200
commit318d14cabf4e29373006e04ee855f9583b0ce3a5 (patch)
tree9193f30a5e5906dca7d78d3a2b972189587f0a39 /lib/sqfs/write_inode.c
parent89d0a57e2271db304fdf2ed7d31947c9a3418940 (diff)
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 <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/sqfs/write_inode.c')
-rw-r--r--lib/sqfs/write_inode.c2
1 files changed, 1 insertions, 1 deletions
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);