diff options
author | Daniel Mueller <deso@posteo.net> | 2019-05-27 09:20:00 -0700 |
---|---|---|
committer | Daniel Mueller <deso@posteo.net> | 2019-05-27 09:20:00 -0700 |
commit | a00e3f75349dc5f48abf441fd4e5c369c2e2055a (patch) | |
tree | d98523914dfd7b96d97a6252973e7a7df8720678 /nitrocli/src/commands.rs | |
parent | d35cdf7f0a9822f73f4e1d18494350840de2a421 (diff) | |
download | nitrocli-a00e3f75349dc5f48abf441fd4e5c369c2e2055a.tar.gz nitrocli-a00e3f75349dc5f48abf441fd4e5c369c2e2055a.tar.bz2 |
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.
Diffstat (limited to 'nitrocli/src/commands.rs')
-rw-r--r-- | nitrocli/src/commands.rs | 11 |
1 files changed, 3 insertions, 8 deletions
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)? |