BAS: Conditional compile out use of ftruncate()
This commit is contained in:
parent
ba51398214
commit
36dbd756ba
@ -49,4 +49,11 @@ config INTERPRETER_BAS_USE_SELECT
|
|||||||
bool "Use select()"
|
bool "Use select()"
|
||||||
default n
|
default n
|
||||||
|
|
||||||
|
config INTERPRETER_BAS_HAVE_FTRUNCATE
|
||||||
|
bool
|
||||||
|
default n
|
||||||
|
---help--
|
||||||
|
NuttX does not currently support the ftruncate interface
|
||||||
|
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
@ -813,6 +813,7 @@ int FS_lock(int chn, off_t offset, off_t length, int mode, int w)
|
|||||||
|
|
||||||
int FS_truncate(int chn)
|
int FS_truncate(int chn)
|
||||||
{
|
{
|
||||||
|
#ifdef CONFIG_INTERPRETER_BAS_HAVE_FTRUNCATE
|
||||||
int fd;
|
int fd;
|
||||||
off_t o;
|
off_t o;
|
||||||
|
|
||||||
@ -843,6 +844,10 @@ int FS_truncate(int chn)
|
|||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
#else
|
||||||
|
FS_errmsg = strerror(ENOSYS);
|
||||||
|
return -1;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void FS_shellmode(int dev)
|
void FS_shellmode(int dev)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user