Adds a new "dup" command to find duplicates.

This commit is contained in:
Andrea Mazzoleni 2011-12-08 20:37:27 +01:00
parent 8585485868
commit cec7b2f2b4
10 changed files with 193 additions and 22 deletions

14
elem.c
View file

@ -353,20 +353,10 @@ struct snapraid_disk* disk_alloc(const char* name, const char* dir, uint64_t dev
void disk_free(struct snapraid_disk* disk)
{
tommy_node* node = disk->filelist;
while (node) {
struct snapraid_file* file = node->data;
node = node->next;
file_free(file);
}
tommy_list_foreach(&disk->filelist, (tommy_foreach_func*)file_free);
tommy_hashdyn_done(&disk->inodeset);
tommy_hashdyn_done(&disk->pathset);
node = disk->linklist;
while (node) {
struct snapraid_link* link = node->data;
node = node->next;
link_free(link);
}
tommy_list_foreach(&disk->linklist, (tommy_foreach_func*)link_free);
tommy_hashdyn_done(&disk->linkset);
tommy_array_done(&disk->blockarr);
free(disk);