Restores the modification time of files in fixing.

This commit is contained in:
Andrea Mazzoleni 2011-08-31 23:33:43 +02:00
parent e6b02b7d2d
commit 66e9c359fd
15 changed files with 226 additions and 67 deletions

7
elem.c
View file

@ -193,6 +193,13 @@ block_off_t block_file_pos(struct snapraid_block* block)
return block - file->blockvec;
}
int block_is_last(struct snapraid_block* block)
{
struct snapraid_file* file = block_file_get(block);
return block == file->blockvec + file->blockmax - 1;
}
unsigned block_file_size(struct snapraid_block* block, unsigned block_size)
{
block_off_t pos = block_file_pos(block);