mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-18 12:16:31 +00:00
实现uname系统调用 (#614)
* 实现uname系统调用 Co-authored-by: longjin <longjin@DragonOS.org>
This commit is contained in:
@ -33,7 +33,7 @@ use crate::{
|
||||
libs::align::page_align_up,
|
||||
mm::{verify_area, MemoryManagementArch, VirtAddr},
|
||||
net::syscall::SockAddr,
|
||||
process::{fork::CloneFlags, Pid},
|
||||
process::{fork::CloneFlags, syscall::PosixOldUtsName, Pid},
|
||||
time::{
|
||||
syscall::{PosixTimeZone, PosixTimeval},
|
||||
TimeSpec,
|
||||
@ -949,7 +949,10 @@ impl Syscall {
|
||||
}
|
||||
|
||||
SYS_SCHED_YIELD => Self::sched_yield(),
|
||||
|
||||
SYS_UNAME => {
|
||||
let name = args[0] as *mut PosixOldUtsName;
|
||||
Self::uname(name)
|
||||
}
|
||||
_ => panic!("Unsupported syscall ID: {}", syscall_num),
|
||||
};
|
||||
|
||||
|
@ -53,6 +53,7 @@
|
||||
#define SYS_EXIT 60
|
||||
#define SYS_WAIT4 61
|
||||
#define SYS_KILL 62
|
||||
#define SYS_UNAME 63
|
||||
|
||||
#define SYS_FCNTL 72
|
||||
|
||||
|
Reference in New Issue
Block a user