git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
powerpc/nvram: Fix an incorrect partition merge
[pandora-kernel.git]
/
arch
/
powerpc
/
kernel
/
nvram_64.c
diff --git
a/arch/powerpc/kernel/nvram_64.c
b/arch/powerpc/kernel/nvram_64.c
index
bec1e93
..
c216048
100644
(file)
--- a/
arch/powerpc/kernel/nvram_64.c
+++ b/
arch/powerpc/kernel/nvram_64.c
@@
-280,7
+280,7
@@
int __init nvram_remove_partition(const char *name, int sig,
/* Make partition a free partition */
part->header.signature = NVRAM_SIG_FREE;
/* Make partition a free partition */
part->header.signature = NVRAM_SIG_FREE;
-
strncpy(part->header.name, "wwwwwwwwwwww"
, 12);
+
memset(part->header.name, 'w'
, 12);
part->header.checksum = nvram_checksum(&part->header);
rc = nvram_write_header(part);
if (rc <= 0) {
part->header.checksum = nvram_checksum(&part->header);
rc = nvram_write_header(part);
if (rc <= 0) {
@@
-298,8
+298,8
@@
int __init nvram_remove_partition(const char *name, int sig,
}
if (prev) {
prev->header.length += part->header.length;
}
if (prev) {
prev->header.length += part->header.length;
- prev->header.checksum = nvram_checksum(&p
art
->header);
- rc = nvram_write_header(p
art
);
+ prev->header.checksum = nvram_checksum(&p
rev
->header);
+ rc = nvram_write_header(p
rev
);
if (rc <= 0) {
printk(KERN_ERR "nvram_remove_partition: nvram_write failed (%d)\n", rc);
return rc;
if (rc <= 0) {
printk(KERN_ERR "nvram_remove_partition: nvram_write failed (%d)\n", rc);
return rc;