mirror of
https://github.com/aaru-dps/fstester.git
synced 2025-12-16 19:24:39 +00:00
Code refactor.
This commit is contained in:
28
setter/.idea/deployment.xml
generated
Normal file
28
setter/.idea/deployment.xml
generated
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="PublishConfigData" remoteFilesAllowedToDisappearOnAutoupload="false">
|
||||
<serverData>
|
||||
<paths name="Haiku (remote) (ae2ed873-6206-45f4-adc0-01b9159fe586)">
|
||||
<serverdata>
|
||||
<mappings>
|
||||
<mapping deploy="/tmp/tmp.ykC3wFwbNa" local="$PROJECT_DIR$" />
|
||||
</mappings>
|
||||
<excludedPaths>
|
||||
<excludedPath local="true" path="$PROJECT_DIR$/cmake-build-retro68k-m68k" />
|
||||
<excludedPath local="true" path="$PROJECT_DIR$/cmake-build-debug" />
|
||||
<excludedPath local="true" path="$PROJECT_DIR$/cmake-build-macos-remote" />
|
||||
<excludedPath local="true" path="$PROJECT_DIR$/cmake-build-netbsd-remote" />
|
||||
<excludedPath local="true" path="$PROJECT_DIR$/cmake-build-freebsd-remote" />
|
||||
<excludedPath local="true" path="$PROJECT_DIR$/cmake-build-retro68k-ppc" />
|
||||
<excludedPath local="true" path="$PROJECT_DIR$/cmake-build-haiku-remote" />
|
||||
<excludedPath local="true" path="$PROJECT_DIR$/cmake-build-djgpp" />
|
||||
<excludedPath local="true" path="$PROJECT_DIR$/cmake-build-openbsd-remote" />
|
||||
<excludedPath local="true" path="$PROJECT_DIR$/cmake-build-dragonfly-bsd-remote" />
|
||||
<excludedPath local="true" path="$PROJECT_DIR$/cmake-build-mingw-x86" />
|
||||
<excludedPath local="true" path="$PROJECT_DIR$/cmake-build-mingw-x64" />
|
||||
</excludedPaths>
|
||||
</serverdata>
|
||||
</paths>
|
||||
</serverData>
|
||||
</component>
|
||||
</project>
|
||||
7
setter/.idea/other.xml
generated
7
setter/.idea/other.xml
generated
@@ -3,12 +3,7 @@
|
||||
<component name="AutoUploadManager">
|
||||
<option name="hosts">
|
||||
<list>
|
||||
<option value="6834515e-565c-4405-977e-ca79cd736f72" />
|
||||
<option value="24494d08-8126-4c70-a92a-dfedaa4edc52" />
|
||||
<option value="bf5645fe-ad70-480a-80ed-0dbee60589a4" />
|
||||
<option value="b74ed85d-448d-4c44-bb80-fd5d39945ce2" />
|
||||
<option value="bd4d21cb-219d-4aba-a987-5c3fd4707be6" />
|
||||
<option value="9f90c805-053c-4a32-806f-fe7420fe9284" />
|
||||
<option value="ae2ed873-6206-45f4-adc0-01b9159fe586" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
|
||||
@@ -112,4 +112,3 @@ static const os2_attr_tests_t os2_attrs[KNOWN_OS2_ATTRS] = {
|
||||
};
|
||||
|
||||
#endif // AARU_FSTESTER_SETTER_SRC_OS2_ATTR_H_
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ void DeleteFiles(const char* path)
|
||||
ACTION_RET actionTaken = 0;
|
||||
HFILE handle;
|
||||
|
||||
// 16 bit
|
||||
// 16 bit
|
||||
#if(defined(__I86__) || defined(__i86__) || defined(_M_I86))
|
||||
USHORT driveNo = path[0] - '@';
|
||||
#else // 32 bit
|
||||
|
||||
@@ -42,7 +42,7 @@ void DirectoryDepth(const char* path)
|
||||
char filename[9];
|
||||
int pos = 2;
|
||||
|
||||
// 16 bit
|
||||
// 16 bit
|
||||
#if(defined(__I86__) || defined(__i86__) || defined(_M_I86))
|
||||
USHORT driveNo = path[0] - '@';
|
||||
#else // 32 bit
|
||||
|
||||
@@ -44,7 +44,7 @@ void Filenames(const char* path)
|
||||
char message[300];
|
||||
int pos = 0;
|
||||
|
||||
// 16 bit
|
||||
// 16 bit
|
||||
#if(defined(__I86__) || defined(__i86__) || defined(_M_I86))
|
||||
USHORT driveNo = path[0] - '@';
|
||||
#else // 32 bit
|
||||
|
||||
@@ -44,7 +44,7 @@ void MillionFiles(const char* path)
|
||||
ACTION_RET actionTaken = 0;
|
||||
HFILE handle;
|
||||
|
||||
// 16 bit
|
||||
// 16 bit
|
||||
#if(defined(__I86__) || defined(__i86__) || defined(_M_I86))
|
||||
USHORT driveNo = path[0] - '@';
|
||||
#else // 32 bit
|
||||
|
||||
@@ -49,7 +49,7 @@ void Fragmentation(const char* path, size_t clusterSize)
|
||||
HFILE handle;
|
||||
long i;
|
||||
|
||||
// 16 bit
|
||||
// 16 bit
|
||||
#if(defined(__I86__) || defined(__i86__) || defined(_M_I86))
|
||||
USHORT driveNo = path[0] - '@';
|
||||
#else // 32 bit
|
||||
|
||||
@@ -24,5 +24,6 @@ Copyright (C) 2011-2021 Natalia Portillo
|
||||
|
||||
#include "../include/defs.h"
|
||||
|
||||
void FilePermissions(const char* path) { /* Do nothing, not supported by target operating system */ }
|
||||
|
||||
void FilePermissions(const char* path)
|
||||
{ /* Do nothing, not supported by target operating system */
|
||||
}
|
||||
|
||||
@@ -24,4 +24,6 @@ Copyright (C) 2011-2021 Natalia Portillo
|
||||
|
||||
#include "../include/defs.h"
|
||||
|
||||
void ResourceFork(const char* path) { /* Do nothing, not supported by target operating system */ }
|
||||
void ResourceFork(const char* path)
|
||||
{ /* Do nothing, not supported by target operating system */
|
||||
}
|
||||
|
||||
@@ -30,9 +30,9 @@ Copyright (C) 2011-2021 Natalia Portillo
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "../os2defs.h"
|
||||
#include "../include/consts.h"
|
||||
#include "../include/defs.h"
|
||||
#include "os2defs.h"
|
||||
|
||||
void Sparse(const char* path)
|
||||
{ /* Do nothing, not supported by target operating system */
|
||||
|
||||
@@ -45,7 +45,7 @@ void Timestamps(const char* path)
|
||||
HFILE handle;
|
||||
char message[300];
|
||||
|
||||
// 16 bit
|
||||
// 16 bit
|
||||
#if(defined(__I86__) || defined(__i86__) || defined(_M_I86))
|
||||
USHORT status_size = sizeof(FILESTATUS);
|
||||
FILESTATUS status;
|
||||
|
||||
@@ -45,7 +45,7 @@ void GetVolumeInfo(const char* path, size_t* clusterSize)
|
||||
USHORT usVolSerialHigh;
|
||||
USHORT usVolSerialLow;
|
||||
|
||||
// 16 bit
|
||||
// 16 bit
|
||||
#if(defined(__I86__) || defined(__i86__) || defined(_M_I86))
|
||||
USHORT cbData = sizeof(bData);
|
||||
USHORT driveNo = path[0] - '@';
|
||||
@@ -58,7 +58,7 @@ void GetVolumeInfo(const char* path, size_t* clusterSize)
|
||||
|
||||
*clusterSize = 0;
|
||||
|
||||
// 16 bit
|
||||
// 16 bit
|
||||
#if(defined(__I86__) || defined(__i86__) || defined(_M_I86))
|
||||
rc = DosQFSAttach((PSZ)path, 0, FSAIL_QUERYNAME, (PVOID)&bData, &cbData, 0);
|
||||
#else // 32 bit
|
||||
@@ -72,7 +72,7 @@ void GetVolumeInfo(const char* path, size_t* clusterSize)
|
||||
if(rc) log_write("Error %d requesting volume information.\n", rc);
|
||||
else
|
||||
{
|
||||
// 16 bit
|
||||
// 16 bit
|
||||
#if(defined(__I86__) || defined(__i86__) || defined(_M_I86))
|
||||
fsdName = &bData[4 + (USHORT)bData[2] + 1 + 2];
|
||||
#else // 32 bit
|
||||
@@ -83,7 +83,7 @@ void GetVolumeInfo(const char* path, size_t* clusterSize)
|
||||
|
||||
pfsAllocateBuffer = (PFSALLOCATE)malloc(sizeof(FSALLOCATE));
|
||||
|
||||
// 16 bit
|
||||
// 16 bit
|
||||
#if(defined(__I86__) || defined(__i86__) || defined(_M_I86))
|
||||
rc = DosQFSInfo(driveNo, 1, (PBYTE)pfsAllocateBuffer, sizeof(FSALLOCATE));
|
||||
#else // 32 bit
|
||||
@@ -111,7 +111,7 @@ void GetVolumeInfo(const char* path, size_t* clusterSize)
|
||||
|
||||
pfsInfo = (PFSINFO)malloc(sizeof(FSINFO));
|
||||
|
||||
// 16 bit
|
||||
// 16 bit
|
||||
#if(defined(__I86__) || defined(__i86__) || defined(_M_I86))
|
||||
rc = DosQFSInfo(driveNo, 2, (PBYTE)pfsInfo, sizeof(FSINFO));
|
||||
#else // 32 bit
|
||||
@@ -122,11 +122,9 @@ void GetVolumeInfo(const char* path, size_t* clusterSize)
|
||||
else
|
||||
{
|
||||
usVolSerialHigh = *((PUSHORT)&pfsInfo->ftimeCreation);
|
||||
usVolSerialLow = *((PUSHORT)&pfsInfo->fdateCreation);
|
||||
usVolSerialLow = *((PUSHORT)&pfsInfo->fdateCreation);
|
||||
log_write("\tVolume label: %s\n", pfsInfo->vol.szVolLabel);
|
||||
log_write("\tVolume created on %04X:%04X\n",
|
||||
usVolSerialHigh,
|
||||
usVolSerialLow);
|
||||
log_write("\tVolume created on %04X:%04X\n", usVolSerialHigh, usVolSerialLow);
|
||||
}
|
||||
|
||||
free(pfsInfo);
|
||||
|
||||
Reference in New Issue
Block a user