mirror of
https://github.com/aaru-dps/fstester.git
synced 2025-12-16 19:24:39 +00:00
Add options to write to a log and be quiet.
This commit is contained in:
@@ -32,6 +32,7 @@ Copyright (C) 2011-2021 Natalia Portillo
|
||||
|
||||
#include "../include/consts.h"
|
||||
#include "../include/defs.h"
|
||||
#include "../log.h"
|
||||
#include "os2.h"
|
||||
|
||||
void MillionFiles(const char* path)
|
||||
@@ -52,7 +53,7 @@ void MillionFiles(const char* path)
|
||||
|
||||
if(rc)
|
||||
{
|
||||
printf("Cannot change to specified path, not continuing.\n");
|
||||
log_write("Cannot change to specified path, not continuing.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -60,13 +61,13 @@ void MillionFiles(const char* path)
|
||||
|
||||
if(rc)
|
||||
{
|
||||
printf("Cannot create working directory.\n");
|
||||
log_write("Cannot create working directory.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
rc = __os2_chdir("MILLION");
|
||||
|
||||
printf("Creating lots of files.\n");
|
||||
log_write("Creating lots of files.\n");
|
||||
|
||||
for(pos = 0; pos < 1000; pos++)
|
||||
{
|
||||
@@ -85,5 +86,5 @@ void MillionFiles(const char* path)
|
||||
DosClose(handle);
|
||||
}
|
||||
|
||||
printf("\tCreated %lu files\n", pos);
|
||||
log_write("\tCreated %lu files\n", pos);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user