diff options
author | Ryan Zoeller <rtzoeller@rtzoeller.com> | 2022-04-24 19:04:23 -0500 |
---|---|---|
committer | Ryan Zoeller <rtzoeller@rtzoeller.com> | 2022-04-24 19:25:16 -0500 |
commit | e543733a4cce1dab91155e7bea9510ca9895ecfd (patch) | |
tree | 4a83fa74b1e4c5df875c8e319196f61857e7205b /src | |
parent | f1a1e2d7c5be99bb11b4d390cd0b6802a839f419 (diff) | |
download | nix-e543733a4cce1dab91155e7bea9510ca9895ecfd.zip |
Upgrade sysctl to 0.4
Upgrade sysctl dev-dependency to 0.4 and handle its breaking API changes.
Diffstat (limited to 'src')
-rw-r--r-- | src/mount/bsd.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mount/bsd.rs b/src/mount/bsd.rs index b4d611ee..109522f9 100644 --- a/src/mount/bsd.rs +++ b/src/mount/bsd.rs @@ -168,8 +168,9 @@ pub type NmountResult = std::result::Result<(), NmountError>; /// To mount `target` onto `mountpoint` with `nullfs`: /// ``` /// # use nix::unistd::Uid; -/// # use ::sysctl::CtlValue; -/// # if !Uid::current().is_root() && CtlValue::Int(0) == ::sysctl::value("vfs.usermount").unwrap() { +/// # use ::sysctl::{CtlValue, Sysctl}; +/// # let ctl = ::sysctl::Ctl::new("vfs.usermount").unwrap(); +/// # if !Uid::current().is_root() && CtlValue::Int(0) == ctl.value().unwrap() { /// # return; /// # }; /// use nix::mount::{MntFlags, Nmount, unmount}; |