mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-04 13:50:09 -05:00
Saves the disk mapping inside the content file.
This commit is contained in:
parent
99515f610c
commit
4adef9dc17
15 changed files with 399 additions and 119 deletions
16
elem.c
16
elem.c
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue