Adds UUID to check to detect disk misplacement.

This commit is contained in:
Andrea Mazzoleni 2013-03-03 22:39:46 +01:00
parent 8810d7b05d
commit 768113c670
15 changed files with 272 additions and 34 deletions

3
elem.c
View file

@ -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;