freemyipod r222 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r221‎ | r222 | r223 >
Date:03:18, 24 October 2010
Author:theseven
Status:new
Tags:
Comment:
FAT driver: Fix creation of "." and ".." directory entries
Modified paths:
  • /embios/trunk/fat.c (modified) (history)

Diff [purge]

Index: embios/trunk/fat.c
@@ -1748,8 +1748,8 @@
17491749 memset(buf, 0, SECTOR_SIZE);
17501750 if (!i)
17511751 {
1752 - memcpy(buf, ". \0x10", 12);
1753 - memcpy(&buf[0x20], ".. \0x10", 12);
 1752+ memcpy(buf, ". \x10", 12);
 1753+ memcpy(&buf[0x20], ".. \x10", 12);
17541754 ((uint16_t*)buf)[0xd] = newdir.firstcluster;
17551755 ((uint16_t*)buf)[0xa] = newdir.firstcluster >> 16;
17561756 if(dir->file.firstcluster == fat_bpb->bpb_rootclus)