aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs
diff options
context:
space:
mode:
authorGu Zheng <guz.fnst@cn.fujitsu.com>2014-03-07 18:43:33 +0800
committerAndreas Blaesius <skate4life@gmx.de>2016-06-05 21:21:20 +0200
commit8ebfef2bc6a1a2043856dd62582803c16a6914c7 (patch)
tree423b07bf66d816f7d579c4f0ba7220ffbb8a4e5f /fs/f2fs
parentfba413bd852448f9765b468dca806d64d73585f1 (diff)
downloadkernel_samsung_espresso10-8ebfef2bc6a1a2043856dd62582803c16a6914c7.zip
kernel_samsung_espresso10-8ebfef2bc6a1a2043856dd62582803c16a6914c7.tar.gz
kernel_samsung_espresso10-8ebfef2bc6a1a2043856dd62582803c16a6914c7.tar.bz2
f2fs: format segment_info's show for better legibility
The original segment_info's show is a bit out-of-format: [root@guz Demoes]# cat /proc/fs/f2fs/loop0/segment_info 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...... 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 [root@guz Demoes]# so we fix it here for better legibility. [root@guz Demoes]# cat /proc/fs/f2fs/loop0/segment_info 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...... 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 [root@guz Demoes]# Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com> Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/super.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 6b9d296..bf11740 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -530,11 +530,12 @@ static int segment_info_seq_show(struct seq_file *seq, void *offset)
for (i = 0; i < total_segs; i++) {
seq_printf(seq, "%u", get_valid_blocks(sbi, i, 1));
- if (i != 0 && (i % 10) == 0)
- seq_puts(seq, "\n");
+ if ((i % 10) == 9 || i == (total_segs - 1))
+ seq_putc(seq, '\n');
else
- seq_puts(seq, " ");
+ seq_putc(seq, ' ');
}
+
return 0;
}