2018-01-11 17:53:37 +00:00
|
|
|
/****************************************************************************
|
|
|
|
|
The Disc Image Chef
|
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
Filename : main.c
|
|
|
|
|
Author(s) : Natalia Portillo
|
|
|
|
|
|
|
|
|
|
Component : fstester.setter
|
|
|
|
|
|
|
|
|
|
--[ Description ] -----------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
Contains global definitions
|
|
|
|
|
|
|
|
|
|
--[ License ] ---------------------------------------------------------------
|
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
|
it under the terms of the GNU General Public License as
|
|
|
|
|
published by the Free Software Foundation, either version 3 of the
|
|
|
|
|
License, or (at your option) any later version.
|
|
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warraty of
|
|
|
|
|
MERCHANTIBILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
Copyright (C) 2011-2018 Natalia Portillo
|
|
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
|
|
#include "main.h"
|
|
|
|
|
#include "defs.h"
|
|
|
|
|
|
2018-02-18 06:48:49 +00:00
|
|
|
#if defined(macintosh)
|
|
|
|
|
#include <console.h>
|
|
|
|
|
#include <SIOUX.h>
|
|
|
|
|
#endif
|
|
|
|
|
|
2018-01-11 17:53:37 +00:00
|
|
|
int main(int argc, char **argv)
|
|
|
|
|
{
|
|
|
|
|
size_t clusterSize = 0;
|
|
|
|
|
|
2018-02-18 06:48:49 +00:00
|
|
|
#if defined(macintosh)
|
|
|
|
|
argc = ccommand(&argv);
|
|
|
|
|
#endif
|
|
|
|
|
|
2018-01-11 17:53:37 +00:00
|
|
|
printf("The Disc Image Chef Filesystem Tester (Setter) %s\n", DIC_FSTESTER_VERSION);
|
|
|
|
|
printf("%s\n", DIC_COPYRIGHT);
|
|
|
|
|
|
|
|
|
|
printf("Running in %s (%s)\n", OS_NAME, OS_ARCH);
|
|
|
|
|
printf("\n");
|
|
|
|
|
|
|
|
|
|
if(argc != 2)
|
|
|
|
|
{
|
2018-01-11 17:54:17 +00:00
|
|
|
printf("Usage %s <path>\n", argv[0]);
|
|
|
|
|
return -1;
|
2018-01-11 17:53:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
GetOsInfo();
|
|
|
|
|
GetVolumeInfo(argv[1], &clusterSize);
|
|
|
|
|
FileAttributes(argv[1]);
|
|
|
|
|
FilePermissions(argv[1]);
|
|
|
|
|
ExtendedAttributes(argv[1]);
|
|
|
|
|
ResourceFork(argv[1]);
|
|
|
|
|
Filenames(argv[1]);
|
|
|
|
|
Timestamps(argv[1]);
|
2018-01-15 21:15:51 +00:00
|
|
|
Links(argv[1]);
|
2018-01-11 17:53:37 +00:00
|
|
|
DirectoryDepth(argv[1]);
|
|
|
|
|
Fragmentation(argv[1], clusterSize);
|
|
|
|
|
Sparse(argv[1]);
|
|
|
|
|
MillionFiles(argv[1]);
|
|
|
|
|
DeleteFiles(argv[1]);
|
|
|
|
|
GetVolumeInfo(argv[1], &clusterSize);
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|