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 DirectoryDepth(const char* path)
|
||||
@@ -50,7 +51,7 @@ void DirectoryDepth(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;
|
||||
}
|
||||
|
||||
@@ -58,13 +59,13 @@ void DirectoryDepth(const char* path)
|
||||
|
||||
if(rc)
|
||||
{
|
||||
printf("Cannot create working directory.\n");
|
||||
log_write("Cannot create working directory.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
rc = __os2_chdir("DEPTH");
|
||||
|
||||
printf("Creating deepest directory tree.\n");
|
||||
log_write("Creating deepest directory tree.\n");
|
||||
|
||||
while(!rc)
|
||||
{
|
||||
@@ -77,5 +78,5 @@ void DirectoryDepth(const char* path)
|
||||
pos++;
|
||||
}
|
||||
|
||||
printf("\tCreated %d levels of directory hierarchy\n", pos);
|
||||
log_write("\tCreated %d levels of directory hierarchy\n", pos);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user