* The multiple file creation was not correct, and could create way more files

than planned. Now, it always adds 10% to the max file/dir count unil 50% is
  reached.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30361 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2009-04-24 10:03:44 +00:00
parent 3ea61f1f22
commit bf9f608567
@@ -799,9 +799,10 @@ main(int argc, char** argv)
if (files.size() < maxFileCount)
create_file(dirs, files);
} else {
// create some more files to fill up the list
uint32 count = min_c(maxFileCount, files.size() + 10);
for (uint32 i = 0; i < count; i++) {
// create some more files to fill up the list (ie. 10%)
uint32 count
= min_c(maxFileCount, files.size() + maxFileCount / 10);
for (uint32 i = files.size(); i < count; i++) {
create_file(dirs, files);
}
}
@@ -812,9 +813,10 @@ main(int argc, char** argv)
if (dirs.size() < maxDirCount)
create_dir(dirs);
} else {
// create some more directories to fill up the list
uint32 count = min_c(maxDirCount, dirs.size() + 5);
for (uint32 i = 0; i < count; i++) {
// create some more directories to fill up the list (ie. 10%)
uint32 count
= min_c(maxDirCount, dirs.size() + maxDirCount / 10);
for (uint32 i = dirs.size(); i < count; i++) {
create_dir(dirs);
}
}