summaryrefslogtreecommitdiffstats
path: root/system/hfsprogs/patches/0006-Adjust-types-for-printing.patch
diff options
context:
space:
mode:
Diffstat (limited to 'system/hfsprogs/patches/0006-Adjust-types-for-printing.patch')
-rw-r--r--system/hfsprogs/patches/0006-Adjust-types-for-printing.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/system/hfsprogs/patches/0006-Adjust-types-for-printing.patch b/system/hfsprogs/patches/0006-Adjust-types-for-printing.patch
new file mode 100644
index 0000000000..09efbb6ef7
--- /dev/null
+++ b/system/hfsprogs/patches/0006-Adjust-types-for-printing.patch
@@ -0,0 +1,37 @@
+From: =?UTF-8?q?Rog=C3=A9rio=20Brito?= <rbrito@ime.usp.br>
+Date: Thu, 24 Oct 2013 01:11:21 -0200
+Subject: Adjust types for printing
+
+Try to address the issues of a given integral type having different sizes
+in 32 and 64-bit architectures.
+---
+ fsck_hfs.tproj/dfalib/SControl.c | 2 +-
+ fsck_hfs.tproj/dfalib/hfs_endian.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/fsck_hfs.tproj/dfalib/SControl.c b/fsck_hfs.tproj/dfalib/SControl.c
+index 4ce9e16..8b03ece 100644
+--- a/fsck_hfs.tproj/dfalib/SControl.c
++++ b/fsck_hfs.tproj/dfalib/SControl.c
+@@ -776,7 +776,7 @@ static int ScavSetUp( SGlob *GPtr)
+ pointer = (ScavStaticStructures *) AllocateClearMemory( sizeof(ScavStaticStructures) );
+ if ( pointer == nil ) {
+ if ( GPtr->logLevel >= kDebugLog ) {
+- printf( "\t error %d - could not allocate %ld bytes of memory \n",
++ printf( "\t error %d - could not allocate %i bytes of memory \n",
+ R_NoMem, sizeof(ScavStaticStructures) );
+ }
+ return( R_NoMem );
+diff --git a/fsck_hfs.tproj/dfalib/hfs_endian.c b/fsck_hfs.tproj/dfalib/hfs_endian.c
+index 3cc9eb4..6ca2ac1 100755
+--- a/fsck_hfs.tproj/dfalib/hfs_endian.c
++++ b/fsck_hfs.tproj/dfalib/hfs_endian.c
+@@ -563,7 +563,7 @@ hfs_swap_HFSPlusBTInternalNode (
+ /* Make sure name length is consistent with key length */
+ if (keyLength < sizeof(srcKey->parentID) + sizeof(srcKey->nodeName.length) +
+ srcKey->nodeName.length*sizeof(srcKey->nodeName.unicode[0])) {
+- if (debug) printf("hfs_swap_HFSPlusBTInternalNode: catalog record #%d keyLength=%d expected=%lu\n",
++ if (debug) printf("hfs_swap_HFSPlusBTInternalNode: catalog record #%d keyLength=%d expected=%i\n",
+ srcDesc->numRecords-i, keyLength, sizeof(srcKey->parentID) + sizeof(srcKey->nodeName.length) +
+ srcKey->nodeName.length*sizeof(srcKey->nodeName.unicode[0]));
+ WriteError(fcb->fcbVolume->vcbGPtr, E_KeyLen, fcb->fcbFileID, src->blockNum);