From: Gabor Juhos Date: Fri, 23 Jan 2009 11:54:44 +0000 (+0000) Subject: generic-2.6: make MyLoader parser compatible with the old partition tables X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=404fa6621550be0caf9a989f67517d97ef1f9ec2;p=openwrt%2Fstaging%2Fldir.git generic-2.6: make MyLoader parser compatible with the old partition tables SVN-Revision: 14155 --- 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 + * Copyright (C) 2007-2009 Gabor Juhos * * This file was based on drivers/mtd/redboot.c * Author: Red Hat, Inc. - David Woodhouse @@ -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);