diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2017-03-12 06:53:43 -0800 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2017-03-12 06:53:43 -0800 |
commit | d252e12accd8b4fdc0e50b539370b203f3894de9 (patch) | |
tree | 075bef138b2a3bfe4a935dacfaa68d55cb0db7c1 /cmd_format.c | |
parent | 3bf874183a518cc1bf785d9944de05cf51a177d3 (diff) |
Refactoring for device specific commands
Diffstat (limited to 'cmd_format.c')
-rw-r--r-- | cmd_format.c | 12 |
1 files changed, 12 insertions, 0 deletions
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; +} |