diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2017-01-08 00:13:18 -0900 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2017-01-20 09:07:08 -0900 |
commit | b33fc8298f7e13226b9895abc57c9bfce5e3fa2d (patch) | |
tree | a3d2a5a909b6372f7777c1c5c18cef5f81d123a9 /bcache-device.c | |
parent | 7f4191a202ea4558ca2d5eb8a47daea33c9999c7 (diff) |
bcache in userspace; userspace fsck
Diffstat (limited to 'bcache-device.c')
-rw-r--r-- | bcache-device.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/bcache-device.c b/bcache-device.c index bb79a92..5ff0d82 100644 --- a/bcache-device.c +++ b/bcache-device.c @@ -1,4 +1,3 @@ -#include <dirent.h> #include <errno.h> #include <fcntl.h> #include <getopt.h> @@ -13,7 +12,7 @@ #include <sys/types.h> #include <unistd.h> -#include "bcache.h" +#include "bcache-cmds.h" #include "libbcache.h" /* This code belongs under show_fs */ @@ -191,7 +190,7 @@ int cmd_device_add(int argc, char *argv[]) .dev = (__u64) argv[i], }; - if (ioctl(fs.fd, BCH_IOCTL_DISK_ADD, &ia)) + if (ioctl(fs.ioctl_fd, BCH_IOCTL_DISK_ADD, &ia)) die("BCH_IOCTL_DISK_ADD error: %s", strerror(errno)); } @@ -250,7 +249,7 @@ int cmd_device_remove(int argc, char *argv[]) if (force_metadata) ir.flags |= BCH_FORCE_IF_METADATA_MISSING; - if (ioctl(fs.fd, BCH_IOCTL_DISK_REMOVE, &ir)) + if (ioctl(fs.ioctl_fd, BCH_IOCTL_DISK_REMOVE, &ir)) die("BCH_IOCTL_DISK_REMOVE error: %s\n", strerror(errno)); } |