diff options
Diffstat (limited to 'apps/interpreters')
-rw-r--r-- | apps/interpreters/bas/Kconfig | 7 | ||||
-rw-r--r-- | apps/interpreters/bas/fs.c | 5 |
2 files changed, 12 insertions, 0 deletions
diff --git a/apps/interpreters/bas/Kconfig b/apps/interpreters/bas/Kconfig index b19e44d73..ae027d63c 100644 --- a/apps/interpreters/bas/Kconfig +++ b/apps/interpreters/bas/Kconfig @@ -49,4 +49,11 @@ config INTERPRETER_BAS_USE_SELECT bool "Use select()" default n +config INTERPRETER_BAS_HAVE_FTRUNCATE + bool + default n + ---help-- + NuttX does not currently support the ftruncate interface + + endif diff --git a/apps/interpreters/bas/fs.c b/apps/interpreters/bas/fs.c index b34aa1a90..790774543 100644 --- a/apps/interpreters/bas/fs.c +++ b/apps/interpreters/bas/fs.c @@ -813,6 +813,7 @@ int FS_lock(int chn, off_t offset, off_t length, int mode, int w) int FS_truncate(int chn) { +#ifdef CONFIG_INTERPRETER_BAS_HAVE_FTRUNCATE int fd; off_t o; @@ -843,6 +844,10 @@ int FS_truncate(int chn) } return 0; +#else + FS_errmsg = strerror(ENOSYS); + return -1; +#endif } void FS_shellmode(int dev) |