/* Sensible wrappers over the byte-swapping routines */
#include "hfs_endian.h"
-#if !TARGET_OS_EMBEDDED
-#include "optical.h"
-#endif
+#if TARGET_OS_OSX
+#include "optical.h" //only include optical headers on Macs
+#endif //osx
#include <mntopts.h>
#define KEXT_LOAD_COMMAND "/sbin/kextload"
-#define ENCODING_MODULE_PATH "/System/Library/Filesystems/hfs.fs/Encodings/"
+#define ENCODING_MODULE_PATH "/System/Library/Filesystems/hfs.fs/Contents/Resources/Encodings/"
#define MXENCDNAMELEN 16 /* Maximun length of encoding name string */
int do_rekey = 0;
int tmp_mntflags = 0;
-#if TARGET_OS_EMBEDDED
+
+#if TARGET_OS_IPHONE
mntflags = MNT_NOATIME;
-#else
+#else // !TARGET_OS_IPHONE
mntflags = 0;
-#endif
+#endif // TARGET_OS_IPHONE
+
encp = NULL;
(void)memset(&args, '\0', sizeof(struct hfs_mount_args));
if (args.hfs_mask == (mode_t)VNOVAL)
args.hfs_mask = sb.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO);
}
+
#if DEBUG
printf("mount_hfs: calling mount: \n" );
printf("\tdevice = %s\n", dev);
#endif
-#if !TARGET_OS_EMBEDDED
+#if TARGET_OS_OSX
/*
* We shouldn't really be calling up to other layers, but
* an exception was made in this case to fix the situation
}
if ((mountStatus = mount(HFS_MOUNT_TYPE, dir, mntflags, &args)) < 0) {
-#if DEBUG
printf("mount_hfs: error on mount(): error = %d.\n", mountStatus);
-#endif
err(1, NULL);
};
{
(void)fprintf(stderr,
"usage: mount_hfs [-xw] [-u user] [-g group] [-m mask] [-e encoding] [-t tbuffer-size] [-j] [-c] [-o options] special-device filesystem-node\n");
- (void)fprintf(stderr, " -j disables journaling; -c disables group-commit for journaling\n");
exit(1);
}