MCPcopy Create free account
hub / github.com/bendudson/EuraliOS / new

Method new

init/src/main.rs:28–45  ·  view source on GitHub ↗
(vga_com: &'a CommHandle)

Source from the content-addressed store, hash-verified

26
27impl<'a> Console<'a> {
28 pub fn new(vga_com: &'a CommHandle) -> Self {
29 match rcall(
30 vga_com,
31 message::OPEN_READWRITE, 0.into(), 0.into(), None) {
32 Ok((message::COMM_HANDLE,
33 MessageData::CommHandle(handle),
34 MessageData::Value(id))) => Console {vga: vga_com,
35 writer_id: id,
36 input: None,
37 output:handle},
38 Ok(message) => {
39 panic!("[init] Received unexpected message {:?}", message);
40 }
41 Err(code) => {
42 panic!("[init] Received error {:?}", code);
43 }
44 }
45 }
46
47 /// Launch a login process on a new console
48 /// Returns the console to enable switching to/from this login/shell

Callers

nothing calls this directly

Calls 1

rcallFunction · 0.85

Tested by

no test coverage detected