Commit fd819e4
committed
[do-not-upstream][semihost] open sys call doesn't handle "rb+" mode
According to the ISO/IEC_9899_1999, section:7.19.5.3 Opening file with `r+` mode just open text file for update (reading and writing) but dosen't create it. if the file isn't exist `open()` returns NULL.
So, to create and open a file to update (reading and writing), we should open with "a+" or "w+" modes.
Signed-off-by: Mostafa Salman <mostafas@synopsys.com>1 parent 1ecf5b0 commit fd819e4
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
74 | 76 | | |
75 | 77 | | |
76 | 78 | | |
| |||
0 commit comments