Commit aa45491
committed
windows: Don't panic if driver not installed
Trying it out without running as admin to cause it to fail accessing the
driver.
```
> cargo run --no-default-features --features "windows" -p framework_tool -- --test
Self-Test
SMBIOS Platform: Framework13AmdAi300
Dump EC memory region
[ERROR] Failed to find Windows driver. Error { code: HRESULT(0x80070005), message: "Access is denied." }
[ERROR] Failed to communicate with EC. Reason: "Failed to initialize"
Failed to read EC memory region
FAILED!!
Error: "Fail"
error: process didn't exit successfully: `target\debug\framework_tool.exe --test` (exit code: 1)
> cargo run --no-default-features --features "windows" -p framework_tool -- --test
Self-Test
SMBIOS Platform: Framework13AmdAi300
Dump EC memory region
thread 'main' panicked at framework_lib\src\chromium_ec\windows.rs:46:14:
called `Result::unwrap()` on an `Err` value: Error { code: HRESULT(0x80070005), message: "Access is denied." }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: process didn't exit successfully: `target\debug\framework_tool.exe --test` (exit code: 101)
```
Signed-off-by: Daniel Schaefer <dhs@frame.work>1 parent 70d6649 commit aa45491
2 files changed
+28
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
49 | 56 | | |
50 | 57 | | |
51 | 58 | | |
52 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
53 | 62 | | |
54 | 63 | | |
55 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1111 | 1111 | | |
1112 | 1112 | | |
1113 | 1113 | | |
1114 | | - | |
| 1114 | + | |
| 1115 | + | |
1115 | 1116 | | |
1116 | 1117 | | |
1117 | 1118 | | |
| |||
0 commit comments