mirror of
https://github.com/sgmarz/osblog.git
synced 2024-11-23 18:06:20 +04:00
Updated file string to avoid creating strings twice in test.
This commit is contained in:
parent
5b5e5d9e2b
commit
f8fad1804f
@ -25,9 +25,10 @@ pub fn test_elf() {
|
||||
// This won't be necessary after we connect this to the VFS, but for now, we need it.
|
||||
const BDEV: usize = 8;
|
||||
let mfs = MinixFileSystem::init(BDEV);
|
||||
let desc = mfs.open(&String::from("/helloworld.elf")).ok();
|
||||
let file_to_read = String::from("/helloworld.elf");
|
||||
let desc = mfs.open(&file_to_read).ok();
|
||||
if desc.is_none() {
|
||||
println!("Error reading /helloworld.elf");
|
||||
println!("Error reading {}", file_to_read);
|
||||
return;
|
||||
}
|
||||
let ino = desc.unwrap();
|
||||
|
Loading…
Reference in New Issue
Block a user