summaryrefslogtreecommitdiff
path: root/rbutil/ipodpatcher/fat32format.c
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/ipodpatcher/fat32format.c')
-rw-r--r--rbutil/ipodpatcher/fat32format.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/rbutil/ipodpatcher/fat32format.c b/rbutil/ipodpatcher/fat32format.c
index 6d42379124..e0e30db602 100644
--- a/rbutil/ipodpatcher/fat32format.c
+++ b/rbutil/ipodpatcher/fat32format.c
@@ -333,8 +333,7 @@ static void create_boot_sector(unsigned char* buf,
333 buf[511] = 0xaa; 333 buf[511] = 0xaa;
334} 334}
335 335
336static void create_fsinfo(unsigned char* buf, 336static void create_fsinfo(unsigned char* buf)
337 struct ipod_t* ipod, int partition)
338{ 337{
339 struct FAT_FSINFO* pFAT32FsInfo = (struct FAT_FSINFO*)buf; 338 struct FAT_FSINFO* pFAT32FsInfo = (struct FAT_FSINFO*)buf;
340 339
@@ -350,8 +349,7 @@ static void create_fsinfo(unsigned char* buf,
350 pFAT32FsInfo->dNxt_Free = htole32(3); 349 pFAT32FsInfo->dNxt_Free = htole32(3);
351} 350}
352 351
353static void create_firstfatsector(unsigned char* buf, 352static void create_firstfatsector(unsigned char* buf)
354 struct ipod_t* ipod, int partition)
355{ 353{
356 uint32_t* p = (uint32_t*)buf; /* We know the buffer is aligned */ 354 uint32_t* p = (uint32_t*)buf; /* We know the buffer is aligned */
357 355
@@ -481,7 +479,7 @@ int format_partition(struct ipod_t* ipod, int partition)
481 479
482 /* Create the boot sector structure */ 480 /* Create the boot sector structure */
483 create_boot_sector(sectorbuf, ipod, partition); 481 create_boot_sector(sectorbuf, ipod, partition);
484 create_fsinfo(sectorbuf + 512, ipod, partition); 482 create_fsinfo(sectorbuf + 512);
485 483
486 /* Write boot sector and fsinfo at start of partition */ 484 /* Write boot sector and fsinfo at start of partition */
487 if (ipod_seek(ipod, ipod->pinfo[partition].start * ipod->sector_size) < 0) { 485 if (ipod_seek(ipod, ipod->pinfo[partition].start * ipod->sector_size) < 0) {
@@ -504,7 +502,7 @@ int format_partition(struct ipod_t* ipod, int partition)
504 } 502 }
505 503
506 /* Create the first FAT sector */ 504 /* Create the first FAT sector */
507 create_firstfatsector(sectorbuf, ipod, partition); 505 create_firstfatsector(sectorbuf);
508 506
509 /* Write the first fat sector in the right places */ 507 /* Write the first fat sector in the right places */
510 for ( i=0; i<NumFATs; i++ ) { 508 for ( i=0; i<NumFATs; i++ ) {