1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-11-20 15:45:21 +01:00

generic-2.6: make MyLoader parser compatible with the old partition tables

SVN-Revision: 14155
This commit is contained in:
Gabor Juhos 2009-01-23 11:54:44 +00:00
parent d210025406
commit 404fa66215

@ -2,7 +2,7 @@
* Parse MyLoader-style flash partition tables and produce a Linux partition * Parse MyLoader-style flash partition tables and produce a Linux partition
* array to match. * 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 * This file was based on drivers/mtd/redboot.c
* Author: Red Hat, Inc. - David Woodhouse <dwmw2@cambridge.redhat.com> * 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) if (le16_to_cpu(part->type) == PARTITION_TYPE_FREE)
continue; continue;
if (buf->names[i][0]) if ((buf->names[i][0]) && (buf->names[i][0] != '\xff'))
strncpy(names, buf->names[i], PART_NAME_LEN); strncpy(names, buf->names[i], PART_NAME_LEN);
else else
snprintf(names, PART_NAME_LEN, "partition%d", i); snprintf(names, PART_NAME_LEN, "partition%d", i);