| ... | ... | @@ -830,10 +830,15 @@ pub fn default_panic(msg: []const u8, error_return_trace: ?*StackTrace, ret_addr |
| 830 | 830 | const exit_data = ExitData.create_exit_data(msg, &exit_size) catch null; |
| 831 | 831 | |
| 832 | 832 | if (exit_data) |data| { |
| 833 | | if (uefi.system_table.std_err) |out| { |
| 834 | | _ = out.setAttribute(uefi.protocol.SimpleTextOutput.red); |
| 835 | | _ = out.outputString(data); |
| 836 | | _ = out.setAttribute(uefi.protocol.SimpleTextOutput.white); |
| 833 | // Output to both std_err and con_out, as std_err is easier |
| 834 | // to read in stuff like QEMU at times, but, unlike con_out, |
| 835 | // isn't visible on actual hardware if directly booted into |
| 836 | inline for ([_]?*uefi.protocol.SimpleTextOutput{ uefi.system_table.std_err, uefi.system_table.con_out }) |o| { |
| 837 | if (o) |out| { |
| 838 | _ = out.setAttribute(uefi.protocol.SimpleTextOutput.red); |
| 839 | _ = out.outputString(data); |
| 840 | _ = out.setAttribute(uefi.protocol.SimpleTextOutput.white); |
| 841 | } |
| 837 | 842 | } |
| 838 | 843 | } |
| 839 | 844 | |