Saves the disk mapping inside the content file.

This commit is contained in:
Andrea Mazzoleni 2011-10-01 19:18:32 +02:00
parent 99515f610c
commit 4adef9dc17
15 changed files with 399 additions and 119 deletions

16
elem.c
View file

@ -363,3 +363,19 @@ void disk_free(struct snapraid_disk* disk)
free(disk);
}
struct snapraid_map* map_alloc(const char* name, unsigned position)
{
struct snapraid_map* map;
map = malloc_nofail(sizeof(struct snapraid_map));
pathcpy(map->name, sizeof(map->name), name);
map->position = position;
return map;
}
void map_free(struct snapraid_map* map)
{
free(map);
}