mirror of
https://github.com/uutils/coreutils
synced 2024-10-15 12:24:09 +00:00
Merge pull request #5932 from cakebaker/uucore_fix_never_used_warnings_on_redox
uucore: fix "X is never used" warnings on Redox
This commit is contained in:
commit
b485a480cf
|
@ -124,7 +124,7 @@ pub fn get_groups_gnu(arg_id: Option<u32>) -> IOResult<Vec<gid_t>> {
|
|||
Ok(sort_groups(groups, egid))
|
||||
}
|
||||
|
||||
#[cfg(all(unix, feature = "process"))]
|
||||
#[cfg(all(unix, not(target_os = "redox"), feature = "process"))]
|
||||
fn sort_groups(mut groups: Vec<gid_t>, egid: gid_t) -> Vec<gid_t> {
|
||||
if let Some(index) = groups.iter().position(|&x| x == egid) {
|
||||
groups[..=index].rotate_right(1);
|
||||
|
|
|
@ -14,7 +14,7 @@ use time::UtcOffset;
|
|||
const LINUX_MTAB: &str = "/etc/mtab";
|
||||
#[cfg(any(target_os = "linux", target_os = "android"))]
|
||||
const LINUX_MOUNTINFO: &str = "/proc/self/mountinfo";
|
||||
#[cfg(unix)]
|
||||
#[cfg(all(unix, not(target_os = "redox")))]
|
||||
static MOUNT_OPT_BIND: &str = "bind";
|
||||
#[cfg(windows)]
|
||||
const MAX_PATH: usize = 266;
|
||||
|
@ -318,7 +318,7 @@ impl From<StatFs> for MountInfo {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[cfg(all(unix, not(target_os = "redox")))]
|
||||
fn is_dummy_filesystem(fs_type: &str, mount_option: &str) -> bool {
|
||||
// spell-checker:disable
|
||||
match fs_type {
|
||||
|
@ -337,14 +337,14 @@ fn is_dummy_filesystem(fs_type: &str, mount_option: &str) -> bool {
|
|||
// spell-checker:enable
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[cfg(all(unix, not(target_os = "redox")))]
|
||||
fn is_remote_filesystem(dev_name: &str, fs_type: &str) -> bool {
|
||||
dev_name.find(':').is_some()
|
||||
|| (dev_name.starts_with("//") && fs_type == "smbfs" || fs_type == "cifs")
|
||||
|| dev_name == "-hosts"
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[cfg(all(unix, not(target_os = "redox")))]
|
||||
fn mount_dev_id(mount_dir: &str) -> String {
|
||||
use std::os::unix::fs::MetadataExt;
|
||||
|
||||
|
|
Loading…
Reference in a new issue