mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-10-07 06:05:10 +00:00
testing/fstest: Add O_TRUNC flag in fstest_wrfile
MIRTOS-177 to avoid the interference from the lasting run Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
ce2b9519a7
commit
a91e10f8e4
1 changed files with 1 additions and 1 deletions
|
|
@ -411,7 +411,7 @@ static inline int fstest_wrfile(FAR struct fstest_filedesc_s *file)
|
|||
fstest_randname(file);
|
||||
fstest_randfile(file);
|
||||
|
||||
fd = open(file->name, O_WRONLY | O_CREAT | O_EXCL, 0666);
|
||||
fd = open(file->name, O_WRONLY | O_CREAT | O_EXCL | O_TRUNC, 0666);
|
||||
if (fd < 0)
|
||||
{
|
||||
/* If it failed because there is no space on the device, then don't
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue