From: Hongzhen Luo Date: Mon, 11 Nov 2024 09:57:15 +0000 (+0800) Subject: erofs-utils: lib: rearrange struct erofs_configure X-Git-Tag: accepted/tizen/unified/20250610.081809~94 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bc6a5d3d85ad255b3ca4d939437727989ad7b9a9;p=platform%2Fupstream%2Ferofs-utils.git erofs-utils: lib: rearrange struct erofs_configure Move the fields controlled by the NDEBUG macro to the end to maintain a consistent layout for preceding variables. It addresses cases where a third-party application does not define NDEBUG while erofs-utils does. Ideally, third-party applications should use the same macros as erofs-utils to get a unique `struct erofs_configure`. However, since NDEBUG enables unnecessary assertions, restructuring the layout resolves such inconsistencies. Fixes: ad6c80dc168d ("erofs-utils: lib: add erofs_get_configure()") Signed-off-by: Hongzhen Luo Link: https://lore.kernel.org/r/20241111095715.3814956-1-hongzhen@linux.alibaba.com Signed-off-by: Gao Xiang --- diff --git a/include/erofs/config.h b/include/erofs/config.h index ae366c1..cff4cea 100644 --- a/include/erofs/config.h +++ b/include/erofs/config.h @@ -46,10 +46,6 @@ struct erofs_configure { int c_dbg_lvl; bool c_dry_run; bool c_legacy_compress; -#ifndef NDEBUG - bool c_random_pclusterblks; - bool c_random_algorithms; -#endif char c_timeinherit; char c_chunkbits; bool c_inline_data; @@ -94,6 +90,10 @@ struct erofs_configure { char *fs_config_file; char *block_list_file; #endif +#ifndef NDEBUG + bool c_random_pclusterblks; + bool c_random_algorithms; +#endif }; extern struct erofs_configure cfg;