12 #include <nih/command.h>
13 #include <nih/option.h>
15 #include <uuid/uuid.h>
18 #include "bcache-run.h"
20 NihOption opts_run[] = {
24 int cmd_run(NihCommand *command, char *const *args)
29 NihOption opts_stop[] = {
33 int cmd_stop(NihCommand *command, char *const *args)
35 if (nr_args(args) != 1)
36 die("Please supply a filesystem");
38 struct bcache_handle fs = bcache_fs_open(args[0]);
40 if (ioctl(fs.fd, BCH_IOCTL_STOP))
41 die("BCH_IOCTL_STOP error: %s", strerror(errno));