Author: dquintana
Date: Wed Sep 9 01:33:27 2015
New Revision: 69137
URL:
http://svn.reactos.org/svn/reactos?rev=69137&view=rev
Log:
[FATTEN]
* WHO ATE THAT 'b'?! WHO?!
* The jump instruction is 3 bytes long, not 2 (and dequick&dirtied a bit while at
it).
Modified:
trunk/reactos/tools/fatten/fatfs/diskio.c
trunk/reactos/tools/fatten/fatten.c
Modified: trunk/reactos/tools/fatten/fatfs/diskio.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/fatten/fatfs/diskio.…
==============================================================================
--- trunk/reactos/tools/fatten/fatfs/diskio.c [iso-8859-1] (original)
+++ trunk/reactos/tools/fatten/fatfs/diskio.c [iso-8859-1] Wed Sep 9 01:33:27 2015
@@ -30,7 +30,7 @@
driveHandle[0] = fopen(imageFileName, "r+b");
if (!driveHandle[0])
{
- driveHandle[0] = fopen(imageFileName, "w+");
+ driveHandle[0] = fopen(imageFileName, "w+b");
}
if (driveHandle[0] != NULL)
Modified: trunk/reactos/tools/fatten/fatten.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/fatten/fatten.c?rev=…
==============================================================================
--- trunk/reactos/tools/fatten/fatten.c [iso-8859-1] (original)
+++ trunk/reactos/tools/fatten/fatten.c [iso-8859-1] Wed Sep 9 01:33:27 2015
@@ -232,8 +232,10 @@
}
else
{
- // Quick&dirty hardcoded length.
- memcpy(buff + 2, temp + 2, 0x3E - 0x02);
+#define FAT16_HEADER_START 3
+#define FAT16_HEADER_END 62
+
+ memcpy(buff + FAT16_HEADER_START, temp + FAT16_HEADER_START,
FAT16_HEADER_END - FAT16_HEADER_START);
}
if (disk_write(0, buff, 0, 1))