mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-21 16:33:24 +00:00
Fix linter errors
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
4f653acfa3
commit
73b94acf2b
@ -1,8 +1,9 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
|
use aster_time::read_monotonic_time;
|
||||||
|
|
||||||
use super::SyscallReturn;
|
use super::SyscallReturn;
|
||||||
use crate::prelude::*;
|
use crate::prelude::*;
|
||||||
use aster_time::read_monotonic_time;
|
|
||||||
|
|
||||||
#[derive(Debug, Default, Clone, Copy, Pod)]
|
#[derive(Debug, Default, Clone, Copy, Pod)]
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
@ -18,13 +19,10 @@ pub struct sysinfo {
|
|||||||
procs: u16,
|
procs: u16,
|
||||||
totalhigh: u64,
|
totalhigh: u64,
|
||||||
freehigh: u64,
|
freehigh: u64,
|
||||||
mem_unit: u32
|
mem_unit: u32,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn sys_sysinfo(
|
pub fn sys_sysinfo(sysinfo_addr: Vaddr, ctx: &Context) -> Result<SyscallReturn> {
|
||||||
sysinfo_addr: Vaddr,
|
|
||||||
ctx: &Context,
|
|
||||||
) -> Result<SyscallReturn> {
|
|
||||||
let info = sysinfo {
|
let info = sysinfo {
|
||||||
uptime: read_monotonic_time().as_secs() as i64,
|
uptime: read_monotonic_time().as_secs() as i64,
|
||||||
..Default::default() // TODO: add other system information
|
..Default::default() // TODO: add other system information
|
||||||
|
Reference in New Issue
Block a user