nvmutil copy/swap: actually set nvmPartModified
parent
82300f4f1e
commit
0108615f37
|
@ -337,21 +337,29 @@ cmd_swap(void)
|
||||||
part0 = validChecksum(0);
|
part0 = validChecksum(0);
|
||||||
part1 = validChecksum(1);
|
part1 = validChecksum(1);
|
||||||
|
|
||||||
if ((gbeFileModified = (part0 | part1))) {
|
if ((part0 | part1)) {
|
||||||
for(part0 = 0; part0 < SIZE_4KB; part0++) {
|
for(part0 = 0; part0 < SIZE_4KB; part0++) {
|
||||||
gbe[part0] ^= gbe[part1 = (part0 | SIZE_4KB)];
|
gbe[part0] ^= gbe[part1 = (part0 | SIZE_4KB)];
|
||||||
gbe[part1] ^= gbe[part0];
|
gbe[part1] ^= gbe[part0];
|
||||||
gbe[part0] ^= gbe[part1];
|
gbe[part0] ^= gbe[part1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gbeFileModified = 1;
|
||||||
|
nvmPartModified[0] = 1;
|
||||||
|
nvmPartModified[1] = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cmd_copy(void)
|
cmd_copy(void)
|
||||||
{
|
{
|
||||||
if (validChecksum(part))
|
if (validChecksum(part)) {
|
||||||
memcpy(gbe + ((part ^ (gbeFileModified = 1)) << 12),
|
memcpy(gbe + ((part ^ 1) << 12),
|
||||||
gbe + (part << 12), SIZE_4KB);
|
gbe + (part << 12), SIZE_4KB);
|
||||||
|
|
||||||
|
gbeFileModified = 1;
|
||||||
|
nvmPartModified[part] = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
Loading…
Reference in New Issue