freemyipod r603 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r602‎ | r603 | r604 >
Date:01:21, 13 February 2011
Author:theseven
Status:new
Tags:
Comment:
genbbt: Fix a small bug and add a Makefile
Modified paths:
  • /emcore/trunk/tools/Makefile (added) (history)
  • /emcore/trunk/tools/genbbt.c (modified) (history)

Diff [purge]

Index: emcore/trunk/tools/genbbt.c
@@ -33,7 +33,7 @@
3434 if (sscanf(line, "%i", &sector) == 1 && sector) mark_bad(bitmap, sector);
3535 }
3636 fclose(in);
37 - int l0count = (sectors + 0xfffff) >> 19;
 37+ int l0count = (sectors + 0x7ffff) >> 19;
3838 int bbtpages = 64 + ((l0count + 0x3f) & ~0x3f);
3939 int bbtsize;
4040 uint16_t (*bbt)[0x20];
Index: emcore/trunk/tools/Makefile
@@ -0,0 +1,9 @@
 2+all: genbbt
 3+
 4+genbbt:
 5+ $(CC) -O3 -o genbbt genbbt.c
 6+
 7+clean:
 8+ rm -f genbbt
 9+
 10+.PHONY: all clean
\ No newline at end of file