Rename FileDescripter to FileDesc

This commit is contained in:
Fabing Li
2024-05-08 20:01:11 +08:00
committed by Tate, Hongliang Tian
parent 5d28f29a11
commit c2d09675b3
50 changed files with 149 additions and 205 deletions

View File

@ -2,18 +2,14 @@
use super::SyscallReturn;
use crate::{
fs::file_table::FileDescripter, log_syscall_entry, prelude::*, syscall::SYS_WRITE,
fs::file_table::FileDesc, log_syscall_entry, prelude::*, syscall::SYS_WRITE,
util::read_bytes_from_user,
};
const STDOUT: u64 = 1;
const STDERR: u64 = 2;
pub fn sys_write(
fd: FileDescripter,
user_buf_ptr: Vaddr,
user_buf_len: usize,
) -> Result<SyscallReturn> {
pub fn sys_write(fd: FileDesc, user_buf_ptr: Vaddr, user_buf_len: usize) -> Result<SyscallReturn> {
log_syscall_entry!(SYS_WRITE);
debug!(
"fd = {}, user_buf_ptr = 0x{:x}, user_buf_len = 0x{:x}",