Skip to contentSkip to conversation

fuse2fs: revert change of storing boolean options in bytes instead of ints

PATCH In review Dave Dykstra 2 participants 2 messages Oct 10, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fuse2fs: revert change of storing boolean options in bytes instead of ints

This reverts commit c7f2688540d95e7f2cbcd178f8ff62ebe079faf7 which turned the ints into uint8_t but didn't realize that fuse_opt_parse() assumes they are ints.

Fixes https://github.com/tytso/e2fsprogs/issues/245

---
 misc/fuse2fs.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
misc/fuse2fs.c +11 -11
index cb5620c7..f565dbe7 100644
@@ -217,17 +217,17 @@ struct fuse2fs {
 	pthread_mutex_t bfl;
 	char *device;
 	char *shortdev;
-	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;
-	uint8_t acl;
+	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;
+	int acl;
 
 	int logfd;
 	int blocklog;
Signature · 1 line
2.43.5
#1 lore raw
Quoted 7 lines · Dave Dykstra

This reverts commit c7f2688540d95e7f2cbcd178f8ff62ebe079faf7 which turned the ints into uint8_t but didn't realize that fuse_opt_parse() assumes they are ints.

Fixes https://github.com/tytso/e2fsprogs/issues/245

Thanks for the patch, but I already sent this a month ago:
https://lore.kernel.org/linux-ext4/175797569727.245695.9292992844444922508.stgit@frogsfrogsfrogs/

Could you reply to that patch with a review, please?

(also the libfuse code that does this is f*cking evil...)

--D

Quoted 41 lines
---
 misc/fuse2fs.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
misc/fuse2fs.c +11 -11
index cb5620c7..f565dbe7 100644
@@ -217,17 +217,17 @@ struct fuse2fs {
 	pthread_mutex_t bfl;
 	char *device;
 	char *shortdev;
-	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;
-	uint8_t acl;
+	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;
+	int acl;
 
 	int logfd;
 	int blocklog;
Signature · 1 line
2.43.5