From 11a41c8c954d8b9f9c59a8090ddcd12c289726e6 Mon Sep 17 00:00:00 2001 From: gjz010 Date: Sun, 9 Jun 2019 01:09:35 +0800 Subject: [PATCH] Update vfs.rs Update vfs for the need of the new path-resolution system. 1. Add Send mark to FileSystem. (I can't tell why Send is necessary and right here, but adding the mark does not conflict with current SFS, at least now.) Note that updating version of bitvec of SFS may break Send and Sync. 2. Add SymLoop (E_LOOP) for bad path resolution. --- rcore-fs/src/vfs.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rcore-fs/src/vfs.rs b/rcore-fs/src/vfs.rs index 78c7d38..083ce7d 100644 --- a/rcore-fs/src/vfs.rs +++ b/rcore-fs/src/vfs.rs @@ -257,6 +257,7 @@ pub enum FsError { IOCTLError, NoDevice, Again, // E_AGAIN, when no data is available, never happens in fs + SymLoop, //E_LOOP } impl fmt::Display for FsError { @@ -277,7 +278,7 @@ impl std::error::Error for FsError {} pub type Result = result::Result; /// Abstract file system -pub trait FileSystem: Sync { +pub trait FileSystem: Sync+Send { /// Sync all data to the storage fn sync(&self) -> Result<()>;