summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/toradex/common/tegra2_partitions.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/board/toradex/common/tegra2_partitions.c b/board/toradex/common/tegra2_partitions.c
index c64d5e7299..9ee4a4519d 100644
--- a/board/toradex/common/tegra2_partitions.c
+++ b/board/toradex/common/tegra2_partitions.c
@@ -227,14 +227,20 @@ int nvtegra_mtdparts_string(char *output, int size)
p = &(pt->partinfo[0]);
for (i = 0; (p->id < 128) && (i < TEGRA_MAX_PARTITIONS); i++) {
if (p != usr) {
+ /* add coma separator after previous entries */
+ if (j > 0) {
+ sprintf(buffer + j, ",");
+ j++;
+ }
+
if (strlen(p->name))
- sprintf(buffer + j, ",%uK@%uK(%s)",
+ sprintf(buffer + j, "%uK@%uK(%s)",
p->virtual_size *
nand_info->writesize / 1024,
p->start_sector *
nand_info->writesize / 1024, p->name);
else
- sprintf(buffer + j, ",%uK@%uK",
+ sprintf(buffer + j, "%uK@%uK",
p->virtual_size *
nand_info->writesize / 1024,
p->start_sector *