From 372c11125a2e07485fcd4cb08601f24d8a3bc3c6 Mon Sep 17 00:00:00 2001 From: Brett Holman Date: Tue, 3 May 2022 16:50:57 -0600 Subject: bcachefs: Make bch_option compatible with Rust ffi Rust FFI lacks support for unnamed structs and unions. The space saved in bch_option is not enough to be significant. Signed-off-by: Brett Holman Signed-off-by: Kent Overstreet --- fs/bcachefs/opts.h | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'fs/bcachefs/opts.h') diff --git a/fs/bcachefs/opts.h b/fs/bcachefs/opts.h index 863891dcb554..e15ffb07416b 100644 --- a/fs/bcachefs/opts.h +++ b/fs/bcachefs/opts.h @@ -455,17 +455,9 @@ struct bch_option { enum opt_flags flags; u64 min, max; - union { - struct { - }; - struct { - const char * const *choices; - }; - struct { - int (*parse)(struct bch_fs *, const char *, u64 *); - void (*to_text)(struct printbuf *, struct bch_fs *, struct bch_sb *, u64); - }; - }; + const char * const *choices; + int (*parse)(struct bch_fs *, const char *, u64 *); + void (*to_text)(struct printbuf *, struct bch_fs *, struct bch_sb *, u64); const char *hint; const char *help; -- cgit v1.2.3