|
|
@ -35,6 +35,10 @@ static int mufs_do_lookup(struct mufs *fs, uint32_t *page, |
|
|
|
if (!table[index]) { |
|
|
|
if (!table[index]) { |
|
|
|
if (!alloc || mufs_alloc_block(fs, &table[index]) < 0) |
|
|
|
if (!alloc || mufs_alloc_block(fs, &table[index]) < 0) |
|
|
|
return -1; |
|
|
|
return -1; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (flash_write(fs->dev, base << fs->dev->log2_block_size, data, |
|
|
|
|
|
|
|
sizeof data) == 0) |
|
|
|
|
|
|
|
return -1; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return mufs_do_lookup(fs, page, table[index], depth - 1, va, alloc); |
|
|
|
return mufs_do_lookup(fs, page, table[index], depth - 1, va, alloc); |
|
|
|