From 974d9bf0001b330995c5bde3b5a16adab8037262 Mon Sep 17 00:00:00 2001 From: Nicholas Sielicki Date: Wed, 18 Oct 2023 00:59:02 -0500 Subject: [PATCH] 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 Signed-off-by: Kent Overstreet --- rust-src/src/cmd_mount.rs | 4 ++-- 1 file 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, fstype: &str, - mountflags: u64, + mountflags: libc::c_ulong, data: Option, ) -> 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) -> (Option, u64) { +fn parse_mount_options(options: impl AsRef) -> (Option, libc::c_ulong) { use either::Either::*; debug!("parsing mount options: {}", options.as_ref()); let (opts, flags) = options