mirror of
https://github.com/micropython/micropython.git
synced 2025-12-16 01:40:14 +01:00
extmod/modopenamp: Check that mp_vfs_open actually returned a stream.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
This commit is contained in:
committed by
Damien George
parent
4b013ec3ff
commit
0a41838bec
@@ -76,6 +76,7 @@ static int openamp_remoteproc_store_open(void *store, const char *path, const vo
|
||||
|
||||
openamp_remoteproc_filestore_t *fstore = store;
|
||||
fstore->file = mp_vfs_open(MP_ARRAY_SIZE(args), args, (mp_map_t *)&mp_const_empty_map);
|
||||
(void)mp_get_stream_raise(fstore->file, MP_STREAM_OP_READ);
|
||||
|
||||
int error = 0;
|
||||
mp_uint_t bytes = mp_stream_read_exactly(fstore->file, fstore->buf, RPROC_FILE_STORE_BUF_SIZE, &error);
|
||||
|
||||
Reference in New Issue
Block a user