summaryrefslogtreecommitdiff
path: root/Tools/Source/TianoTools/FlashMap/FlashMap.c
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/Source/TianoTools/FlashMap/FlashMap.c')
-rw-r--r--Tools/Source/TianoTools/FlashMap/FlashMap.c30
1 files changed, 28 insertions, 2 deletions
diff --git a/Tools/Source/TianoTools/FlashMap/FlashMap.c b/Tools/Source/TianoTools/FlashMap/FlashMap.c
index 8e8237507d..191e899ecc 100644
--- a/Tools/Source/TianoTools/FlashMap/FlashMap.c
+++ b/Tools/Source/TianoTools/FlashMap/FlashMap.c
@@ -87,6 +87,11 @@ Usage (
VOID
);
+char*
+NormalizePath (
+ char* OldPathName
+ );
+
int
main (
int argc,
@@ -249,8 +254,8 @@ Returns:
// Open the file, determine the size, then read it in and write
// it back out.
//
- if ((InFptr = fopen (FileNames->Str, "rb")) == NULL) {
- Error (NULL, 0, 0, FileNames->Str, "failed to open input file for reading");
+ if ((InFptr = fopen (NormalizePath(FileNames->Str), "rb")) == NULL) {
+ Error (NULL, 0, 0, NormalizePath(FileNames->Str), "failed to open input file for reading");
goto Done;
}
fseek (InFptr, 0, SEEK_END);
@@ -739,3 +744,24 @@ Returns:
fprintf (stdout, "%s\n", Msg[i]);
}
}
+
+char*
+NormalizePath (
+ char* OldPathName
+ )
+{
+ char* Visitor;
+
+ if (OldPathName == NULL) {
+ return NULL;
+ }
+
+ Visitor = OldPathName;
+ while (*Visitor != '\0') {
+ if (*Visitor == '\\') {
+ *Visitor = '/';
+ }
+ }
+
+ return Visitor;
+} \ No newline at end of file