summaryrefslogtreecommitdiff
path: root/bcache-fs.c
blob: f06ca3788c7d0d89216cf21912001fc9f4c97bc5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51

#include <nih/option.h>

#include "bcache.h"

struct bcache_fs {
	/* options... */

	u64		capacity;

	/* XXX: dirty != used, it doesn't count metadata */
	u64		bytes_dirty;
};

static struct bcache_fs fill_fs(struct bcache_handle fs)
{
	return (struct bcache_fs) {
	};
}

int cmd_fs_show(int argc, char *argv[])
{
	NihOption opts[] = {
	//	{ int shortoption, char *longoption, char *help, NihOptionGroup, char *argname, void *value, NihOptionSetter}
		NIH_OPTION_LAST
	};
	char **args = bch_nih_init(argc, argv, opts);

	if (nr_args(args) != 1)
		die("Please supply a filesystem");

	struct bcache_handle fs = bcache_fs_open(args[0]);

	return 0;
}

int cmd_fs_set(int argc, char *argv[])
{
	NihOption opts[] = {
	//	{ int shortoption, char *longoption, char *help, NihOptionGroup, char *argname, void *value, NihOptionSetter}
		NIH_OPTION_LAST
	};
	char **args = bch_nih_init(argc, argv, opts);

	if (nr_args(args) < 1)
		die("Please supply a filesystem");

	struct bcache_handle fs = bcache_fs_open(args[0]);

	return 0;
}