From 74be24daf592f3408524081c3760ca153294d643 Mon Sep 17 00:00:00 2001 From: Daniel Mueller Date: Sat, 8 Jun 2019 11:37:04 -0700 Subject: Reword an incorrect error message This change rewords the error message that is emitted if the lock command fails. The old message was incorrectly stating a problem with the retrieval of the device's status. While at it, also slightly rephrase the description for the hidden command to be more in line with that of the other storage commands, and replace lowercase 'nitrokey' with a capitalized one in a few comments. --- nitrocli/src/args.rs | 6 +++--- nitrocli/src/commands.rs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/nitrocli/src/args.rs b/nitrocli/src/args.rs index 765da89..16ff314 100644 --- a/nitrocli/src/args.rs +++ b/nitrocli/src/args.rs @@ -229,7 +229,7 @@ fn parse( result } -/// Inquire the status of the nitrokey. +/// Inquire the status of the Nitrokey. fn status(ctx: &mut ExecCtx<'_>, args: Vec) -> Result<()> { let mut parser = argparse::ArgumentParser::new(); parser.set_description("Prints the status of the connected Nitrokey device"); @@ -276,7 +276,7 @@ fn encrypted(ctx: &mut ExecCtx<'_>, args: Vec) -> Result<()> { subcommand.execute(ctx, subargs) } -/// Open the encrypted volume on the nitrokey. +/// Open the encrypted volume on the Nitrokey. fn encrypted_open(ctx: &mut ExecCtx<'_>, args: Vec) -> Result<()> { let mut parser = argparse::ArgumentParser::new(); parser.set_description("Opens the encrypted volume on a Nitrokey Storage"); @@ -306,7 +306,7 @@ fn hidden(ctx: &mut ExecCtx<'_>, args: Vec) -> Result<()> { let help = cmd_help!(subcommand); let mut subargs = vec![]; let mut parser = argparse::ArgumentParser::new(); - parser.set_description("Interact with a hidden volume"); + parser.set_description("Interacts with the device's hidden volume"); let _ = parser .refer(&mut subcommand) diff --git a/nitrocli/src/commands.rs b/nitrocli/src/commands.rs index 0d30bca..3cad8f1 100644 --- a/nitrocli/src/commands.rs +++ b/nitrocli/src/commands.rs @@ -361,7 +361,7 @@ pub fn reset(ctx: &mut args::ExecCtx<'_>) -> Result<()> { }) } -/// Open the encrypted volume on the nitrokey. +/// Open the encrypted volume on the Nitrokey. pub fn encrypted_open(ctx: &mut args::ExecCtx<'_>) -> Result<()> { let device = get_storage_device(ctx)?; let pin_entry = pinentry::PinEntry::from(pinentry::PinType::User, &device)?; @@ -378,7 +378,7 @@ pub fn encrypted_open(ctx: &mut args::ExecCtx<'_>) -> Result<()> { /// Close the previously opened encrypted volume. pub fn encrypted_close(ctx: &mut args::ExecCtx<'_>) -> Result<()> { // Flush all filesystem caches to disk. We are mostly interested in - // making sure that the encrypted volume on the nitrokey we are + // making sure that the encrypted volume on the Nitrokey we are // about to close is not closed while not all data was written to // it. unsafe { sync() }; @@ -493,7 +493,7 @@ pub fn config_set( pub fn lock(ctx: &mut args::ExecCtx<'_>) -> Result<()> { get_device(ctx)? .lock() - .map_err(|err| get_error("Getting Storage status failed", err)) + .map_err(|err| get_error("Could not lock the device", err)) } fn get_otp(slot: u8, algorithm: args::OtpAlgorithm, device: &T) -> Result { -- cgit v1.2.3