1
0
mirror of https://github.com/rcore-os/rCore.git synced 2024-11-22 16:16:16 +04:00

Merge pull request #14 from equation314/dev

Fix fnctl nonblock check
This commit is contained in:
Runji Wang 2019-09-23 23:33:25 +08:00 committed by GitHub
commit 73bd80b277
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -146,7 +146,7 @@ impl FileHandle {
}
pub fn fcntl(&mut self, cmd: usize, arg: usize) -> Result<()> {
if arg == 2048 && cmd == 4 {
if arg & 0x800 > 0 && cmd == 4 {
self.options.nonblock = true;
}
Ok(())

View File

@ -60,7 +60,7 @@ impl Syscall<'_> {
#[cfg(feature = "board_raspi3")]
let attr = attr.mmio(crate::arch::paging::MMIOType::NormalNonCacheable as u8);
if let Some(fb) = FRAME_BUFFER.lock().as_mut() {
if let Some(fb) = FRAME_BUFFER.lock().as_ref() {
self.vm().push(
addr,
addr + len,