]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
fuse2fs: compact all the boolean flags in struct fuse2fs
authorDarrick J. Wong <djwong@kernel.org>
Wed, 21 May 2025 22:36:13 +0000 (15:36 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 23 May 2025 05:10:10 +0000 (01:10 -0400)
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 <djwong@kernel.org>
Link: https://lore.kernel.org/r/174786677639.1383760.16546264802006958473.stgit@frogsfrogsfrogs
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/fuse2fs.c

index 5c4ce4506f1c17565b2d1237098cfb0c80a04bf7..4148928106adfafbd03653ff166a257332bee681 100644 (file)
@@ -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;