mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-11 23:56:53 +00:00
merge versioning, fix bug todo
This commit is contained in:
@@ -109,4 +109,4 @@ pub fn same_disk(disk1: &str, disk2: &str) -> Result<bool> {
|
||||
let stat2 = stat(disk2)?;
|
||||
|
||||
Ok(stat1.st_dev == stat2.st_dev)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,9 +6,10 @@ mod unix;
|
||||
mod windows;
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
pub use linux::get_info;
|
||||
pub use linux::same_disk;
|
||||
pub use linux::{get_info, same_disk};
|
||||
// pub use linux::same_disk;
|
||||
|
||||
#[cfg(all(unix, not(target_os = "linux")))]
|
||||
pub use unix::get_info;
|
||||
pub use unix::{get_info, same_disk};
|
||||
#[cfg(target_os = "windows")]
|
||||
pub use windows::get_info;
|
||||
pub use windows::{get_info, same_disk};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use crate::disk::Info;
|
||||
use nix::sys::{statfs::statfs, stat::stat};
|
||||
use crate::{disk::Info, error::Result};
|
||||
use nix::sys::{stat::stat, statfs::statfs};
|
||||
use std::io::{Error, ErrorKind};
|
||||
use std::path::Path;
|
||||
|
||||
@@ -74,4 +74,4 @@ pub fn same_disk(disk1: &str, disk2: &str) -> Result<bool> {
|
||||
let stat2 = stat(disk2)?;
|
||||
|
||||
Ok(stat1.st_dev == stat2.st_dev)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use crate::disk::Info;
|
||||
use crate::{disk::Info, error::Result};
|
||||
use std::io::{Error, ErrorKind, Result};
|
||||
use std::mem;
|
||||
use std::os::windows::ffi::OsStrExt;
|
||||
@@ -133,4 +133,4 @@ fn get_fs_type(p: &[WCHAR]) -> Result<String> {
|
||||
|
||||
pub fn same_disk(disk1: &str, disk2: &str) -> Result<bool> {
|
||||
Ok(false)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user