From a00e3f75349dc5f48abf441fd4e5c369c2e2055a Mon Sep 17 00:00:00 2001 From: Daniel Mueller Date: Mon, 27 May 2019 09:20:00 -0700 Subject: Make storage hidden subcommand a top-level command This patch marks the next step in the process of restructuring the storage command. Specifically, it promotes the storage hidden subcommand to a top-level command, hidden. --- nitrocli/src/commands.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'nitrocli/src/commands.rs') diff --git a/nitrocli/src/commands.rs b/nitrocli/src/commands.rs index d1ded11..6374611 100644 --- a/nitrocli/src/commands.rs +++ b/nitrocli/src/commands.rs @@ -389,12 +389,7 @@ pub fn storage_close(ctx: &mut args::ExecCtx<'_>) -> Result<()> { } /// Create a hidden volume. -pub fn storage_hidden_create( - ctx: &mut args::ExecCtx<'_>, - slot: u8, - start: u8, - end: u8, -) -> Result<()> { +pub fn hidden_create(ctx: &mut args::ExecCtx<'_>, slot: u8, start: u8, end: u8) -> Result<()> { let device = get_storage_device(ctx)?; let pwd_entry = pinentry::PwdEntry::from(&device)?; let pwd = if let Some(pwd) = &ctx.password { @@ -412,7 +407,7 @@ pub fn storage_hidden_create( } /// Open a hidden volume. -pub fn storage_hidden_open(ctx: &mut args::ExecCtx<'_>) -> Result<()> { +pub fn hidden_open(ctx: &mut args::ExecCtx<'_>) -> Result<()> { let device = get_storage_device(ctx)?; let pwd_entry = pinentry::PwdEntry::from(&device)?; let pwd = if let Some(pwd) = &ctx.password { @@ -434,7 +429,7 @@ pub fn storage_hidden_open(ctx: &mut args::ExecCtx<'_>) -> Result<()> { } /// Close a previously opened hidden volume. -pub fn storage_hidden_close(ctx: &mut args::ExecCtx<'_>) -> Result<()> { +pub fn hidden_close(ctx: &mut args::ExecCtx<'_>) -> Result<()> { unsafe { sync() }; get_storage_device(ctx)? -- cgit v1.2.3