mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
AP_Filesystem: fixed open for write in ROMFS
This commit is contained in:
parent
e0957c2bcc
commit
a8f7212d79
@ -25,6 +25,10 @@
|
|||||||
|
|
||||||
int AP_Filesystem_ROMFS::open(const char *fname, int flags)
|
int AP_Filesystem_ROMFS::open(const char *fname, int flags)
|
||||||
{
|
{
|
||||||
|
if ((flags & O_ACCMODE) != O_RDONLY) {
|
||||||
|
errno = EROFS;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
uint8_t idx;
|
uint8_t idx;
|
||||||
for (idx=0; idx<max_open_file; idx++) {
|
for (idx=0; idx<max_open_file; idx++) {
|
||||||
if (file[idx].data == nullptr) {
|
if (file[idx].data == nullptr) {
|
||||||
|
Loading…
Reference in New Issue
Block a user