diff mbox

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

Message ID 1398830010-3628-2-git-send-email-b32955@freescale.com
State Rejected
Headers show

Commit Message

Huang Shijie April 30, 2014, 3:53 a.m. UTC
This patch adds the flags information when we use the "cat /proc/mtd".

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

Patch

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;