mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-26 01:46:32 -05:00
Adds UUID to check to detect disk misplacement.
This commit is contained in:
parent
8810d7b05d
commit
768113c670
15 changed files with 272 additions and 34 deletions
3
elem.c
3
elem.c
|
|
@ -496,12 +496,13 @@ void disk_free(struct snapraid_disk* disk)
|
|||
free(disk);
|
||||
}
|
||||
|
||||
struct snapraid_map* map_alloc(const char* name, unsigned position)
|
||||
struct snapraid_map* map_alloc(const char* name, unsigned position, const char* uuid)
|
||||
{
|
||||
struct snapraid_map* map;
|
||||
|
||||
map = malloc_nofail(sizeof(struct snapraid_map));
|
||||
pathcpy(map->name, sizeof(map->name), name);
|
||||
pathcpy(map->uuid, sizeof(map->uuid), uuid);
|
||||
map->position = position;
|
||||
|
||||
return map;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue