lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

0005-Remove-Apple-specific-p-from-strings.patch (12385B)


      1 From: =?UTF-8?q?Rog=C3=A9rio=20Brito?= <rbrito@ime.usp.br>
      2 Date: Thu, 24 Oct 2013 01:11:21 -0200
      3 Subject: Remove (Apple-specific?) \p from strings
      4 
      5 Modify the way that debug messages are sent to the user, by eliminating one
      6 character of them.
      7 ---
      8  fsck_hfs.tproj/dfalib/BTreeTreeOps.c | 48 ++++++++++++++++++------------------
      9  fsck_hfs.tproj/dfalib/SBTree.c       | 14 +++++------
     10  2 files changed, 31 insertions(+), 31 deletions(-)
     11 
     12 diff --git a/fsck_hfs.tproj/dfalib/BTreeTreeOps.c b/fsck_hfs.tproj/dfalib/BTreeTreeOps.c
     13 index b812b14..37fb170 100644
     14 --- a/fsck_hfs.tproj/dfalib/BTreeTreeOps.c
     15 +++ b/fsck_hfs.tproj/dfalib/BTreeTreeOps.c
     16 @@ -223,7 +223,7 @@ OSStatus	SearchTree	(BTreeControlBlockPtr	 btreePtr,
     17          //
     18          if (curNodeNum == 0)
     19          {
     20 -//          Panic("\pSearchTree: curNodeNum is zero!");
     21 +            Panic("SearchTree: curNodeNum is zero!");
     22              err = fsBTInvalidNodeErr;
     23              goto ErrorExit;
     24          }
     25 @@ -433,7 +433,7 @@ OSStatus	InsertLevel (BTreeControlBlockPtr		 btreePtr,
     26  		M_ExitOnError (err);
     27  		
     28  		if ( DEBUG_BUILD && updateParent && newRoot )
     29 -			DebugStr("\p InsertLevel: New root from primary key, update from secondary key...");
     30 +			DebugStr("InsertLevel: New root from primary key, update from secondary key...");
     31  	}
     32  
     33  	//////////////////////// Update Parent(s) ///////////////////////////////
     34 @@ -448,7 +448,7 @@ OSStatus	InsertLevel (BTreeControlBlockPtr		 btreePtr,
     35  		
     36  		secondaryKey = nil;
     37  		
     38 -		PanicIf ( (level == btreePtr->treeDepth), "\p InsertLevel: unfinished insert!?");
     39 +		PanicIf ( (level == btreePtr->treeDepth), "InsertLevel: unfinished insert!?");
     40  
     41  		++level;
     42  
     43 @@ -456,7 +456,7 @@ OSStatus	InsertLevel (BTreeControlBlockPtr		 btreePtr,
     44  		index = treePathTable [level].index;
     45  		parentNodeNum = treePathTable [level].node;
     46  
     47 -		PanicIf ( parentNodeNum == 0, "\p InsertLevel: parent node is zero!?");
     48 +		PanicIf ( parentNodeNum == 0, "InsertLevel: parent node is zero!?");
     49  
     50  		err = GetNode (btreePtr, parentNodeNum, &parentNode);	// released as target node in next level up
     51  		M_ExitOnError (err);
     52 @@ -470,7 +470,7 @@ OSStatus	InsertLevel (BTreeControlBlockPtr		 btreePtr,
     53  		{
     54  			//„„Źdebug: check if ptr == targetNodeNum
     55  			GetRecordByIndex (btreePtr, parentNode.buffer, index, &keyPtr, &recPtr, &recSize);
     56 -			PanicIf( (*(UInt32 *) recPtr) != targetNodeNum, "\p InsertLevel: parent ptr doesn't match target node!");
     57 +			PanicIf( (*(UInt32 *) recPtr) != targetNodeNum, "InsertLevel: parent ptr doesn't match target node!");
     58  			
     59  			// need to delete and re-insert this parent key/ptr
     60  			// we delete it here and it gets re-inserted in the
     61 @@ -532,7 +532,7 @@ ErrorExit:
     62  	(void) ReleaseNode (btreePtr, targetNode);
     63  	(void) ReleaseNode (btreePtr, &siblingNode);
     64  
     65 -	Panic ("\p InsertLevel: an error occured!");
     66 +	Panic ("InsertLevel: an error occured!");
     67  
     68  	return	err;
     69  
     70 @@ -566,7 +566,7 @@ static OSErr	InsertNode	(BTreeControlBlockPtr	 btreePtr,
     71  
     72  	*rootSplit = false;
     73  	
     74 -	PanicIf ( targetNode->buffer == siblingNode->buffer, "\p InsertNode: targetNode == siblingNode, huh?");
     75 +	PanicIf ( targetNode->buffer == siblingNode->buffer, "InsertNode: targetNode == siblingNode, huh?");
     76  	
     77  	leftNodeNum = ((NodeDescPtr) targetNode->buffer)->bLink;
     78  	rightNodeNum = ((NodeDescPtr) targetNode->buffer)->fLink;
     79 @@ -606,7 +606,7 @@ static OSErr	InsertNode	(BTreeControlBlockPtr	 btreePtr,
     80  	
     81  	if ( leftNodeNum > 0 )
     82  	{
     83 -		PanicIf ( siblingNode->buffer != nil, "\p InsertNode: siblingNode already aquired!");
     84 +		PanicIf ( siblingNode->buffer != nil, "InsertNode: siblingNode already aquired!");
     85  
     86  		if ( siblingNode->buffer == nil )
     87  		{
     88 @@ -614,7 +614,7 @@ static OSErr	InsertNode	(BTreeControlBlockPtr	 btreePtr,
     89  			M_ExitOnError (err);
     90  		}
     91  
     92 -		PanicIf ( ((NodeDescPtr) siblingNode->buffer)->fLink != nodeNum, "\p InsertNode, RotateLeft: invalid sibling link!" );
     93 +		PanicIf ( ((NodeDescPtr) siblingNode->buffer)->fLink != nodeNum, "InsertNode, RotateLeft: invalid sibling link!" );
     94  
     95  		if ( !key->skipRotate )		// are rotates allowed?
     96  		{
     97 @@ -703,7 +703,7 @@ OSStatus	DeleteTree			(BTreeControlBlockPtr		 btreePtr,
     98  
     99  	targetNodeNum = treePathTable[level].node;
    100  	targetNodePtr = targetNode->buffer;
    101 -	PanicIf (targetNodePtr == nil, "\pDeleteTree: targetNode has nil buffer!");
    102 +	PanicIf (targetNodePtr == nil, "DeleteTree: targetNode has nil buffer!");
    103  
    104  	DeleteRecord (btreePtr, targetNodePtr, index);
    105  		
    106 @@ -797,7 +797,7 @@ OSStatus	DeleteTree			(BTreeControlBlockPtr		 btreePtr,
    107  			 
    108  			//„„Źdebug: check if ptr == targetNodeNum
    109  			GetRecordByIndex (btreePtr, parentNode.buffer, index, &keyPtr, &recPtr, &recSize);
    110 -			PanicIf( (*(UInt32 *) recPtr) != targetNodeNum, "\p DeleteTree: parent ptr doesn't match targetNodeNum!!");
    111 +			PanicIf( (*(UInt32 *) recPtr) != targetNodeNum, " DeleteTree: parent ptr doesn't match targetNodeNum!!");
    112  			
    113  			// need to delete and re-insert this parent key/ptr
    114  			DeleteRecord (btreePtr, parentNode.buffer, index);
    115 @@ -1018,7 +1018,7 @@ static OSStatus	RotateLeft		(BTreeControlBlockPtr		 btreePtr,
    116  										keyPtr, keyLength, recPtr, recSize);
    117  			if ( !didItFit )
    118  			{
    119 -				Panic ("\pRotateLeft: InsertKeyRecord (left) returned false!");
    120 +				Panic ("RotateLeft: InsertKeyRecord (left) returned false!");
    121  				err = fsBTBadRotateErr;
    122  				goto ErrorExit;
    123  			}
    124 @@ -1031,7 +1031,7 @@ static OSStatus	RotateLeft		(BTreeControlBlockPtr		 btreePtr,
    125  			didItFit = RotateRecordLeft (btreePtr, leftNode, rightNode);
    126  			if ( !didItFit )
    127  			{
    128 -				Panic ("\pRotateLeft: RotateRecordLeft returned false!");
    129 +				Panic ("RotateLeft: RotateRecordLeft returned false!");
    130  				err = fsBTBadRotateErr;
    131  				goto ErrorExit;
    132  			}
    133 @@ -1048,7 +1048,7 @@ static OSStatus	RotateLeft		(BTreeControlBlockPtr		 btreePtr,
    134  									keyPtr, keyLength, recPtr, recSize);
    135  		if ( !didItFit )
    136  		{
    137 -			Panic ("\pRotateLeft: InsertKeyRecord (right) returned false!");
    138 +			Panic ("RotateLeft: InsertKeyRecord (right) returned false!");
    139  			err = fsBTBadRotateErr;
    140  			goto ErrorExit;
    141  		}
    142 @@ -1117,7 +1117,7 @@ static OSStatus	SplitLeft		(BTreeControlBlockPtr		 btreePtr,
    143  	right = rightNode->buffer;
    144  	left  = leftNode->buffer;
    145  	
    146 -	PanicIf ( right->bLink != 0 && left == 0, "\p SplitLeft: left sibling missing!?" );
    147 +	PanicIf ( right->bLink != 0 && left == 0, " SplitLeft: left sibling missing!?" );
    148  	
    149  	//„„ type should be kLeafNode or kIndexNode
    150  	
    151 @@ -1240,8 +1240,8 @@ static OSStatus	AddNewRootNode	(BTreeControlBlockPtr	 btreePtr,
    152  	Boolean				didItFit;
    153  	UInt16				keyLength;	
    154  	
    155 -	PanicIf (leftNode == nil, "\pAddNewRootNode: leftNode == nil");
    156 -	PanicIf (rightNode == nil, "\pAddNewRootNode: rightNode == nil");
    157 +	PanicIf (leftNode == nil, "AddNewRootNode: leftNode == nil");
    158 +	PanicIf (rightNode == nil, "AddNewRootNode: rightNode == nil");
    159  	
    160  	
    161  	/////////////////////// Initialize New Root Node ////////////////////////////
    162 @@ -1264,7 +1264,7 @@ static OSStatus	AddNewRootNode	(BTreeControlBlockPtr	 btreePtr,
    163  	didItFit = InsertKeyRecord ( btreePtr, rootNode.buffer, 0, keyPtr, keyLength,
    164  								 (UInt8 *) &rightNode->bLink, 4 );
    165  
    166 -	PanicIf ( !didItFit, "\pAddNewRootNode:InsertKeyRecord failed for left index record");
    167 +	PanicIf ( !didItFit, "AddNewRootNode:InsertKeyRecord failed for left index record");
    168  
    169  
    170  	//////////////////// Insert Right Node Index Record /////////////////////////
    171 @@ -1275,7 +1275,7 @@ static OSStatus	AddNewRootNode	(BTreeControlBlockPtr	 btreePtr,
    172  	didItFit = InsertKeyRecord ( btreePtr, rootNode.buffer, 1, keyPtr, keyLength,
    173  								 (UInt8 *) &leftNode->fLink, 4 );
    174  
    175 -	PanicIf ( !didItFit, "\pAddNewRootNode:InsertKeyRecord failed for right index record");
    176 +	PanicIf ( !didItFit, "AddNewRootNode:InsertKeyRecord failed for right index record");
    177  
    178  
    179  #if DEBUG_TREEOPS
    180 @@ -1355,7 +1355,7 @@ static OSStatus	SplitRight		(BTreeControlBlockPtr		 btreePtr,
    181  	}
    182  	rightPtr = rightNodePtr->buffer;
    183  	
    184 -	PanicIf ( leftPtr->fLink != 0 && rightPtr == 0, "\p SplitRight: right sibling missing!?" );
    185 +	PanicIf ( leftPtr->fLink != 0 && rightPtr == 0, "SplitRight: right sibling missing!?" );
    186  	
    187  	//„„ type should be kLeafNode or kIndexNode
    188  	
    189 @@ -1557,7 +1557,7 @@ static OSStatus	RotateRight		(BTreeControlBlockPtr		 btreePtr,
    190  									keyPtr, keyLength, recPtr, recSize);
    191  		if ( !didItFit )
    192  		{
    193 -			Panic ("\pRotateRight: InsertKeyRecord (left) returned false!");
    194 +			Panic ("RotateRight: InsertKeyRecord (left) returned false!");
    195  			err = fsBTBadRotateErr;
    196  			goto ErrorExit;
    197  		}
    198 @@ -1572,7 +1572,7 @@ static OSStatus	RotateRight		(BTreeControlBlockPtr		 btreePtr,
    199  		didItFit = RotateRecordRight( btreePtr, leftNodePtr, rightNodePtr );
    200  		if ( !didItFit )
    201  		{
    202 -			Panic ("\pRotateRight: RotateRecordRight returned false!");
    203 +			Panic ("RotateRight: RotateRecordRight returned false!");
    204  			err = fsBTBadRotateErr;
    205  			goto ErrorExit;
    206  		}
    207 @@ -1583,7 +1583,7 @@ static OSStatus	RotateRight		(BTreeControlBlockPtr		 btreePtr,
    208  										keyPtr, keyLength, recPtr, recSize);
    209  			if ( !didItFit )
    210  			{
    211 -				Panic ("\pRotateRight: InsertKeyRecord (left) returned false!");
    212 +				Panic ("RotateRight: InsertKeyRecord (left) returned false!");
    213  				err = fsBTBadRotateErr;
    214  				goto ErrorExit;
    215  			}
    216 @@ -1607,7 +1607,7 @@ static OSStatus	RotateRight		(BTreeControlBlockPtr		 btreePtr,
    217  									keyPtr, keyLength, recPtr, recSize);
    218  		if ( !didItFit )
    219  		{
    220 -			Panic ("\pRotateRight: InsertKeyRecord (right) returned false!");
    221 +			Panic ("RotateRight: InsertKeyRecord (right) returned false!");
    222  			err = fsBTBadRotateErr;
    223  			goto ErrorExit;
    224  		}
    225 diff --git a/fsck_hfs.tproj/dfalib/SBTree.c b/fsck_hfs.tproj/dfalib/SBTree.c
    226 index cd81b13..eeb4e8c 100644
    227 --- a/fsck_hfs.tproj/dfalib/SBTree.c
    228 +++ b/fsck_hfs.tproj/dfalib/SBTree.c
    229 @@ -103,7 +103,7 @@ OSErr SearchBTreeRecord(SFCB *fcb, const void* key, UInt32 hint, void* foundKey,
    230  			CopyMemory(&resultIterator->key, foundKey, CalcKeySize(btcb, &resultIterator->key));	//„„ warning, this could overflow user's buffer!!!
    231  
    232  		if ( DEBUG_BUILD && !ValidHFSRecord(data, btcb, *dataSize) )
    233 -			DebugStr("\pSearchBTreeRecord: bad record?");
    234 +			DebugStr("SearchBTreeRecord: bad record?");
    235  	}
    236  
    237  ErrorExit:
    238 @@ -211,7 +211,7 @@ OSErr GetBTreeRecord(SFCB *fcb, SInt16 selectionIndex, void* key, void* data, UI
    239  		CopyMemory(&iterator->key, key, CalcKeySize(btcb, &iterator->key));	//„„ warning, this could overflow user's buffer!!!
    240  		
    241  		if ( DEBUG_BUILD && !ValidHFSRecord(data, btcb, *dataSize) )
    242 -			DebugStr("\pGetBTreeRecord: bad record?");
    243 +			DebugStr("GetBTreeRecord: bad record?");
    244  
    245  	}
    246  	
    247 @@ -243,7 +243,7 @@ OSErr InsertBTreeRecord(SFCB *fcb, const void* key, const void* data, UInt16 dat
    248  	CopyMemory(key, &iterator.key, CalcKeySize(btcb, (BTreeKey *) key));	//„„ should we range check against maxkeylen?
    249  
    250  	if ( DEBUG_BUILD && !ValidHFSRecord(data, btcb, dataSize) )
    251 -		DebugStr("\pInsertBTreeRecord: bad record?");
    252 +		DebugStr("InsertBTreeRecord: bad record?");
    253  
    254  	result = BTInsertRecord( fcb, &iterator, &btRecord, dataSize );
    255  
    256 @@ -305,7 +305,7 @@ OSErr ReplaceBTreeRecord(SFCB *fcb, const void* key, UInt32 hint, void *newData,
    257  	CopyMemory(key, &iterator.key, CalcKeySize(btcb, (BTreeKey *) key));		//„„ should we range check against maxkeylen?
    258  
    259  	if ( DEBUG_BUILD && !ValidHFSRecord(newData, btcb, dataSize) )
    260 -		DebugStr("\pReplaceBTreeRecord: bad record?");
    261 +		DebugStr("ReplaceBTreeRecord: bad record?");
    262  
    263  	result = BTReplaceRecord( fcb, &iterator, &btRecord, dataSize );
    264  
    265 @@ -344,7 +344,7 @@ SetEndOfForkProc ( SFCB *filePtr, FSSize minEOF, FSSize maxEOF )
    266  	else
    267  	{
    268  		if ( DEBUG_BUILD )
    269 -			DebugStr("\pSetEndOfForkProc: minEOF is smaller than current size!");
    270 +			DebugStr("SetEndOfForkProc: minEOF is smaller than current size!");
    271  		return -1;
    272  	}
    273  
    274 @@ -370,7 +370,7 @@ SetEndOfForkProc ( SFCB *filePtr, FSSize minEOF, FSSize maxEOF )
    275  	//	Make sure we got at least as much space as we needed
    276  	//
    277  	if (filePtr->fcbLogicalSize < minEOF) {
    278 -		Panic("\pSetEndOfForkProc: disk too full to extend B-tree file");
    279 +		Panic("SetEndOfForkProc: disk too full to extend B-tree file");
    280  		return dskFulErr;
    281  	}
    282  	
    283 @@ -442,7 +442,7 @@ static OSErr CheckBTreeKey(const BTreeKey *key, const BTreeControlBlock *btcb)
    284  	if ( (keyLen < 6) || (keyLen > btcb->maxKeyLength) )
    285  	{
    286  		if ( DEBUG_BUILD )
    287 -			DebugStr("\pCheckBTreeKey: bad key length!");
    288 +			DebugStr("CheckBTreeKey: bad key length!");
    289  		return fsBTInvalidKeyLengthErr;
    290  	}
    291