First Commit
[librecmc/package-feed.git] / utils / hfsprogs / patches / 0006-Adjust-types-for-printing.patch
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: Adjust types for printing
4
5 Try to address the issues of a given integral type having different sizes
6 in 32 and 64-bit architectures.
7 ---
8  fsck_hfs.tproj/dfalib/SControl.c   | 2 +-
9  fsck_hfs.tproj/dfalib/hfs_endian.c | 2 +-
10  2 files changed, 2 insertions(+), 2 deletions(-)
11
12 diff --git a/fsck_hfs.tproj/dfalib/SControl.c b/fsck_hfs.tproj/dfalib/SControl.c
13 index 4ce9e16..8b03ece 100644
14 --- a/fsck_hfs.tproj/dfalib/SControl.c
15 +++ b/fsck_hfs.tproj/dfalib/SControl.c
16 @@ -776,7 +776,7 @@ static int ScavSetUp( SGlob *GPtr)
17                 pointer = (ScavStaticStructures *) AllocateClearMemory( sizeof(ScavStaticStructures) );
18                 if ( pointer == nil ) {
19                         if ( GPtr->logLevel >= kDebugLog ) {
20 -                               printf( "\t error %d - could not allocate %ld bytes of memory \n",
21 +                               printf( "\t error %d - could not allocate %i bytes of memory \n",
22                                         R_NoMem, sizeof(ScavStaticStructures) );
23                         }
24                         return( R_NoMem );
25 diff --git a/fsck_hfs.tproj/dfalib/hfs_endian.c b/fsck_hfs.tproj/dfalib/hfs_endian.c
26 index 3cc9eb4..6ca2ac1 100755
27 --- a/fsck_hfs.tproj/dfalib/hfs_endian.c
28 +++ b/fsck_hfs.tproj/dfalib/hfs_endian.c
29 @@ -563,7 +563,7 @@ hfs_swap_HFSPlusBTInternalNode (
30              /* Make sure name length is consistent with key length */
31              if (keyLength < sizeof(srcKey->parentID) + sizeof(srcKey->nodeName.length) +
32                  srcKey->nodeName.length*sizeof(srcKey->nodeName.unicode[0])) {
33 -                               if (debug) printf("hfs_swap_HFSPlusBTInternalNode: catalog record #%d keyLength=%d expected=%lu\n",
34 +                               if (debug) printf("hfs_swap_HFSPlusBTInternalNode: catalog record #%d keyLength=%d expected=%i\n",
35                                         srcDesc->numRecords-i, keyLength, sizeof(srcKey->parentID) + sizeof(srcKey->nodeName.length) +
36                      srcKey->nodeName.length*sizeof(srcKey->nodeName.unicode[0]));
37                                 WriteError(fcb->fcbVolume->vcbGPtr, E_KeyLen, fcb->fcbFileID, src->blockNum);