Subversion Repositories freemyipod

Rev

Rev 206 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 206 Rev 210
Line 429... Line 429...
429
 
429
 
430
#endif
430
#endif
431
 
431
 
432
 
432
 
433
static struct mutex ftl_mtx;
433
static struct mutex ftl_mtx;
434
bool ftl_initialized;
434
bool ftl_initialized = false;
435
 
435
 
436
 
436
 
437
 
437
 
438
/* Finds a device info page for the specified bank and returns its number.
438
/* Finds a device info page for the specified bank and returns its number.
439
   Used to check if one is present, and to read the lowlevel BBT. */
439
   Used to check if one is present, and to read the lowlevel BBT. */
Line 2515... Line 2515...
2515
   As long as nothing was written, you won't need to unmount it.
2515
   As long as nothing was written, you won't need to unmount it.
2516
   Before shutting down after writing something, call ftl_sync(),
2516
   Before shutting down after writing something, call ftl_sync(),
2517
   which will return immediately if everything was already clean. */
2517
   which will return immediately if everything was already clean. */
2518
uint32_t ftl_init(void)
2518
uint32_t ftl_init(void)
2519
{
2519
{
-
 
2520
    if (ftl_initialized) return 0;
2520
    mutex_init(&ftl_mtx);
2521
    mutex_init(&ftl_mtx);
2521
    uint32_t i;
2522
    uint32_t i;
2522
    uint32_t result = 0;
2523
    uint32_t result = 0;
2523
    uint32_t foundsignature, founddevinfo, blockwiped, repaired, skip;
2524
    uint32_t foundsignature, founddevinfo, blockwiped, repaired, skip;
2524
    int rc;
2525
    int rc;