File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ extern crate alloc;
11
11
// Keep this line to ensure the `mem*` functions are linked in.
12
12
extern crate rlibc;
13
13
14
+ use alloc:: string:: String ;
14
15
use core:: mem;
15
16
use uefi:: prelude:: * ;
16
17
use uefi:: proto:: console:: serial:: Serial ;
@@ -25,11 +26,12 @@ fn efi_main(image: Handle, mut st: SystemTable<Boot>) -> Status {
25
26
// Initialize utilities (logging, memory allocation...)
26
27
uefi_services:: init ( & mut st) . expect_success ( "Failed to initialize utilities" ) ;
27
28
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 ( ) ;
30
33
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( ) ) ;
33
35
34
36
// Reset the console before running all the other tests.
35
37
st. stdout ( )
You can’t perform that action at this time.
0 commit comments