Initial commit
This commit is contained in:
commit
feac63c100
5
.cargo/config.toml
Normal file
5
.cargo/config.toml
Normal file
@ -0,0 +1,5 @@
|
||||
[build]
|
||||
target = "x86_64-unknown-mikros"
|
||||
|
||||
[install]
|
||||
root = "../os_build/sysroot"
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/target
|
7
Cargo.lock
generated
Normal file
7
Cargo.lock
generated
Normal file
@ -0,0 +1,7 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "pts_tester"
|
||||
version = "0.1.0"
|
6
Cargo.toml
Normal file
6
Cargo.toml
Normal file
@ -0,0 +1,6 @@
|
||||
[package]
|
||||
name = "pts_tester"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
2
rust-toolchain.toml
Normal file
2
rust-toolchain.toml
Normal file
@ -0,0 +1,2 @@
|
||||
[toolchain]
|
||||
channel = "dev-x86_64-unknown-mikros"
|
12
src/main.rs
Normal file
12
src/main.rs
Normal file
@ -0,0 +1,12 @@
|
||||
use std::{fs::File, io::{BufRead, BufReader}};
|
||||
use std::io::Write;
|
||||
|
||||
fn main() {
|
||||
let pts_read = File::open("/dev/pts0").unwrap();
|
||||
let mut pts_write = File::open("/dev/pts0").unwrap();
|
||||
|
||||
for line in BufReader::new(pts_read).lines() {
|
||||
let line = line.unwrap();
|
||||
writeln!(pts_write, "Got line on PTS: {:?}", line).unwrap();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user