mirror of
https://github.com/aaru-dps/fstester.git
synced 2025-12-16 19:24:39 +00:00
Fix calculation of drive no. in Atari ST.
This commit is contained in:
@@ -34,12 +34,12 @@ Copyright (C) 2011-2021 Natalia Portillo
|
||||
|
||||
void FileAttributes(const char* path)
|
||||
{
|
||||
char driveNo = path[0] - '@';
|
||||
char driveNo = path[0] - 'A';
|
||||
short rc, wRc, cRc;
|
||||
short handle;
|
||||
int i;
|
||||
|
||||
if(driveNo > 32) driveNo -= 32;
|
||||
if(driveNo >= 32) driveNo -= 32;
|
||||
|
||||
Dsetdrv(driveNo);
|
||||
Dsetpath("\\");
|
||||
|
||||
@@ -31,13 +31,13 @@ Copyright (C) 2011-2021 Natalia Portillo
|
||||
|
||||
void DeleteFiles(const char* path)
|
||||
{
|
||||
char driveNo = path[0] - '@';
|
||||
char driveNo = path[0] - 'A';
|
||||
unsigned int rc;
|
||||
char filename[9];
|
||||
short pos;
|
||||
int handle;
|
||||
|
||||
if(driveNo > 32) driveNo -= 32;
|
||||
if(driveNo >= 32) driveNo -= 32;
|
||||
|
||||
Dsetdrv(driveNo);
|
||||
Dsetpath("\\");
|
||||
|
||||
@@ -32,12 +32,12 @@ Copyright (C) 2011-2021 Natalia Portillo
|
||||
|
||||
void DirectoryDepth(const char* path)
|
||||
{
|
||||
char driveNo = path[0] - '@';
|
||||
char driveNo = path[0] - 'A';
|
||||
unsigned int rc;
|
||||
char filename[9];
|
||||
int pos = 2;
|
||||
|
||||
if(driveNo > 32) driveNo -= 32;
|
||||
if(driveNo >= 32) driveNo -= 32;
|
||||
|
||||
Dsetdrv(driveNo);
|
||||
Dsetpath("\\");
|
||||
|
||||
@@ -33,13 +33,13 @@ Copyright (C) 2011-2021 Natalia Portillo
|
||||
|
||||
void Filenames(const char* path)
|
||||
{
|
||||
char driveNo = path[0] - '@';
|
||||
char driveNo = path[0] - 'A';
|
||||
unsigned int rc, wRc = 0, cRc = 0;
|
||||
int handle;
|
||||
char message[300];
|
||||
int pos;
|
||||
|
||||
if(driveNo > 32) driveNo -= 32;
|
||||
if(driveNo >= 32) driveNo -= 32;
|
||||
|
||||
Dsetdrv(driveNo);
|
||||
Dsetpath("\\");
|
||||
|
||||
@@ -32,14 +32,14 @@ Copyright (C) 2011-2021 Natalia Portillo
|
||||
|
||||
void MillionFiles(const char* path)
|
||||
{
|
||||
char driveNo = path[0] - '@';
|
||||
char driveNo = path[0] - 'A';
|
||||
unsigned int rc;
|
||||
char filename[9];
|
||||
unsigned int pos;
|
||||
int handle;
|
||||
unsigned total;
|
||||
|
||||
if(driveNo > 32) driveNo -= 32;
|
||||
if(driveNo >= 32) driveNo -= 32;
|
||||
|
||||
Dsetdrv(driveNo);
|
||||
Dsetpath("\\");
|
||||
|
||||
@@ -40,12 +40,12 @@ void Fragmentation(const char* path, size_t clusterSize)
|
||||
unsigned int threeQuartersCluster = halfCluster + quarterCluster;
|
||||
unsigned int twoAndThreeQuartCluster = threeQuartersCluster + twoCluster;
|
||||
unsigned char* buffer;
|
||||
char driveNo = path[0] - '@';
|
||||
char driveNo = path[0] - 'A';
|
||||
unsigned int rc, wRc = 0, cRc = 0;
|
||||
int handle;
|
||||
long i;
|
||||
|
||||
if(driveNo > 32) driveNo -= 32;
|
||||
if(driveNo >= 32) driveNo -= 32;
|
||||
|
||||
Dsetdrv(driveNo);
|
||||
Dsetpath("\\");
|
||||
|
||||
@@ -39,7 +39,7 @@ void Links(const char* path)
|
||||
long cookie;
|
||||
int rc;
|
||||
FILE* h;
|
||||
char driveNo = path[0] - '@';
|
||||
char driveNo = path[0] - 'A';
|
||||
long savessp;
|
||||
|
||||
// Retrieve pointer to cookie jar in Supervisor mode
|
||||
@@ -57,7 +57,7 @@ void Links(const char* path)
|
||||
|
||||
if(rc == 0) return;
|
||||
|
||||
if(driveNo > 32) driveNo -= 32;
|
||||
if(driveNo >= 32) driveNo -= 32;
|
||||
|
||||
Dsetdrv(driveNo);
|
||||
Dsetpath("\\");
|
||||
|
||||
@@ -41,7 +41,7 @@ void FilePermissions(const char* path)
|
||||
long cookie;
|
||||
int rc, cRc, i;
|
||||
FILE* file;
|
||||
char driveNo = path[0] - '@';
|
||||
char driveNo = path[0] - 'A';
|
||||
long savessp;
|
||||
|
||||
// Retrieve pointer to cookie jar in Supervisor mode
|
||||
@@ -59,7 +59,7 @@ void FilePermissions(const char* path)
|
||||
|
||||
if(rc == 0) return;
|
||||
|
||||
if(driveNo > 32) driveNo -= 32;
|
||||
if(driveNo >= 32) driveNo -= 32;
|
||||
|
||||
Dsetdrv(driveNo);
|
||||
Dsetpath("\\");
|
||||
|
||||
@@ -34,14 +34,14 @@ Copyright (C) 2011-2021 Natalia Portillo
|
||||
|
||||
void Timestamps(const char* path)
|
||||
{
|
||||
char driveNo = path[0] - '@';
|
||||
char driveNo = path[0] - 'A';
|
||||
unsigned int rc, wRc = 0, cRc = 0, tRc = 0;
|
||||
int handle;
|
||||
char message[300];
|
||||
int i;
|
||||
_DOSTIME timestamp;
|
||||
|
||||
if(driveNo > 32) driveNo -= 32;
|
||||
if(driveNo >= 32) driveNo -= 32;
|
||||
|
||||
Dsetdrv(driveNo);
|
||||
Dsetpath("\\");
|
||||
|
||||
@@ -35,7 +35,7 @@ Copyright (C) 2011-2021 Natalia Portillo
|
||||
|
||||
void GetVolumeInfo(const char* path, size_t* clusterSize)
|
||||
{
|
||||
char driveNo = path[0] - '@';
|
||||
char driveNo = path[0] - 'A';
|
||||
_BPB* bpb;
|
||||
_DISKINFO diskInfo;
|
||||
unsigned int rc;
|
||||
|
||||
Reference in New Issue
Block a user