Browse Source

AP_Filesystem: fixed open for write in ROMFS

zr-v5.1
Andrew Tridgell 5 years ago
parent
commit
a8f7212d79
  1. 4
      libraries/AP_Filesystem/AP_Filesystem_ROMFS.cpp

4
libraries/AP_Filesystem/AP_Filesystem_ROMFS.cpp

@ -25,6 +25,10 @@ @@ -25,6 +25,10 @@
int AP_Filesystem_ROMFS::open(const char *fname, int flags)
{
if ((flags & O_ACCMODE) != O_RDONLY) {
errno = EROFS;
return -1;
}
uint8_t idx;
for (idx=0; idx<max_open_file; idx++) {
if (file[idx].data == nullptr) {

Loading…
Cancel
Save