From 53ff89597f3f1909261a36a9b398b18d35da3c72 Mon Sep 17 00:00:00 2001 From: Apple Date: Tue, 26 Jul 2005 04:59:08 +0000 Subject: [PATCH] hfs-157.tar.gz --- Makefile | 2 +- Makefile.preamble | 2 +- hfs_util/Info.plist | 2 +- hfs_util/hfsutil_jnl.c | 9 --------- hfs_util/hfsutil_main.c | 12 ++++++------ 5 files changed, 9 insertions(+), 18 deletions(-) diff --git a/Makefile b/Makefile index b20ae9f..f4a89c6 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ DEBUG_LIBS = $(LIBS) PROF_LIBS = $(LIBS) -NEXTSTEP_PB_CFLAGS = -Wno-four-char-constants +NEXTSTEP_PB_CFLAGS = -Wno-four-char-constants -Wall -Werror NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc diff --git a/Makefile.preamble b/Makefile.preamble index c0dd6ee..6f6f22e 100644 --- a/Makefile.preamble +++ b/Makefile.preamble @@ -40,7 +40,7 @@ # OTHER_YFLAGS, LOCAL_YFLAGS: additional flags passed to yacc # OTHER_LFLAGS, LOCAL_LFLAGS: additional flags passed to lex -OTHER_CFLAGS = -Wno-precomp +OTHER_CFLAGS = # These variables provide hooks enabling you to add behavior at almost every # stage of the make: diff --git a/hfs_util/Info.plist b/hfs_util/Info.plist index cdbc0da..8c053d1 100644 --- a/hfs_util/Info.plist +++ b/hfs_util/Info.plist @@ -13,7 +13,7 @@ CFBundlePackageType fs CFBundleShortVersionString - 1.4 + 1.4.1 CFBundleSignature ???? CFBundleVersion diff --git a/hfs_util/hfsutil_jnl.c b/hfs_util/hfsutil_jnl.c index 2a619e8..b87b275 100644 --- a/hfs_util/hfsutil_jnl.c +++ b/hfs_util/hfsutil_jnl.c @@ -259,15 +259,6 @@ get_embedded_offset(char *devname) blkcnt = st.st_size / blksize; } - /* - * There are only 31 bits worth of block count in - * the buffer cache. So for large volumes a 4K - * physical block size is needed. - */ - if (blksize == 512 && blkcnt > (u_int64_t)0x000000007fffffff) { - blksize = 4096; - } - /* * At this point: * blksize has our prefered physical block size diff --git a/hfs_util/hfsutil_main.c b/hfs_util/hfsutil_main.c index 3d899f8..ff56507 100644 --- a/hfs_util/hfsutil_main.c +++ b/hfs_util/hfsutil_main.c @@ -193,7 +193,7 @@ static int SetVolumeUUIDRaw(const char *deviceNamePtr, VolumeUUID *volumeUUIDPtr static int SetVolumeUUIDAttr(const char *path, VolumeUUID *volumeUUIDPtr); static int SetVolumeUUID(const char *deviceNamePtr, VolumeUUID *volumeUUIDPtr); static int GetEmbeddedHFSPlusVol(HFSMasterDirectoryBlock * hfsMasterDirectoryBlockPtr, off_t * startOffsetPtr); -static int GetNameFromHFSPlusVolumeStartingAt(int fd, off_t hfsPlusVolumeOffset, char * name_o); +static int GetNameFromHFSPlusVolumeStartingAt(int fd, off_t hfsPlusVolumeOffset, unsigned char * name_o); static int GetBTreeNodeInfo(int fd, off_t hfsPlusVolumeOffset, u_int32_t blockSize, u_int32_t extentCount, const HFSPlusExtentDescriptor *extentList, u_int32_t *nodeSize, u_int32_t *firstLeafNode); @@ -683,7 +683,7 @@ DoProbe(char *deviceNamePtr) /* Some poorly mastered HFS CDs have an empty MDB name field! */ if (mdbPtr->drVN[0] == '\0') { - strcpy(&mdbPtr->drVN[1], gHFS_FS_NAME_NAME); + strcpy((char *)&mdbPtr->drVN[1], gHFS_FS_NAME_NAME); mdbPtr->drVN[0] = strlen(gHFS_FS_NAME_NAME); } @@ -744,7 +744,7 @@ DoProbe(char *deviceNamePtr) } if (FSUR_IO_SUCCESS == result) { - char *s; + unsigned char *s; /* Change slashes to colons in the volume name */ for (s=volnameUTF8; *s; ++s) { @@ -753,7 +753,7 @@ DoProbe(char *deviceNamePtr) } /* Print the volume name to standard output */ - write(1, volnameUTF8, strlen(volnameUTF8)); + write(1, volnameUTF8, strlen((char *)volnameUTF8)); result = FSUR_RECOGNIZED; } @@ -1631,7 +1631,7 @@ Return: */ static int -GetNameFromHFSPlusVolumeStartingAt(int fd, off_t hfsPlusVolumeOffset, char * name_o) +GetNameFromHFSPlusVolumeStartingAt(int fd, off_t hfsPlusVolumeOffset, unsigned char * name_o) { int result = FSUR_IO_SUCCESS; u_int32_t blockSize; @@ -1768,7 +1768,7 @@ GetNameFromHFSPlusVolumeStartingAt(int fd, off_t hfsPlusVolumeOffset, char * nam } swapped->unicode[i] = 0; cfstr = CFStringCreateWithCharacters(kCFAllocatorDefault, swapped->unicode, swapped->length); - (void) CFStringGetCString(cfstr, name_o, NAME_MAX, kCFStringEncodingUTF8); + (void) CFStringGetCString(cfstr, (char *)name_o, NAME_MAX, kCFStringEncodingUTF8); CFRelease(cfstr); free(swapped); } -- 2.45.2