]> git.sesse.net Git - bcachefs-tools-debian/blob - cmd_run.c
update bcache code, fsck improvements
[bcachefs-tools-debian] / cmd_run.c
1
2 #include <errno.h>
3 #include <stdbool.h>
4 #include <stdio.h>
5 #include <stdlib.h>
6 #include <string.h>
7
8 #include <fcntl.h>
9 #include <sys/ioctl.h>
10 #include <unistd.h>
11
12 #include <uuid/uuid.h>
13
14 #include "cmds.h"
15 #include "linux/bcache-ioctl.h"
16
17 int cmd_run(int argc, char *argv[])
18 {
19         return 0;
20 }
21
22 int cmd_stop(int argc, char *argv[])
23 {
24         if (argc != 2)
25                 die("Please supply a filesystem");
26
27         struct bcache_handle fs = bcache_fs_open(argv[1]);
28
29         if (ioctl(fs.ioctl_fd, BCH_IOCTL_STOP))
30                 die("BCH_IOCTL_STOP error: %s", strerror(errno));
31
32         return 0;
33 }