From ef7a8748e614652b892ecc7634575b9e1d90188b Mon Sep 17 00:00:00 2001 From: Dave Murphy Date: Tue, 13 Jan 2015 15:11:51 +0000 Subject: [PATCH] fix FAT_setAttr for big endian --- include/fat.h | 6 +++--- source/fatfile.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/fat.h b/include/fat.h index 03e83a2..7d828f6 100644 --- a/include/fat.h +++ b/include/fat.h @@ -1,7 +1,7 @@ /* fat.h Simple functionality for startup, mounting and unmounting of FAT-based devices. - + Copyright (c) 2006 - 2012 Michael "Chishm" Chisholm Dave "WinterMute" Murphy @@ -73,7 +73,7 @@ extern bool fatInitDefault (void); /* Mount the device pointed to by interface, and set up a devoptab entry for it as "name:". You can then access the filesystem using "name:/". -This will mount the active partition or the first valid partition on the disc, +This will mount the active partition or the first valid partition on the disc, and will use a cache size optimized for the host system. */ extern bool fatMountSimple (const char* name, const DISC_INTERFACE* interface); @@ -111,7 +111,7 @@ extern void fatGetVolumeLabel (const char* name, char *label); Methods to modify DOS File Attributes */ int FAT_getAttr(const char *file); -int FAT_setAttr(const char *file, int attr ); +int FAT_setAttr(const char *file, uint8_t attr ); #define LIBFAT_FEOS_MULTICWD diff --git a/source/fatfile.c b/source/fatfile.c index 74df67c..a3ed1ea 100644 --- a/source/fatfile.c +++ b/source/fatfile.c @@ -50,7 +50,7 @@ bool _FAT_findEntry(const char *path, DIR_ENTRY *dirEntry) { // Check Partition if( !partition ) - return false; + return false; // Move the path pointer to the start of the actual path if (strchr (path, ':') != NULL) { @@ -72,7 +72,7 @@ int FAT_getAttr(const char *file) { return dirEntry.entryData[DIR_ENTRY_attributes]; } -int FAT_setAttr(const char *file, int attr) { +int FAT_setAttr(const char *file, uint8_t attr) { // Defines... DIR_ENTRY_POSITION entryEnd;