aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--difftool/sqfsdiff.c2
-rw-r--r--extras/browse.c2
-rw-r--r--extras/list_files.c2
-rw-r--r--extras/mk42sqfs.c2
-rw-r--r--extras/mknastyfs.c2
-rw-r--r--include/sqfs/id_table.h4
-rw-r--r--lib/common/writer.c2
-rw-r--r--lib/sqfs/id_table.c5
-rw-r--r--tar/sqfs2tar.c2
-rw-r--r--unpack/rdsquashfs.c2
10 files changed, 15 insertions, 10 deletions
diff --git a/difftool/sqfsdiff.c b/difftool/sqfsdiff.c
index 1c80812..58ddb4b 100644
--- a/difftool/sqfsdiff.c
+++ b/difftool/sqfsdiff.c
@@ -59,7 +59,7 @@ static int open_sfqs(sqfs_state_t *state, const char *path)
}
}
- state->idtbl = sqfs_id_table_create();
+ state->idtbl = sqfs_id_table_create(0);
if (state->idtbl == NULL) {
sqfs_perror(path, "creating ID table", SQFS_ERROR_ALLOC);
goto fail_cmp;
diff --git a/extras/browse.c b/extras/browse.c
index 6992a4b..49ddb7e 100644
--- a/extras/browse.c
+++ b/extras/browse.c
@@ -519,7 +519,7 @@ int main(int argc, char **argv)
}
/* Create and read the UID/GID mapping table */
- idtbl = sqfs_id_table_create();
+ idtbl = sqfs_id_table_create(0);
if (idtbl == NULL) {
fputs("Error creating ID table.\n", stderr);
goto out_cmp;
diff --git a/extras/list_files.c b/extras/list_files.c
index 16fe360..de390f0 100644
--- a/extras/list_files.c
+++ b/extras/list_files.c
@@ -100,7 +100,7 @@ int main(int argc, char **argv)
}
/* Create and read the UID/GID mapping table */
- idtbl = sqfs_id_table_create();
+ idtbl = sqfs_id_table_create(0);
if (idtbl == NULL) {
fputs("Error creating ID table.\n", stderr);
goto out_cmp;
diff --git a/extras/mk42sqfs.c b/extras/mk42sqfs.c
index 1c55bf1..0dbcc4e 100644
--- a/extras/mk42sqfs.c
+++ b/extras/mk42sqfs.c
@@ -115,7 +115,7 @@ int main(void)
}
/* create an ID table */
- idtbl = sqfs_id_table_create();
+ idtbl = sqfs_id_table_create(0);
if (idtbl == NULL) {
fputs("Error creating ID table.\n", stderr);
goto out_dirwr;
diff --git a/extras/mknastyfs.c b/extras/mknastyfs.c
index 216c7eb..2a66bc9 100644
--- a/extras/mknastyfs.c
+++ b/extras/mknastyfs.c
@@ -104,7 +104,7 @@ int main(void)
}
/* create an ID table */
- idtbl = sqfs_id_table_create();
+ idtbl = sqfs_id_table_create(0);
if (idtbl == NULL) {
fputs("Error creating ID table.\n", stderr);
goto out_dirwr;
diff --git a/include/sqfs/id_table.h b/include/sqfs/id_table.h
index a280250..67990db 100644
--- a/include/sqfs/id_table.h
+++ b/include/sqfs/id_table.h
@@ -50,9 +50,11 @@ extern "C" {
*
* @memberof sqfs_id_table_t
*
+ * @param flags Currently must be set to 0 or creating the table fails.
+ *
* @return A pointer to an ID table object, NULL on allocation failure.
*/
-SQFS_API sqfs_id_table_t *sqfs_id_table_create(void);
+SQFS_API sqfs_id_table_t *sqfs_id_table_create(sqfs_u32 flags);
/**
* @brief Destroy an ID table object and free all memory used by it.
diff --git a/lib/common/writer.c b/lib/common/writer.c
index 1bbf6bd..b6adc59 100644
--- a/lib/common/writer.c
+++ b/lib/common/writer.c
@@ -136,7 +136,7 @@ int sqfs_writer_init(sqfs_writer_t *sqfs, const sqfs_writer_cfg_t *wrcfg)
memset(&sqfs->stats, 0, sizeof(sqfs->stats));
register_stat_hooks(sqfs->data, &sqfs->stats);
- sqfs->idtbl = sqfs_id_table_create();
+ sqfs->idtbl = sqfs_id_table_create(0);
if (sqfs->idtbl == NULL) {
sqfs_perror(wrcfg->filename, "creating ID table",
SQFS_ERROR_ALLOC);
diff --git a/lib/sqfs/id_table.c b/lib/sqfs/id_table.c
index a320eca..8c30964 100644
--- a/lib/sqfs/id_table.c
+++ b/lib/sqfs/id_table.c
@@ -22,8 +22,11 @@ struct sqfs_id_table_t {
size_t max_ids;
};
-sqfs_id_table_t *sqfs_id_table_create(void)
+sqfs_id_table_t *sqfs_id_table_create(sqfs_u32 flags)
{
+ if (flags != 0)
+ return NULL;
+
return calloc(1, sizeof(sqfs_id_table_t));
}
diff --git a/tar/sqfs2tar.c b/tar/sqfs2tar.c
index 935b687..2fb30cb 100644
--- a/tar/sqfs2tar.c
+++ b/tar/sqfs2tar.c
@@ -577,7 +577,7 @@ int main(int argc, char **argv)
}
}
- idtbl = sqfs_id_table_create();
+ idtbl = sqfs_id_table_create(0);
if (idtbl == NULL) {
perror("creating ID table");
diff --git a/unpack/rdsquashfs.c b/unpack/rdsquashfs.c
index 3cce318..14a88ae 100644
--- a/unpack/rdsquashfs.c
+++ b/unpack/rdsquashfs.c
@@ -89,7 +89,7 @@ int main(int argc, char **argv)
}
}
- idtbl = sqfs_id_table_create();
+ idtbl = sqfs_id_table_create(0);
if (idtbl == NULL) {
sqfs_perror(opt.image_name, "creating ID table",
SQFS_ERROR_ALLOC);