bcachefs-tools/cmd_run.c

34 lines
544 B
C
Raw Normal View History

2016-03-12 09:18:42 +03:00
#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>
2017-02-02 06:16:42 +03:00
#include "cmds.h"
#include "linux/bcache-ioctl.h"
2016-03-12 09:18:42 +03:00
2016-08-24 06:50:31 +03:00
int cmd_run(int argc, char *argv[])
2016-03-12 09:18:42 +03:00
{
return 0;
}
2016-08-24 06:50:31 +03:00
int cmd_stop(int argc, char *argv[])
2016-03-12 09:18:42 +03:00
{
2016-10-06 18:19:55 +03:00
if (argc != 2)
2016-03-12 09:18:42 +03:00
die("Please supply a filesystem");
2016-10-06 18:19:55 +03:00
struct bcache_handle fs = bcache_fs_open(argv[1]);
2016-03-12 09:18:42 +03:00
2017-01-08 12:13:18 +03:00
if (ioctl(fs.ioctl_fd, BCH_IOCTL_STOP))
2016-03-12 09:18:42 +03:00
die("BCH_IOCTL_STOP error: %s", strerror(errno));
return 0;
}