aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic-2.6/files/drivers/mtd/myloader.c
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2009-01-23 11:54:44 +0000
committerGabor Juhos <juhosg@openwrt.org>2009-01-23 11:54:44 +0000
commit36adad2ac2b45628bb406b4212b4064b12cfaeba (patch)
tree37a7654c4f32231b28a76d9d4713170d81bce046 /target/linux/generic-2.6/files/drivers/mtd/myloader.c
parent95222dfa79d7e7e85fadb00e87d20e9ac4c01c26 (diff)
downloadupstream-36adad2ac2b45628bb406b4212b4064b12cfaeba.tar.gz
upstream-36adad2ac2b45628bb406b4212b4064b12cfaeba.tar.bz2
upstream-36adad2ac2b45628bb406b4212b4064b12cfaeba.zip
[kernel] generic-2.6: make MyLoader parser compatible with the old partition tables
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14155 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic-2.6/files/drivers/mtd/myloader.c')
-rw-r--r--target/linux/generic-2.6/files/drivers/mtd/myloader.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/target/linux/generic-2.6/files/drivers/mtd/myloader.c b/target/linux/generic-2.6/files/drivers/mtd/myloader.c
index 60ebe22056..51c037459f 100644
--- a/target/linux/generic-2.6/files/drivers/mtd/myloader.c
+++ b/target/linux/generic-2.6/files/drivers/mtd/myloader.c
@@ -2,7 +2,7 @@
* Parse MyLoader-style flash partition tables and produce a Linux partition
* array to match.
*
- * Copyright (C) 2007-2008 Gabor Juhos <juhosg@openwrt.org>
+ * Copyright (C) 2007-2009 Gabor Juhos <juhosg@openwrt.org>
*
* This file was based on drivers/mtd/redboot.c
* Author: Red Hat, Inc. - David Woodhouse <dwmw2@cambridge.redhat.com>
@@ -133,7 +133,7 @@ int myloader_parse_partitions(struct mtd_info *master,
if (le16_to_cpu(part->type) == PARTITION_TYPE_FREE)
continue;
- if (buf->names[i][0])
+ if ((buf->names[i][0]) && (buf->names[i][0] != '\xff'))
strncpy(names, buf->names[i], PART_NAME_LEN);
else
snprintf(names, PART_NAME_LEN, "partition%d", i);