diff options
author | Brett Holman <bholman.devel@gmail.com> | 2022-05-03 16:50:57 -0600 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:32 -0400 |
commit | 372c11125a2e07485fcd4cb08601f24d8a3bc3c6 (patch) | |
tree | 5247e30d2087d97244468d4ab81d6e07da640fb6 /fs/bcachefs/opts.h | |
parent | ee4d17d0325c5806c7ef0f4b3c8604d5ebf65000 (diff) |
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 <bholman.devel@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/opts.h')
-rw-r--r-- | fs/bcachefs/opts.h | 14 |
1 files changed, 3 insertions, 11 deletions
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; |