Commit 5a45784
committed
uefi: Fix crash when pressing 'q' during -b pagination
The uefi crate's println! macro calls .expect() on write results. When
the user presses 'q' during -b page break mode, the UEFI shell's
ConsoleLogger disables output and returns EFI_DEVICE_ERROR for all
subsequent writes. This causes the .expect() to panic, resulting in a
page fault crash.
Replace the uefi crate's print!/println! macros with non-panicking
versions that silently ignore write errors, allowing the application to
exit cleanly after the user breaks out of pagination.
Signed-off-by: Daniel Schaefer <dhs@frame.work>1 parent cf3e60a commit 5a45784
2 files changed
+28
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
14 | 27 | | |
15 | 28 | | |
16 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | 34 | | |
36 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
37 | 51 | | |
38 | 52 | | |
39 | 53 | | |
| |||
0 commit comments