aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicholas Sielicki <linux@opensource.nslick.com>2023-10-18 00:59:02 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-11-08 11:32:36 -0500
commit974d9bf0001b330995c5bde3b5a16adab8037262 (patch)
tree703c2956b59b592345a055d27e736896684aa2a0
parent29e27cc49234571477c9840a7112270069553abc (diff)
downloadbcachefs-tools-974d9bf0001b330995c5bde3b5a16adab8037262.tar.gz
rust: mount: use libc::c_ulong for flags
libc proper treats mount flags as an unsigned long, which is usually u64, except when it isn't. When preparing mount flags, use the libc::c_ulong type instead of u64 to allow for this. This fixes compiling this file under armv7l. Signed-off-by: Nicholas Sielicki <linux@opensource.nslick.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r--rust-src/src/cmd_mount.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/rust-src/src/cmd_mount.rs b/rust-src/src/cmd_mount.rs
index bb23c1a1..f7c6d920 100644
--- a/rust-src/src/cmd_mount.rs
+++ b/rust-src/src/cmd_mount.rs
@@ -14,7 +14,7 @@ fn mount_inner(
src: String,
target: impl AsRef<std::path::Path>,
fstype: &str,
- mountflags: u64,
+ mountflags: libc::c_ulong,
data: Option<String>,
) -> anyhow::Result<()> {
@@ -45,7 +45,7 @@ fn mount_inner(
/// Parse a comma-separated mount options and split out mountflags and filesystem
/// specific options.
-fn parse_mount_options(options: impl AsRef<str>) -> (Option<String>, u64) {
+fn parse_mount_options(options: impl AsRef<str>) -> (Option<String>, libc::c_ulong) {
use either::Either::*;
debug!("parsing mount options: {}", options.as_ref());
let (opts, flags) = options