diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2016-10-06 07:19:55 -0800 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2016-10-06 07:19:55 -0800 |
commit | f4eba6559b202547a7cf4be3e852ddaf9abcd9a7 (patch) | |
tree | fd1f4d5bfa5ef599a8fee1e89c6713271342229a /bcache-key.c | |
parent | f3a8d548376295279d2d27fda5764adbe377c55b (diff) |
finish ripping out libnih
Diffstat (limited to 'bcache-key.c')
-rw-r--r-- | bcache-key.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/bcache-key.c b/bcache-key.c index cac09482..3cd6d09c 100644 --- a/bcache-key.c +++ b/bcache-key.c @@ -2,8 +2,6 @@ #include <unistd.h> #include <keyutils.h> #include <uuid/uuid.h> -#include <nih/command.h> -#include <nih/option.h> #include "bcache.h" #include "libbcache.h" @@ -11,11 +9,6 @@ int cmd_unlock(int argc, char *argv[]) { - NihOption opts[] = { - NIH_OPTION_LAST - }; - char **args = bch_nih_init(argc, argv, opts); - struct bcache_disk_key disk_key; struct bcache_key key; struct cache_sb *sb; @@ -23,10 +16,10 @@ int cmd_unlock(int argc, char *argv[]) char uuid[40]; char description[60]; - if (!args[0] || args[1]) + if (argc != 2) die("please supply a single device"); - sb = bcache_super_read(args[0]); + sb = bcache_super_read(argv[1]); if (!CACHE_SET_ENCRYPTION_KEY(sb)) die("filesystem is not encrypted"); |