aboutsummaryrefslogtreecommitdiff
path: root/lib/sqfs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqfs')
-rw-r--r--lib/sqfs/tree_node_from_inode.c1
-rw-r--r--lib/sqfs/write_inode.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqfs/tree_node_from_inode.c b/lib/sqfs/tree_node_from_inode.c
index 0d46eed..1ee85e5 100644
--- a/lib/sqfs/tree_node_from_inode.c
+++ b/lib/sqfs/tree_node_from_inode.c
@@ -88,6 +88,7 @@ tree_node_t *tree_node_from_inode(sqfs_inode_generic_t *inode,
out->gid = idtbl->ids[inode->base.gid_idx];
out->mode = inode->base.mode;
out->inode_num = inode->base.inode_number;
+ out->mod_time = inode->base.mod_time;
out->name = (char *)out->payload;
switch (inode->base.type) {
diff --git a/lib/sqfs/write_inode.c b/lib/sqfs/write_inode.c
index a013d6f..6e11277 100644
--- a/lib/sqfs/write_inode.c
+++ b/lib/sqfs/write_inode.c
@@ -143,7 +143,7 @@ int meta_writer_write_inode(fstree_t *fs, id_table_t *idtbl, meta_writer_t *im,
base.mode = htole16(node->mode);
base.uid_idx = htole16(uid_idx);
base.gid_idx = htole16(gid_idx);
- base.mod_time = htole32(fs->defaults.st_mtime);
+ base.mod_time = htole32(node->mod_time);
base.inode_number = htole32(node->inode_num);
if (meta_writer_append(im, &base, sizeof(base))) {