Add options to write to a log and be quiet.

This commit is contained in:
2021-03-14 22:55:55 +00:00
parent f4ebb40f33
commit d65be35f01
62 changed files with 1152 additions and 885 deletions

View File

@@ -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);
}