summaryrefslogtreecommitdiff
path: root/cmd_run.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2017-02-01 18:16:42 -0900
committerKent Overstreet <kent.overstreet@gmail.com>2017-02-06 20:45:37 -0900
commit5933f9478cc21e8b319309d2794948050d09b031 (patch)
tree781509d106b4aa5c99dda7e88028b58baf6de786 /cmd_run.c
parentab88049a08bf734b9a6c9f2deae39fbd0c933192 (diff)
update bcache code, fsck improvements
Diffstat (limited to 'cmd_run.c')
-rw-r--r--cmd_run.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/cmd_run.c b/cmd_run.c
new file mode 100644
index 00000000..74f32480
--- /dev/null
+++ b/cmd_run.c
@@ -0,0 +1,33 @@
+
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include <unistd.h>
+
+#include <uuid/uuid.h>
+
+#include "cmds.h"
+#include "linux/bcache-ioctl.h"
+
+int cmd_run(int argc, char *argv[])
+{
+ return 0;
+}
+
+int cmd_stop(int argc, char *argv[])
+{
+ if (argc != 2)
+ die("Please supply a filesystem");
+
+ struct bcache_handle fs = bcache_fs_open(argv[1]);
+
+ if (ioctl(fs.ioctl_fd, BCH_IOCTL_STOP))
+ die("BCH_IOCTL_STOP error: %s", strerror(errno));
+
+ return 0;
+}