MCPcopy Create free account
hub / github.com/LibertyOS-Development/kernel / new_dev

Function new_dev

src/init.rs:119–133  ·  view source on GitHub ↗

Create device

(pname: &str, dev: crate::fs::DevType, v: bool)

Source from the content-addressed store, hash-verified

117
118// Create device
119pub fn new_dev(pname: &str, dev: crate::fs::DevType, v: bool)
120{
121 if crate::sys::sc::info(pname).is_none()
122 {
123 if let Some(handle) = crate::fs::dev_new(pname, dev)
124 {
125 crate::sys::sc::close(handle);
126
127 if v
128 {
129 println!("[INFO] NEW DEVICE: {}", pname);
130 }
131 }
132 }
133}
134
135
136// Create directory

Callers

nothing calls this directly

Calls 3

dev_newFunction · 0.85
closeFunction · 0.85
infoFunction · 0.50

Tested by

no test coverage detected