Do not print max dir number if the filesystem has no subdir limit.
Signed-off-by: Sheng Yong <[email protected]>
---
lib/tests/tst_fs_fill_subdirs.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/lib/tests/tst_fs_fill_subdirs.c b/lib/tests/tst_fs_fill_subdirs.c
index 496db59..7c956f6 100644
--- a/lib/tests/tst_fs_fill_subdirs.c
+++ b/lib/tests/tst_fs_fill_subdirs.c
@@ -33,10 +33,13 @@ static void cleanup(void)
int main(void)
{
+ int ret;
+
tst_tmpdir();
- fprintf(stderr, "Max dir elements = %i\n",
- tst_fs_fill_subdirs(NULL, "dir"));
+ ret = tst_fs_fill_subdirs(NULL, "dir");
+ if (ret != -1)
+ fprintf(stderr, "Max dir elements = %i\n", ret);
cleanup();
tst_exit();
--
1.8.3.4
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list