mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
uucore/fsext: fix unused imports and split read_fs_list for wasm target
This commit is contained in:
@@ -428,6 +428,7 @@ fn mount_dev_id(mount_dir: &OsStr) -> String {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(target_os = "wasi"))]
|
||||
use crate::error::UResult;
|
||||
#[cfg(any(
|
||||
target_os = "freebsd",
|
||||
@@ -458,6 +459,7 @@ use std::ptr;
|
||||
use std::slice;
|
||||
|
||||
/// Read file system list.
|
||||
#[cfg(not(target_os = "wasi"))]
|
||||
pub fn read_fs_list() -> UResult<Vec<MountInfo>> {
|
||||
#[cfg(any(target_os = "linux", target_os = "android", target_os = "cygwin"))]
|
||||
{
|
||||
@@ -538,7 +540,6 @@ pub fn read_fs_list() -> UResult<Vec<MountInfo>> {
|
||||
target_os = "redox",
|
||||
target_os = "illumos",
|
||||
target_os = "solaris",
|
||||
target_os = "wasi"
|
||||
))]
|
||||
{
|
||||
// No method to read mounts on these platforms
|
||||
@@ -546,6 +547,13 @@ pub fn read_fs_list() -> UResult<Vec<MountInfo>> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Read file system list.
|
||||
#[cfg(target_os = "wasi")]
|
||||
pub fn read_fs_list() -> Vec<MountInfo> {
|
||||
// No method to read mounts on WASI
|
||||
Vec::new()
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct FsUsage {
|
||||
pub blocksize: u64,
|
||||
|
||||
Reference in New Issue
Block a user