summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-07-02 12:30:12 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-07-02 12:30:12 +0200
commit1c75a1860c5d6856f8b15367a46534ec18eb851b (patch)
tree87d62f5483eaa76f5558b03469fd0f8e410e2493
parent0bf27f94c3f745c85adda0dc25689dc6e328822c (diff)
Add missing htole32 transformations
Assuming this code will ever see a big endian platform. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
-rw-r--r--lib/sqfs/write_inode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqfs/write_inode.c b/lib/sqfs/write_inode.c
index 33fe3d6..cd4c53a 100644
--- a/lib/sqfs/write_inode.c
+++ b/lib/sqfs/write_inode.c
@@ -107,7 +107,7 @@ int meta_writer_write_inode(fstree_t *fs, id_table_t *idtbl, meta_writer_t *im,
case SQFS_INODE_FIFO:
case SQFS_INODE_SOCKET: {
sqfs_inode_ipc_t ipc = {
- .nlink = hard_link_count(node),
+ .nlink = htole32(hard_link_count(node)),
};
return meta_writer_append(im, &ipc, sizeof(ipc));
@@ -115,7 +115,7 @@ int meta_writer_write_inode(fstree_t *fs, id_table_t *idtbl, meta_writer_t *im,
case SQFS_INODE_EXT_FIFO:
case SQFS_INODE_EXT_SOCKET: {
sqfs_inode_ipc_ext_t ipc = {
- .nlink = hard_link_count(node),
+ .nlink = htole32(hard_link_count(node)),
.xattr_idx = htole32(0xFFFFFFFF),
};