mirror of
https://github.com/aaru-dps/fstester.git
synced 2025-12-16 19:24:39 +00:00
Remove sync/async definitions. Use sync functions for MacOS.
This commit is contained in:
@@ -70,7 +70,7 @@ void FileAttributes(const char* path)
|
|||||||
hpb.ioNamePtr = str255;
|
hpb.ioNamePtr = str255;
|
||||||
hpb.ioVRefNum = 0;
|
hpb.ioVRefNum = 0;
|
||||||
hpb.ioVolIndex = -1;
|
hpb.ioVolIndex = -1;
|
||||||
rc = PBHGetVInfo((HParmBlkPtr)&hpb, 0);
|
rc = PBHGetVInfoSync((HParmBlkPtr)&hpb);
|
||||||
if(rc)
|
if(rc)
|
||||||
{
|
{
|
||||||
printf("Could not get volume information.\n");
|
printf("Could not get volume information.\n");
|
||||||
@@ -85,7 +85,7 @@ void FileAttributes(const char* path)
|
|||||||
dirPB.fileParam.ioNamePtr = (StringPtr) "\pATTRS"; // Directory name to create
|
dirPB.fileParam.ioNamePtr = (StringPtr) "\pATTRS"; // Directory name to create
|
||||||
dirPB.fileParam.ioDirID = 0; // ID of parent directory, 0 for root of volume
|
dirPB.fileParam.ioDirID = 0; // ID of parent directory, 0 for root of volume
|
||||||
|
|
||||||
rc = PBDirCreate(&dirPB, 0);
|
rc = PBDirCreateSync(&dirPB);
|
||||||
|
|
||||||
if(rc)
|
if(rc)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ void DeleteFiles(const char* path)
|
|||||||
hpb.ioNamePtr = str255;
|
hpb.ioNamePtr = str255;
|
||||||
hpb.ioVRefNum = 0;
|
hpb.ioVRefNum = 0;
|
||||||
hpb.ioVolIndex = -1;
|
hpb.ioVolIndex = -1;
|
||||||
rc = PBHGetVInfo((HParmBlkPtr)&hpb, 0);
|
rc = PBHGetVInfoSync((HParmBlkPtr)&hpb);
|
||||||
if(rc)
|
if(rc)
|
||||||
{
|
{
|
||||||
printf("Could not get volume information.\n");
|
printf("Could not get volume information.\n");
|
||||||
@@ -84,7 +84,7 @@ void DeleteFiles(const char* path)
|
|||||||
dirPB.fileParam.ioNamePtr = (StringPtr) "\pDELETED"; // Directory name to create
|
dirPB.fileParam.ioNamePtr = (StringPtr) "\pDELETED"; // Directory name to create
|
||||||
dirPB.fileParam.ioDirID = 0; // ID of parent directory, 0 for root of volume
|
dirPB.fileParam.ioDirID = 0; // ID of parent directory, 0 for root of volume
|
||||||
|
|
||||||
rc = PBDirCreate(&dirPB, 0);
|
rc = PBDirCreateSync(&dirPB);
|
||||||
|
|
||||||
if(rc)
|
if(rc)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ void DirectoryDepth(const char* path)
|
|||||||
hpb.ioNamePtr = str255;
|
hpb.ioNamePtr = str255;
|
||||||
hpb.ioVRefNum = 0;
|
hpb.ioVRefNum = 0;
|
||||||
hpb.ioVolIndex = -1;
|
hpb.ioVolIndex = -1;
|
||||||
rc = PBHGetVInfo((HParmBlkPtr)&hpb, 0);
|
rc = PBHGetVInfoSync((HParmBlkPtr)&hpb);
|
||||||
if(rc)
|
if(rc)
|
||||||
{
|
{
|
||||||
printf("Could not get volume information.\n");
|
printf("Could not get volume information.\n");
|
||||||
@@ -84,7 +84,7 @@ void DirectoryDepth(const char* path)
|
|||||||
dirPB.fileParam.ioNamePtr = (StringPtr) "\pDEPTH"; // Directory name to create
|
dirPB.fileParam.ioNamePtr = (StringPtr) "\pDEPTH"; // Directory name to create
|
||||||
dirPB.fileParam.ioDirID = 0; // ID of parent directory, 0 for root of volume
|
dirPB.fileParam.ioDirID = 0; // ID of parent directory, 0 for root of volume
|
||||||
|
|
||||||
rc = PBDirCreate(&dirPB, 0);
|
rc = PBDirCreateSync(&dirPB);
|
||||||
|
|
||||||
if(rc)
|
if(rc)
|
||||||
{
|
{
|
||||||
@@ -112,7 +112,7 @@ void DirectoryDepth(const char* path)
|
|||||||
dirPB.fileParam.ioNamePtr = str255; // Directory name to create
|
dirPB.fileParam.ioNamePtr = str255; // Directory name to create
|
||||||
dirPB.fileParam.ioDirID = dirId; // ID of parent directory, 0 for root of volume
|
dirPB.fileParam.ioDirID = dirId; // ID of parent directory, 0 for root of volume
|
||||||
|
|
||||||
rc = PBDirCreate(&dirPB, 0);
|
rc = PBDirCreateSync(&dirPB);
|
||||||
|
|
||||||
pos++;
|
pos++;
|
||||||
/* Mac OS has no limit, but it will crash because the catalog is single threaded */
|
/* Mac OS has no limit, but it will crash because the catalog is single threaded */
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ void Filenames(const char* path)
|
|||||||
hpb.ioNamePtr = str255;
|
hpb.ioNamePtr = str255;
|
||||||
hpb.ioVRefNum = 0;
|
hpb.ioVRefNum = 0;
|
||||||
hpb.ioVolIndex = -1;
|
hpb.ioVolIndex = -1;
|
||||||
rc = PBHGetVInfo((HParmBlkPtr)&hpb, 0);
|
rc = PBHGetVInfoSync((HParmBlkPtr)&hpb);
|
||||||
if(rc)
|
if(rc)
|
||||||
{
|
{
|
||||||
printf("Could not get volume information.\n");
|
printf("Could not get volume information.\n");
|
||||||
@@ -84,7 +84,7 @@ void Filenames(const char* path)
|
|||||||
dirPB.fileParam.ioNamePtr = (StringPtr) "\pFILENAME"; // Directory name to create
|
dirPB.fileParam.ioNamePtr = (StringPtr) "\pFILENAME"; // Directory name to create
|
||||||
dirPB.fileParam.ioDirID = 0; // ID of parent directory, 0 for root of volume
|
dirPB.fileParam.ioDirID = 0; // ID of parent directory, 0 for root of volume
|
||||||
|
|
||||||
rc = PBDirCreate(&dirPB, 0);
|
rc = PBDirCreateSync(&dirPB);
|
||||||
|
|
||||||
if(rc)
|
if(rc)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ void MillionFiles(const char* path)
|
|||||||
hpb.ioNamePtr = str255;
|
hpb.ioNamePtr = str255;
|
||||||
hpb.ioVRefNum = 0;
|
hpb.ioVRefNum = 0;
|
||||||
hpb.ioVolIndex = -1;
|
hpb.ioVolIndex = -1;
|
||||||
rc = PBHGetVInfo((HParmBlkPtr)&hpb, 0);
|
rc = PBHGetVInfoSync((HParmBlkPtr)&hpb);
|
||||||
if(rc)
|
if(rc)
|
||||||
{
|
{
|
||||||
printf("Could not get volume information.\n");
|
printf("Could not get volume information.\n");
|
||||||
@@ -84,7 +84,7 @@ void MillionFiles(const char* path)
|
|||||||
dirPB.fileParam.ioNamePtr = (StringPtr) "\pMILLION"; // Directory name to create
|
dirPB.fileParam.ioNamePtr = (StringPtr) "\pMILLION"; // Directory name to create
|
||||||
dirPB.fileParam.ioDirID = 0; // ID of parent directory, 0 for root of volume
|
dirPB.fileParam.ioDirID = 0; // ID of parent directory, 0 for root of volume
|
||||||
|
|
||||||
rc = PBDirCreate(&dirPB, 0);
|
rc = PBDirCreateSync(&dirPB);
|
||||||
|
|
||||||
dirId = dirPB.fileParam.ioDirID;
|
dirId = dirPB.fileParam.ioDirID;
|
||||||
|
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ void Fragmentation(const char* path, size_t clusterSize)
|
|||||||
hpb.ioNamePtr = str255;
|
hpb.ioNamePtr = str255;
|
||||||
hpb.ioVRefNum = 0;
|
hpb.ioVRefNum = 0;
|
||||||
hpb.ioVolIndex = -1;
|
hpb.ioVolIndex = -1;
|
||||||
rc = PBHGetVInfo((HParmBlkPtr)&hpb, 0);
|
rc = PBHGetVInfoSync((HParmBlkPtr)&hpb);
|
||||||
if(rc)
|
if(rc)
|
||||||
{
|
{
|
||||||
printf("Could not get volume information.\n");
|
printf("Could not get volume information.\n");
|
||||||
@@ -88,7 +88,7 @@ void Fragmentation(const char* path, size_t clusterSize)
|
|||||||
dirPB.fileParam.ioNamePtr = (StringPtr) "\pFRAGS"; // Directory name to create
|
dirPB.fileParam.ioNamePtr = (StringPtr) "\pFRAGS"; // Directory name to create
|
||||||
dirPB.fileParam.ioDirID = 0; // ID of parent directory, 0 for root of volume
|
dirPB.fileParam.ioDirID = 0; // ID of parent directory, 0 for root of volume
|
||||||
|
|
||||||
rc = PBDirCreate(&dirPB, 0);
|
rc = PBDirCreateSync(&dirPB);
|
||||||
|
|
||||||
dirId = dirPB.fileParam.ioDirID;
|
dirId = dirPB.fileParam.ioDirID;
|
||||||
|
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ void Links(const char* path)
|
|||||||
hpb.ioNamePtr = str255;
|
hpb.ioNamePtr = str255;
|
||||||
hpb.ioVRefNum = 0;
|
hpb.ioVRefNum = 0;
|
||||||
hpb.ioVolIndex = -1;
|
hpb.ioVolIndex = -1;
|
||||||
rc = PBHGetVInfo((HParmBlkPtr)&hpb, 0);
|
rc = PBHGetVInfoSync((HParmBlkPtr)&hpb);
|
||||||
if(rc)
|
if(rc)
|
||||||
{
|
{
|
||||||
printf("Could not get volume information.\n");
|
printf("Could not get volume information.\n");
|
||||||
@@ -128,7 +128,7 @@ void Links(const char* path)
|
|||||||
dirPB.fileParam.ioNamePtr = (StringPtr) "\pLINKS"; // Directory name to create
|
dirPB.fileParam.ioNamePtr = (StringPtr) "\pLINKS"; // Directory name to create
|
||||||
dirPB.fileParam.ioDirID = 0; // ID of parent directory, 0 for root of volume
|
dirPB.fileParam.ioDirID = 0; // ID of parent directory, 0 for root of volume
|
||||||
|
|
||||||
rc = PBDirCreate(&dirPB, 0);
|
rc = PBDirCreateSync(&dirPB);
|
||||||
|
|
||||||
if(rc)
|
if(rc)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,9 +11,6 @@ enum
|
|||||||
fsRtDirID = 2
|
fsRtDirID = 2
|
||||||
};
|
};
|
||||||
|
|
||||||
#define PBHGetVInfo(pb, async) ((async) ? PBHGetVInfoAsync(pb) : PBHGetVInfoSync(pb))
|
|
||||||
#define PBDirCreate(pb, async) ((async) ? PBDirCreateAsync(pb) : PBDirCreateSync(pb))
|
|
||||||
|
|
||||||
#define FOUR_CHAR_CODE(x) (x)
|
#define FOUR_CHAR_CODE(x) (x)
|
||||||
|
|
||||||
/************** PC-DOS applications and FileTypes **************/
|
/************** PC-DOS applications and FileTypes **************/
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ void ResourceFork(const char* path)
|
|||||||
hpb.ioNamePtr = str255;
|
hpb.ioNamePtr = str255;
|
||||||
hpb.ioVRefNum = 0;
|
hpb.ioVRefNum = 0;
|
||||||
hpb.ioVolIndex = -1;
|
hpb.ioVolIndex = -1;
|
||||||
rc = PBHGetVInfo((HParmBlkPtr)&hpb, 0);
|
rc = PBHGetVInfoSync((HParmBlkPtr)&hpb);
|
||||||
if(rc)
|
if(rc)
|
||||||
{
|
{
|
||||||
printf("Could not get volume information.\n");
|
printf("Could not get volume information.\n");
|
||||||
@@ -123,7 +123,7 @@ void ResourceFork(const char* path)
|
|||||||
dirPB.fileParam.ioNamePtr = (StringPtr) "\pRSRC"; // Directory name to create
|
dirPB.fileParam.ioNamePtr = (StringPtr) "\pRSRC"; // Directory name to create
|
||||||
dirPB.fileParam.ioDirID = 0; // ID of parent directory, 0 for root of volume
|
dirPB.fileParam.ioDirID = 0; // ID of parent directory, 0 for root of volume
|
||||||
|
|
||||||
rc = PBDirCreate(&dirPB, 0);
|
rc = PBDirCreateSync(&dirPB);
|
||||||
|
|
||||||
if(rc)
|
if(rc)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ void Timestamps(const char* path)
|
|||||||
hpb.ioNamePtr = str255;
|
hpb.ioNamePtr = str255;
|
||||||
hpb.ioVRefNum = 0;
|
hpb.ioVRefNum = 0;
|
||||||
hpb.ioVolIndex = -1;
|
hpb.ioVolIndex = -1;
|
||||||
rc = PBHGetVInfo((HParmBlkPtr)&hpb, 0);
|
rc = PBHGetVInfoSync((HParmBlkPtr)&hpb);
|
||||||
if(rc)
|
if(rc)
|
||||||
{
|
{
|
||||||
printf("Could not get volume information.\n");
|
printf("Could not get volume information.\n");
|
||||||
@@ -86,7 +86,7 @@ void Timestamps(const char* path)
|
|||||||
dirPB.fileParam.ioNamePtr = (StringPtr) "\pTIMES"; // Directory name to create
|
dirPB.fileParam.ioNamePtr = (StringPtr) "\pTIMES"; // Directory name to create
|
||||||
dirPB.fileParam.ioDirID = 0; // ID of parent directory, 0 for root of volume
|
dirPB.fileParam.ioDirID = 0; // ID of parent directory, 0 for root of volume
|
||||||
|
|
||||||
rc = PBDirCreate(&dirPB, 0);
|
rc = PBDirCreateSync(&dirPB);
|
||||||
|
|
||||||
if(rc)
|
if(rc)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ void GetVolumeInfo(const char* path, size_t* clusterSize)
|
|||||||
hpb.ioNamePtr = str255;
|
hpb.ioNamePtr = str255;
|
||||||
hpb.ioVRefNum = 0;
|
hpb.ioVRefNum = 0;
|
||||||
hpb.ioVolIndex = -1;
|
hpb.ioVolIndex = -1;
|
||||||
rc = PBHGetVInfo((HParmBlkPtr)&hpb, 0);
|
rc = PBHGetVInfoSync((HParmBlkPtr)&hpb);
|
||||||
if(rc)
|
if(rc)
|
||||||
{
|
{
|
||||||
printf("Could not get volume information.\n");
|
printf("Could not get volume information.\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user