Skip to content

Commit

Permalink
tree-wide: Use cap-std-ext is_mountpoint() API
Browse files Browse the repository at this point in the history
I moved it there a while ago, now we can drop the copy of it
here.

Signed-off-by: Colin Walters <[email protected]>
  • Loading branch information
cgwalters committed Dec 20, 2024
1 parent c88fcfd commit 5013d45
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 64 deletions.
2 changes: 1 addition & 1 deletion lib/src/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1711,7 +1711,7 @@ pub(crate) async fn install_to_filesystem(

tracing::debug!("Root filesystem: {root_path}");

if let Some(false) = ostree_ext::mountutil::is_mountpoint(&rootfs_fd, ".")? {
if let Some(false) = rootfs_fd.is_mountpoint(".")? {
anyhow::bail!("Not a mountpoint: {root_path}");
}
rootfs_fd
Expand Down
3 changes: 1 addition & 2 deletions ostree-ext/src/commit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
//! <https://github.com/ostreedev/ostree-rs-ext/issues/159>
use crate::container_utils::require_ostree_container;
use crate::mountutil::is_mountpoint;
use anyhow::Context;
use anyhow::Result;
use cap_std::fs::Dir;
Expand Down Expand Up @@ -60,7 +59,7 @@ fn clean_subdir(root: &Dir, rootdev: u64) -> Result<()> {
}
// Also ignore bind mounts, if we have a new enough kernel with statx()
// that will tell us.
if is_mountpoint(root, &path)?.unwrap_or_default() {
if root.is_mountpoint(&path)?.unwrap_or_default() {
tracing::trace!("Skipping mount point {path:?}");
continue;
}
Expand Down
1 change: 0 additions & 1 deletion ostree-ext/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ pub mod diff;
pub mod ima;
pub mod keyfileext;
pub(crate) mod logging;
pub mod mountutil;
pub mod ostree_prepareroot;
pub mod refescape;
#[doc(hidden)]
Expand Down
60 changes: 0 additions & 60 deletions ostree-ext/src/mountutil.rs

This file was deleted.

0 comments on commit 5013d45

Please sign in to comment.