ftl: check magic in read_page_group()
This commit is contained in:
parent
ed49402e3b
commit
b4ecfb527c
1 changed files with 3 additions and 0 deletions
|
@ -75,6 +75,9 @@ int read_page_group(struct ftl_map *map,
|
||||||
if (flash_read(map->dev, addr, group, sizeof *group) == 0)
|
if (flash_read(map->dev, addr, group, sizeof *group) == 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
if (memcmp(group->magic, "FTL", 3) != 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue