From: Darrick J. Wong Date: Wed, 21 May 2025 22:36:13 +0000 (-0700) Subject: fuse2fs: compact all the boolean flags in struct fuse2fs X-Git-Tag: v1.47.3-rc1~59 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c7f2688540d95e7f2cbcd178f8ff62ebe079faf7;p=thirdparty%2Fe2fsprogs.git fuse2fs: compact all the boolean flags in struct fuse2fs Compact all the booleans into u8 fields. I'd go further and turn them into bitfields but that breaks the fuse argument parsing macros, which compute the offset of the structure fields, and gcc won't let us do that to bit fields. Still, 136 -> 112 bytes isn't bad. Signed-off-by: Darrick J. Wong Link: https://lore.kernel.org/r/174786677639.1383760.16546264802006958473.stgit@frogsfrogsfrogs Signed-off-by: Theodore Ts'o --- diff --git a/misc/fuse2fs.c b/misc/fuse2fs.c index 5c4ce450..41489281 100644 --- a/misc/fuse2fs.c +++ b/misc/fuse2fs.c @@ -151,16 +151,16 @@ struct fuse2fs { pthread_mutex_t bfl; char *device; char *shortdev; - int ro; - int debug; - int no_default_opts; - int panic_on_error; - int minixdf; - int fakeroot; - int alloc_all_blocks; - int norecovery; - int kernel; - int directio; + uint8_t ro; + uint8_t debug; + uint8_t no_default_opts; + uint8_t panic_on_error; + uint8_t minixdf; + uint8_t fakeroot; + uint8_t alloc_all_blocks; + uint8_t norecovery; + uint8_t kernel; + uint8_t directio; unsigned long offset; unsigned int next_generation; unsigned long long cache_size;