aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/geniza-drive.rs21
1 files changed, 8 insertions, 13 deletions
diff --git a/src/bin/geniza-drive.rs b/src/bin/geniza-drive.rs
index dae8294..32104e4 100644
--- a/src/bin/geniza-drive.rs
+++ b/src/bin/geniza-drive.rs
@@ -1,7 +1,6 @@
// Free Software under GPL-3.0, see LICENSE
// Copyright 2017 Bryan Newbold
-#[macro_use]
extern crate clap;
extern crate env_logger;
#[macro_use]
@@ -34,20 +33,12 @@ fn run() -> Result<()> {
SubCommand::with_name("log")
.about("History of additions/deletions from this dat")
)
+ .subcommand(
+ SubCommand::with_name("verify")
+ .about("Checks signatures et al")
+ )
.get_matches();
-/*
- mode: ::std::option::Option<u32>,
- uid: ::std::option::Option<u32>,
- gid: ::std::option::Option<u32>,
- size: ::std::option::Option<u64>,
- blocks: ::std::option::Option<u64>,
- offset: ::std::option::Option<u64>,
- byteOffset: ::std::option::Option<u64>,
- mtime: ::std::option::Option<u64>,
- ctime: ::std::option::Option<u64>,
-*/
-
let dir = Path::new(matches.value_of("dat-dir").unwrap());
match matches.subcommand() {
("ls", Some(_subm)) => {
@@ -75,6 +66,10 @@ fn run() -> Result<()> {
}
}
}
+ ("verify", Some(_subm)) => {
+ let mut drive = DatDrive::open(dir, false)?;
+ println!("{:?}", drive.verify());
+ }
_ => {
println!("Missing or unimplemented command!");
println!("{}", matches.usage());