summaryrefslogtreecommitdiff
path: root/bcache-device.c
diff options
context:
space:
mode:
Diffstat (limited to 'bcache-device.c')
-rw-r--r--bcache-device.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/bcache-device.c b/bcache-device.c
index 1f6f1574..a349e790 100644
--- a/bcache-device.c
+++ b/bcache-device.c
@@ -16,6 +16,10 @@
#include <nih/option.h>
#include "bcache.h"
+#include "libbcache.h"
+
+/* This code belongs under show_fs */
+#if 0
struct bcache_dev {
unsigned nr;
@@ -162,6 +166,20 @@ int cmd_device_show(int argc, char *argv[])
return 0;
}
+#endif
+
+int cmd_device_show(int argc, char *argv[])
+{
+ struct cache_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;
+}
int cmd_device_add(int argc, char *argv[])
{