This adds `erofs_get_configure()` to get the global configuration
`cfg`. It allows external entities to change the global configuration
through this helper, thereby controlling the EROFS mkfs process.
It is just a temporary helper for liberofs and it will be deprecated
in the future. Don't rely on it too much.
Signed-off-by: Hongzhen Luo <hongzhen@linux.alibaba.com>
Link: https://lore.kernel.org/r/20240627022741.3912785-1-hongzhen@linux.alibaba.com
[ Gao Xiang: minor commit message update. ]
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
void erofs_show_config(void);
void erofs_exit_configure(void);
+/* (will be deprecated) temporary helper for updating global the cfg */
+struct erofs_configure *erofs_get_configure();
+
void erofs_set_fs_root(const char *rootdir);
const char *erofs_fspath(const char *fullpath);
free(cfg.c_compr_opts[i].alg);
}
+struct erofs_configure *erofs_get_configure()
+{
+ return &cfg;
+}
+
static unsigned int fullpath_prefix; /* root directory prefix length */
void erofs_set_fs_root(const char *rootdir)