Skip to content

Commit aa0c461

Browse files
fcntl: stub F_SETLKW and F_SETLK
Signed-off-by: Andy-Python-Programmer <[email protected]>
1 parent 0af18b5 commit aa0c461

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/aero_kernel/src/fs/cache.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ impl<K: CacheKey, V: Cacheable<K>> Cache<K, V> {
294294
let mut index = self.index.lock();
295295
let key = item.cache_key();
296296

297-
assert!(index.used.remove(&key).is_some());
297+
index.used.remove(&key);
298298
index.unused.put(key, item.0.clone());
299299
}
300300
}

src/aero_kernel/src/syscall/fs.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,11 @@ pub fn fcntl(fd: usize, command: usize, arg: usize) -> Result<usize, SyscallErro
407407
Ok(0)
408408
}
409409

410+
aero_syscall::prelude::F_SETLKW | aero_syscall::prelude::F_SETLK => {
411+
log::warn!("fcntl: F_SETLKW,F_SETLK are a stub!");
412+
Ok(0)
413+
}
414+
410415
_ => unimplemented!("fcntl: unknown command {command}"),
411416
}
412417
}

0 commit comments

Comments
 (0)