Commit a9e655f
nvme: Open files using nvme_open_rawdata to fix Windows issues
Reading files that may have raw binary data on Windows without using
the O_BINARY flag when opening can cause some bytes to be misinterpreted
or mishandled. This can lead to bad data or truncated reads.
Use nvme_open_rawdata to ensure that O_BINARY is added if supported.
Fixes firmware file reading issues found during testing on Windows,
as well as other potential issues on Windows.
Signed-off-by: Broc Going <bgoing@micron.com>1 parent 736b62c commit a9e655f
2 files changed
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
| 174 | + | |
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2196 | 2196 | | |
2197 | 2197 | | |
2198 | 2198 | | |
2199 | | - | |
| 2199 | + | |
2200 | 2200 | | |
2201 | 2201 | | |
2202 | 2202 | | |
| |||
5221 | 5221 | | |
5222 | 5222 | | |
5223 | 5223 | | |
5224 | | - | |
| 5224 | + | |
5225 | 5225 | | |
5226 | 5226 | | |
5227 | 5227 | | |
| |||
7184 | 7184 | | |
7185 | 7185 | | |
7186 | 7186 | | |
7187 | | - | |
| 7187 | + | |
7188 | 7188 | | |
7189 | 7189 | | |
7190 | 7190 | | |
| |||
7296 | 7296 | | |
7297 | 7297 | | |
7298 | 7298 | | |
7299 | | - | |
| 7299 | + | |
7300 | 7300 | | |
7301 | 7301 | | |
7302 | 7302 | | |
| |||
7433 | 7433 | | |
7434 | 7434 | | |
7435 | 7435 | | |
7436 | | - | |
| 7436 | + | |
7437 | 7437 | | |
7438 | 7438 | | |
7439 | 7439 | | |
| |||
0 commit comments