kos_sys/os/
uname.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Rust for KallistiOS/Dreamcast
// Copyright (C) 2024 Eric Fradella
// https://dreamcast.rs/

use crate::prelude::*;

pub const _UTSNAME_LENGTH: usize    = 64;

#[repr(C)]
pub struct utsname {
    sysname:    [c_char; _UTSNAME_LENGTH],
    nodename:   [c_char; _UTSNAME_LENGTH],
    release:    [c_char; _UTSNAME_LENGTH],
    version:    [c_char; _UTSNAME_LENGTH],
    machine:    [c_char; _UTSNAME_LENGTH],
}

#[link(name = "kallisti")]
extern "C" {
    pub fn uname(n: *mut utsname);
}