summaryrefslogtreecommitdiff
path: root/bcache-fs.c
blob: b0438c56d14b0c8bdfb8136c93a766df4cef1269 (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/command.h>
#include <nih/option.h>

#include "bcache.h"
#include "bcache-fs.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) {
	};
}

NihOption opts_fs_show[] = {
//	{ int shortoption, char *longoption, char *help, NihOptionGroup, char *argname, void *value, NihOptionSetter}
	NIH_OPTION_LAST
};

int cmd_fs_show(NihCommand *command, char *const *args)
{
	if (nr_args(args) != 1)
		die("Please supply a filesystem");

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

	return 0;
}

NihOption opts_fs_set[] = {
//	{ int shortoption, char *longoption, char *help, NihOptionGroup, char *argname, void *value, NihOptionSetter}
	NIH_OPTION_LAST
};

int cmd_fs_set(NihCommand *command, char *const *args)
{
	if (nr_args(args) < 1)
		die("Please supply a filesystem");

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

	return 0;
}