]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - bcache-fs.c
finish ripping out libnih
[bcachefs-tools-debian] / bcache-fs.c
index f06ca3788c7d0d89216cf21912001fc9f4c97bc5..57dc47ab126006b404eff548864b81ce9d286870 100644 (file)
@@ -1,6 +1,4 @@
 
-#include <nih/option.h>
-
 #include "bcache.h"
 
 struct bcache_fs {
@@ -20,32 +18,20 @@ static struct bcache_fs fill_fs(struct bcache_handle 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)
+       if (argc != 2)
                die("Please supply a filesystem");
 
-       struct bcache_handle fs = bcache_fs_open(args[0]);
+       struct bcache_handle fs = bcache_fs_open(argv[1]);
 
        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)
+       if (argc != 2)
                die("Please supply a filesystem");
 
-       struct bcache_handle fs = bcache_fs_open(args[0]);
+       struct bcache_handle fs = bcache_fs_open(argv[1]);
 
        return 0;
 }