bcachefs-tools/rust-src/bch_bindgen/src/opts.rs
Kent Overstreet 8a7e3344fe rust: Filesystem options now supported
This implements opt_set!(), which works exactly the same as the C
version and allows filesystem options to be specified in Rust code.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-02-28 06:15:48 -05:00

10 lines
199 B
Rust

#[macro_export]
macro_rules! opt_set {
($opts:ident, $n:ident, $v:expr) => {
bch_bindgen::paste! {
$opts.$n = $v;
$opts.[<set_ $n _defined>](1);
}
}
}