]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/nvram: Fix an incorrect partition merge
authorPan Xinhui <xinhui.pan@linux.vnet.ibm.com>
Thu, 10 Dec 2015 07:30:02 +0000 (15:30 +0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 20 Sep 2016 06:15:42 +0000 (16:15 +1000)
commita6a1ddb51896c5c53eb53d4463f8b10ccc916d8a
treeba582341a1d1c15deb471f5f05f2966c35ab842e
parent29d09f5bb58e657618cd970310a2e0ca960c1edd
powerpc/nvram: Fix an incorrect partition merge

When we merge two contiguous partitions whose signatures are marked
NVRAM_SIG_FREE, We need update prev's length and checksum, then write it
to nvram, not cur's. So lets fix this mistake now.

Also use memset instead of strncpy to set the partition's name. It's
more readable if we want to fill up with duplicate chars .

Fixes: 397b549a4834 ("powerpc/nvram: Improve partition removal")
Signed-off-by: Pan Xinhui <xinhui.pan@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/nvram_64.c