]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - c_src/cmd_run.c
move Rust sources to top level, C sources into c_src
[bcachefs-tools-debian] / c_src / cmd_run.c
diff --git a/c_src/cmd_run.c b/c_src/cmd_run.c
new file mode 100644 (file)
index 0000000..1bf84e5
--- /dev/null
@@ -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 "libbcachefs/bcachefs_ioctl.h"
+#include "cmds.h"
+#include "libbcachefs.h"
+
+#if 0
+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 bchfs_handle fs = bcache_fs_open(argv[1]);
+       xioctl(fs.ioctl_fd, BCH_IOCTL_STOP);
+       return 0;
+}
+#endif