[PATCH 2/2] mtd: show the partition's flags in the the /proc/mtd

Huang Shijie b32955 at freescale.com
Tue Apr 29 20:53:30 PDT 2014


This patch adds the flags information when we use the "cat /proc/mtd".

Signed-off-by: Huang Shijie <b32955 at freescale.com>
---
 drivers/mtd/mtdcore.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index 9cdc154..c62ee70 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -1132,12 +1132,12 @@ static int mtd_proc_show(struct seq_file *m, void *v)
 {
 	struct mtd_info *mtd;
 
-	seq_puts(m, "dev:    size   erasesize  name\n");
+	seq_puts(m, "dev:    size   erasesize   flags   name\n");
 	mutex_lock(&mtd_table_mutex);
 	mtd_for_each_device(mtd) {
-		seq_printf(m, "mtd%d: %8.8llx %8.8x \"%s\"\n",
+		seq_printf(m, "mtd%d: %8.8llx %8.8x  %8.8x \"%s\"\n",
 			   mtd->index, (unsigned long long)mtd->size,
-			   mtd->erasesize, mtd->name);
+			   mtd->erasesize, mtd->flags, mtd->name);
 	}
 	mutex_unlock(&mtd_table_mutex);
 	return 0;
-- 
1.7.2.rc3




More information about the linux-mtd mailing list