You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gu...@apache.org on 2021/11/27 13:11:14 UTC
[incubator-nuttx-apps] 04/06: testing/fstest: Remove g_media_full since it isn't really used
This is an automated email from the ASF dual-hosted git repository.
gustavonihei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
commit 121a6e58ffa3605a79b2b37b5929eaeb98fc1f75
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Tue Nov 9 02:17:09 2021 +0800
testing/fstest: Remove g_media_full since it isn't really used
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
testing/fstest/fstest_main.c | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/testing/fstest/fstest_main.c b/testing/fstest/fstest_main.c
index 94ad7db..e0b2b0e 100644
--- a/testing/fstest/fstest_main.c
+++ b/testing/fstest/fstest_main.c
@@ -106,7 +106,6 @@ static char g_mountdir[CONFIG_TESTING_FSTEST_MAXNAME] =
static int g_nfiles;
static int g_ndeleted;
static int g_nfailed;
-static bool g_media_full;
static struct mallinfo g_mmbefore;
static struct mallinfo g_mmprevious;
@@ -452,11 +451,7 @@ static inline int fstest_wrfile(FAR struct fstest_filedesc_s *file)
{
continue;
}
- else if (errcode == ENOSPC)
- {
- g_media_full = true;
- }
- else
+ else if (errcode != ENOSPC)
{
printf("ERROR: Failed to write file: %d\n", errcode);
printf(" File name: %s\n", file->name);
@@ -513,8 +508,6 @@ static int fstest_fillfs(void)
/* Create a file for each unused file structure */
- g_media_full = false;
-
for (i = 0; i < CONFIG_TESTING_FSTEST_MAXOPEN; i++)
{
file = &g_files[i];
@@ -533,11 +526,6 @@ static int fstest_fillfs(void)
printf(" Created file %s\n", file->name);
#endif
g_nfiles++;
-
- if (g_media_full)
- {
- break;
- }
}
}