From 64d399fe664927f14853c22943a4bdeb34095f99 Mon Sep 17 00:00:00 2001 From: Jiajie Chen Date: Wed, 17 Apr 2019 08:13:43 +0800 Subject: [PATCH] Use usize for io_control data --- rcore-fs-sefs/src/lib.rs | 2 +- rcore-fs-sfs/src/lib.rs | 2 +- rcore-fs/src/vfs.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rcore-fs-sefs/src/lib.rs b/rcore-fs-sefs/src/lib.rs index 4f03118..604d7d2 100644 --- a/rcore-fs-sefs/src/lib.rs +++ b/rcore-fs-sefs/src/lib.rs @@ -411,7 +411,7 @@ impl vfs::INode for INodeImpl { let entry = self.file.read_direntry(id)?; Ok(String::from(entry.name.as_ref())) } - fn io_control(&self, _cmd: u32, _data: u32) -> vfs::Result<()> { + fn io_control(&self, _cmd: u32, _data: usize) -> vfs::Result<()> { Err(FsError::NotSupported) } fn fs(&self) -> Arc { diff --git a/rcore-fs-sfs/src/lib.rs b/rcore-fs-sfs/src/lib.rs index 3c6f3c5..ea7135c 100644 --- a/rcore-fs-sfs/src/lib.rs +++ b/rcore-fs-sfs/src/lib.rs @@ -642,7 +642,7 @@ impl vfs::INode for INodeImpl { .unwrap(); Ok(String::from(entry.name.as_ref())) } - fn io_control(&self, _cmd: u32, _data: u32) -> vfs::Result<()> { + fn io_control(&self, _cmd: u32, _data: usize) -> vfs::Result<()> { Err(FsError::NotSupported) } fn fs(&self) -> Arc { diff --git a/rcore-fs/src/vfs.rs b/rcore-fs/src/vfs.rs index 97dbad9..9f4b4cd 100644 --- a/rcore-fs/src/vfs.rs +++ b/rcore-fs/src/vfs.rs @@ -50,7 +50,7 @@ pub trait INode: Any + Sync + Send { fn get_entry(&self, id: usize) -> Result; /// Control device - fn io_control(&self, cmd: u32, data: u32) -> Result<()>; + fn io_control(&self, cmd: u32, data: usize) -> Result<()>; /// Get the file system of the INode fn fs(&self) -> Arc;