From d252e12accd8b4fdc0e50b539370b203f3894de9 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Sun, 12 Mar 2017 06:53:43 -0800 Subject: Refactoring for device specific commands --- cmd_format.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'cmd_format.c') diff --git a/cmd_format.c b/cmd_format.c index 3ef862f7..45764a10 100644 --- a/cmd_format.c +++ b/cmd_format.c @@ -268,3 +268,15 @@ int cmd_format(int argc, char *argv[]) return 0; } + +int cmd_show_super(int argc, char *argv[]) +{ + struct bch_sb *sb; + + if (argc != 2) + die("please supply a single device"); + + sb = bcache_super_read(argv[1]); + bcache_super_print(sb, HUMAN_READABLE); + return 0; +} -- cgit v1.2.3