make a pipe filetype, reorder filetype enum

This commit is contained in:
Pat Hickey
2021-01-22 11:37:39 -08:00
parent 86d369c72a
commit a06c4fbe1a
4 changed files with 9 additions and 8 deletions

View File

@@ -109,7 +109,7 @@ impl<R: Read + Any> WasiFile for ReadPipe<R> {
Ok(()) // trivial
}
fn get_filetype(&self) -> Result<FileType, Error> {
Ok(FileType::CharacterDevice) // XXX wrong
Ok(FileType::Pipe)
}
fn get_fdflags(&self) -> Result<FdFlags, Error> {
Ok(FdFlags::empty())
@@ -245,7 +245,7 @@ impl<W: Write + Any> WasiFile for WritePipe<W> {
Ok(())
}
fn get_filetype(&self) -> Result<FileType, Error> {
Ok(FileType::CharacterDevice) // XXX
Ok(FileType::Pipe)
}
fn get_fdflags(&self) -> Result<FdFlags, Error> {
Ok(FdFlags::APPEND)