zephyr: Add file open flags to fs_open calls
With addition of open flags to fs_open calls, all invocations that do
not provide them require change.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
diff --git a/cmd/fs_mgmt/port/zephyr/src/zephyr_fs_mgmt.c b/cmd/fs_mgmt/port/zephyr/src/zephyr_fs_mgmt.c
index 66af8c4..f3eb2e4 100644
--- a/cmd/fs_mgmt/port/zephyr/src/zephyr_fs_mgmt.c
+++ b/cmd/fs_mgmt/port/zephyr/src/zephyr_fs_mgmt.c
@@ -49,9 +49,9 @@
ssize_t bytes_read;
int rc;
- rc = fs_open(&file, path);
+ rc = fs_open(&file, path, FS_O_READ);
if (rc != 0) {
- return MGMT_ERR_EUNKNOWN;
+ return MGMT_ERR_ENOENT;
}
rc = fs_seek(&file, offset, FS_SEEK_SET);
@@ -123,7 +123,7 @@
}
}
- rc = fs_open(&file, path);
+ rc = fs_open(&file, path, FS_O_CREATE | FS_O_WRITE);
if (rc != 0) {
return MGMT_ERR_EUNKNOWN;
}