summaryrefslogtreecommitdiff
path: root/mkfs
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-05-20 08:13:28 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-05-20 08:13:28 +0200
commit93f5a822b208b7df1c9a3f15685f397e0ce344aa (patch)
tree332f66e76268aed50680d4fdc6381d13067a0add /mkfs
parent8b54f42d9f0513860993945184aedcbe7f00604d (diff)
Get rid of unalligned pointers
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'mkfs')
-rw-r--r--mkfs/mkfs.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/mkfs/mkfs.c b/mkfs/mkfs.c
index 56f8842..dac0a34 100644
--- a/mkfs/mkfs.c
+++ b/mkfs/mkfs.c
@@ -41,6 +41,7 @@ int main(int argc, char **argv)
{
int status = EXIT_FAILURE, ret;
sqfs_info_t info;
+ uint64_t start;
memset(&info, 0, sizeof(info));
@@ -109,10 +110,12 @@ int main(int argc, char **argv)
if (sqfs_write_table(info.outfd, &info.super, info.fragments,
sizeof(info.fragments[0]), info.num_fragments,
- &info.super.fragment_table_start, info.cmp)) {
+ &start, info.cmp)) {
goto out_cmp;
}
+ info.super.fragment_table_start = start;
+
if (id_table_write(&info.idtbl, info.outfd, &info.super, info.cmp))
goto out_cmp;