cli: print reader name as part of status command

This commit is contained in:
Tony Arcieri
2019-12-10 08:36:44 -08:00
parent 26c777b6ec
commit 08897ec7c9
4 changed files with 13 additions and 5 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ impl ReadersCmd {
for (i, reader) in readers_iter.enumerate() {
let name = reader.name();
let mut yubikey = match reader.open() {
let yubikey = match reader.open() {
Ok(yk) => yk,
Err(_) => continue,
};
+1
View File
@@ -19,6 +19,7 @@ impl StatusCmd {
let mut s = STDOUT.lock();
s.reset().unwrap();
self.attr(&mut s, "name", yk.name()).unwrap();
self.attr(&mut s, "version", yk.version()).unwrap();
self.attr(&mut s, "serial", yk.serial()).unwrap();