summaryrefslogtreecommitdiffstats
path: root/bins/hello
diff options
context:
space:
mode:
Diffstat (limited to 'bins/hello')
-rw-r--r--bins/hello/src/main.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/bins/hello/src/main.rs b/bins/hello/src/main.rs
index d1d58df..2904351 100644
--- a/bins/hello/src/main.rs
+++ b/bins/hello/src/main.rs
@@ -19,15 +19,15 @@ fn panic(_info: &core::panic::PanicInfo) -> ! {
19/// (exports table, argc, argv). The conventional UEFI name is kept so 19/// (exports table, argc, argv). The conventional UEFI name is kept so
20/// the PE looks normal; the signature is the rs-dos ABI. 20/// the PE looks normal; the signature is the rs-dos ABI.
21#[unsafe(no_mangle)] 21#[unsafe(no_mangle)]
22pub extern "C" fn efi_main(exports: &'static Exports, _argc: usize, _argv: *const rsapi::Arg) -> i32 { 22pub extern "C" fn efi_main(
23 exports: &'static Exports,
24 _argc: usize,
25 _argv: *const rsapi::Arg,
26) -> i32 {
23 let msg = b"hello, world - from an external binary"; 27 let msg = b"hello, world - from an external binary";
24 let line = rsapi::Line { 28 let line = rsapi::Line {
25 ptr: msg.as_ptr(), 29 ptr: msg.as_ptr(),
26 len: msg.len(), 30 len: msg.len(),
27 }; 31 };
28 if (exports.put_line)(line) { 32 if (exports.put_line)(line) { 0 } else { 1 }
29 0
30 } else {
31 1
32 }
33} 33}