Skip to content

Commit 4dea635

Browse files
committed
Adjustments after code review
1 parent d7e98b4 commit 4dea635

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

uefi-test-runner/src/main.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ extern crate alloc;
1111
// Keep this line to ensure the `mem*` functions are linked in.
1212
extern crate rlibc;
1313

14+
use alloc::string::String;
1415
use core::mem;
1516
use uefi::prelude::*;
1617
use uefi::proto::console::serial::Serial;
@@ -25,11 +26,12 @@ fn efi_main(image: Handle, mut st: SystemTable<Boot>) -> Status {
2526
// Initialize utilities (logging, memory allocation...)
2627
uefi_services::init(&mut st).expect_success("Failed to initialize utilities");
2728

28-
/* unit tests here */
29-
/*let mut buf = String::new();
29+
// unit tests here
30+
31+
// output firmware-vendor (CStr16 to Rust string)
32+
let mut buf = String::new();
3033
st.firmware_vendor().as_str_in_buf(&mut buf).unwrap();
31-
st.stdout().write_str(buf.as_str()).unwrap();
32-
assert_eq!("EDK II", buf.as_str());*/
34+
info!("Firmware Vendor: {}", buf.as_str());
3335

3436
// Reset the console before running all the other tests.
3537
st.stdout()

0 commit comments

Comments
 (0)