diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-08-08 11:51:17 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-08-08 11:51:17 -0400 |
commit | c616061a938b05a1526c85bb3071300d0847d8c2 (patch) | |
tree | c5cf92da96e4f3a5d716c830465e8aff7f97da24 | |
parent | 95e8cddd3bdf4a68b4f87472e4063239d978bfc9 (diff) |
bch_sb::number_of_devices() now calls proper c helper
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r-- | bch_bindgen/src/bcachefs.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bch_bindgen/src/bcachefs.rs b/bch_bindgen/src/bcachefs.rs index 7b8a03df..366c7332 100644 --- a/bch_bindgen/src/bcachefs.rs +++ b/bch_bindgen/src/bcachefs.rs @@ -3,6 +3,8 @@ #![allow(non_snake_case)] #![allow(unused)] +use crate::c; + include!(concat!(env!("OUT_DIR"), "/bcachefs.rs")); use bitfield::bitfield; @@ -59,8 +61,8 @@ impl bch_sb { uuid::Uuid::from_bytes(self.user_uuid.b) } - pub fn number_of_devices(&self) -> u8 { - self.nr_devices + pub fn number_of_devices(&self) -> u32 { + unsafe { c::bch2_sb_nr_devices(self) } } /// Get the nonce used to encrypt the superblock |