diff options
Diffstat (limited to 'util')
-rw-r--r-- | util/nvmutil/nvmutil.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 3a050644..77b33aa2 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -205,16 +205,18 @@ cmd_brick(void) void cmd_swap(void) { - xorswap(gbe[0], gbe[1]); /* speedhack: swap ptr, not words */ gbeFileModified = nvmPartModified[0] = nvmPartModified[1] = validChecksum(1) | validChecksum(0); + if (gbeFileModified) + xorswap(gbe[0], gbe[1]); /* speedhack: swap ptr, not words */ } void cmd_copy(void) { - gbe[part ^ 1] = gbe[part]; /* speedhack: copy ptr, not words */ gbeFileModified = nvmPartModified[part ^ 1] = validChecksum(part); + if (gbeFileModified) + gbe[part ^ 1] = gbe[part]; /* speedhack: copy ptr, not words */ } int |