summaryrefslogtreecommitdiff
path: root/include/common.h
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-03-05 22:38:15 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-03-05 22:41:04 +0100
commit85e36aab1258d8d9ec7b61ce013f167ef8e03ae0 (patch)
treeb1d59cce7894520b53c6b1fa86666d91587aaf82 /include/common.h
parent5acb22a6a7168f8b961777482f39a125158def50 (diff)
Change the signature of sqfs_compressor_create to return an error code
Make sure the function has a way of telling the caller *why* it failed. This way, the function can convey whether it had an internal error, an allocation failure, whether the arguments are totaly nonsensical, or simply that the compressor *or specific configuration* is not supported. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include/common.h')
-rw-r--r--include/common.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/common.h b/include/common.h
index bbdf81d..2ecea42 100644
--- a/include/common.h
+++ b/include/common.h
@@ -148,7 +148,8 @@ void print_version(const char *progname);
XXX: This must be in libcommon instead of libsquashfs for legal reasons.
*/
-sqfs_compressor_t *lzo_compressor_create(const sqfs_compressor_config_t *cfg);
+int lzo_compressor_create(const sqfs_compressor_config_t *cfg,
+ sqfs_compressor_t **out);
/*
Parse a number optionally followed by a KMG suffix (case insensitive). Prints