mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-29 04:13:24 +00:00
Extract x86-specific syscall dispatch to arch/x86
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
f19dfc7873
commit
0d5131c822
@ -1,13 +1,12 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use super::{SyscallReturn, SYS_SHUTDOWN};
|
||||
use super::SyscallReturn;
|
||||
use crate::{
|
||||
fs::file_table::FileDesc, log_syscall_entry, net::socket::SockShutdownCmd, prelude::*,
|
||||
fs::file_table::FileDesc, net::socket::SockShutdownCmd, prelude::*,
|
||||
util::net::get_socket_from_fd,
|
||||
};
|
||||
|
||||
pub fn sys_shutdown(sockfd: FileDesc, how: i32) -> Result<SyscallReturn> {
|
||||
log_syscall_entry!(SYS_SHUTDOWN);
|
||||
let shutdown_cmd = SockShutdownCmd::try_from(how)?;
|
||||
debug!("sockfd = {sockfd}, cmd = {shutdown_cmd:?}");
|
||||
|
||||
|
Reference in New Issue
Block a user