diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-09-01 23:08:04 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-09-01 23:08:36 +0200 |
commit | 9d9d4505f58b6584fe3b261a7686c5d779f77c11 (patch) | |
tree | 7f1a086abc273c55c4d3a9cf96144715e3d15329 /lib/sqfs/id_table_write.c | |
parent | 307107ecd2fc3ffbf6fe91497daf767700f3572f (diff) |
Internalize the layout of the id_table_t structure
As an opaque struct it has a chance to change its layout in the future
without breaking ABI compatibiliy.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/sqfs/id_table_write.c')
-rw-r--r-- | lib/sqfs/id_table_write.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/lib/sqfs/id_table_write.c b/lib/sqfs/id_table_write.c deleted file mode 100644 index 0f0e475..0000000 --- a/lib/sqfs/id_table_write.c +++ /dev/null @@ -1,32 +0,0 @@ -/* SPDX-License-Identifier: GPL-3.0-or-later */ -/* - * id_table_write.c - * - * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at> - */ -#include "config.h" - -#include "highlevel.h" - -int id_table_write(id_table_t *tbl, int outfd, sqfs_super_t *super, - compressor_t *cmp) -{ - uint64_t start; - size_t i; - int ret; - - for (i = 0; i < tbl->num_ids; ++i) - tbl->ids[i] = htole32(tbl->ids[i]); - - super->id_count = tbl->num_ids; - - ret = sqfs_write_table(outfd, super, cmp, tbl->ids, - sizeof(tbl->ids[0]) * tbl->num_ids, &start); - - super->id_table_start = start; - - for (i = 0; i < tbl->num_ids; ++i) - tbl->ids[i] = le32toh(tbl->ids[i]); - - return ret; -} |