/*
- * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2002, 2004-2005 Apple Computer, Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
OSErr
LocateCatalogNode(const ExtendedVCB *volume, HFSCatalogNodeID folderID, const CatalogName *name,
- UInt32 hint, CatalogKey *keyPtr, CatalogRecord *dataPtr, UInt32 *newHint)
+ u_int32_t hint, CatalogKey *keyPtr, CatalogRecord *dataPtr, u_int32_t *newHint)
{
OSErr result;
CatalogName *nodeName = NULL; /* To ward off uninitialized use warnings from compiler */
//
OSErr
-LocateCatalogNodeByKey(const ExtendedVCB *volume, UInt32 hint, CatalogKey *keyPtr,
- CatalogRecord *dataPtr, UInt32 *newHint)
+LocateCatalogNodeByKey(const ExtendedVCB *volume, u_int32_t hint, CatalogKey *keyPtr,
+ CatalogRecord *dataPtr, u_int32_t *newHint)
{
OSErr result;
CatalogName *nodeName = NULL;
HFSCatalogNodeID threadParentID;
- UInt16 tempSize;
+ u_int16_t tempSize;
FSBufferDescriptor btRecord;
- BTreeIterator searchIterator = {0};
+ BTreeIterator searchIterator;
FCB *fcb;
+ bzero(&searchIterator, sizeof(searchIterator));
+
fcb = GetFileControlBlock(volume->catalogRefNum);
btRecord.bufferAddress = dataPtr;
OSErr
LocateCatalogRecord(const ExtendedVCB *volume, HFSCatalogNodeID folderID, const CatalogName *name,
- UInt32 hint, CatalogKey *keyPtr, CatalogRecord *dataPtr, UInt32 *newHint)
+ u_int32_t hint, CatalogKey *keyPtr, CatalogRecord *dataPtr, u_int32_t *newHint)
{
OSErr result;
CatalogKey tempKey; // 518 bytes
- UInt16 tempSize;
+ u_int16_t tempSize;
BuildCatalogKey(folderID, name, (volume->vcbSigWord == kHFSPlusSigWord), &tempKey);
}
OSErr
-BuildCatalogKeyUTF8(ExtendedVCB *volume, HFSCatalogNodeID parentID, const char *name, UInt32 nameLength,
- CatalogKey *key, UInt32 *textEncoding)
+BuildCatalogKeyUTF8(ExtendedVCB *volume, HFSCatalogNodeID parentID, const unsigned char *name, u_int32_t nameLength,
+ CatalogKey *key, u_int32_t *textEncoding)
{
OSErr err = 0;
if ( name == NULL)
nameLength = 0;
else if (nameLength == kUndefinedStrLen)
- nameLength = strlen(name);
+ nameLength = strlen((const char *)name);
if ( volume->vcbSigWord == kHFSPlusSigWord ) {
size_t unicodeBytes = 0;
if ( 0 /*fcb->fcbFlags & fcbModifiedMask*/ )
{
HFS_MOUNT_LOCK(volume, TRUE);
- volume->vcbFlags |= 0xFF00; // Mark the VCB dirty
+ MarkVCBDirty(volume); // Mark the VCB dirty
volume->vcbLsMod = GetTimeUTC(); // update last modified date
HFS_MOUNT_UNLOCK(volume, TRUE);
void
CopyCatalogName(const CatalogName *srcName, CatalogName *dstName, Boolean isHFSPLus)
{
- UInt32 length;
+ u_int32_t length;
if ( srcName == NULL )
{
if (isHFSPLus)
length = sizeof(UniChar) * (srcName->ustr.length + 1);
else
- length = sizeof(UInt8) + srcName->pstr[0];
+ length = sizeof(u_int8_t) + srcName->pstr[0];
if ( length > 1 )
BlockMoveData(srcName, dstName, length);