]> git.sesse.net Git - bcachefs-tools-debian/blob - bcache-fs.c
Redo lots of stuff
[bcachefs-tools-debian] / bcache-fs.c
1
2 #include <nih/command.h>
3 #include <nih/option.h>
4
5 #include "bcache.h"
6 #include "bcache-fs.h"
7
8 struct bcache_fs {
9         /* options... */
10
11         u64             capacity;
12
13         /* XXX: dirty != used, it doesn't count metadata */
14         u64             bytes_dirty;
15 };
16
17 static struct bcache_fs fill_fs(struct bcache_handle fs)
18 {
19         return (struct bcache_fs) {
20         };
21 }
22
23 NihOption opts_fs_show[] = {
24 //      { int shortoption, char *longoption, char *help, NihOptionGroup, char *argname, void *value, NihOptionSetter}
25         NIH_OPTION_LAST
26 };
27
28 int cmd_fs_show(NihCommand *command, char *const *args)
29 {
30         if (nr_args(args) != 1)
31                 die("Please supply a filesystem");
32
33         struct bcache_handle fs = bcache_fs_open(args[0]);
34
35         return 0;
36 }
37
38 NihOption opts_fs_set[] = {
39 //      { int shortoption, char *longoption, char *help, NihOptionGroup, char *argname, void *value, NihOptionSetter}
40         NIH_OPTION_LAST
41 };
42
43 int cmd_fs_set(NihCommand *command, char *const *args)
44 {
45         if (nr_args(args) < 1)
46                 die("Please supply a filesystem");
47
48         struct bcache_handle fs = bcache_fs_open(args[0]);
49
50         return 0;
51 }