mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-03-13 00:00:03 +03:00
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>
10 lines
199 B
Rust
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);
|
|
}
|
|
}
|
|
}
|