Cleans library directory
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
#![allow(unused)]
|
||||
#![feature(panic_internals, core_intrinsics)]
|
||||
|
||||
use io::{Read, Write};
|
||||
use std::io::{Stdin, stdin};
|
||||
use io::{Read as Readio, Write};
|
||||
use shared::syscall;
|
||||
use std::io::{Read, Stdin, stdin};
|
||||
|
||||
fn main() {
|
||||
let mut input = String::new();
|
||||
@@ -13,10 +14,15 @@ fn main() {
|
||||
// syscall::sleep(Duration::from_secs_f64(2.0));
|
||||
syscall::close(0);
|
||||
let mut tty = syscall::open("/dev/tty0");
|
||||
syscall::close(1);
|
||||
let _ = syscall::open("/dev/tty0");
|
||||
println!("test from test_pic");
|
||||
tty.write(input.as_bytes()).unwrap();
|
||||
syscall::spawn("/usr/bin/shell");
|
||||
core::panicking::panic("explicit panic");
|
||||
loop {
|
||||
let mut test = [0; 2];
|
||||
// let len = stdin().read(&mut test);
|
||||
let len = tty.read(&mut test).unwrap();
|
||||
tty.write(str::from_utf8(&test[..len as usize]).unwrap().as_bytes())
|
||||
.unwrap();
|
||||
|
||||
Reference in New Issue
Block a user