diff options
author | Daniel Mueller <deso@posteo.net> | 2018-12-27 20:03:47 -0800 |
---|---|---|
committer | Daniel Mueller <deso@posteo.net> | 2018-12-27 20:03:47 -0800 |
commit | c3b9df0dfa9ef2de2a800c4fbc5880a49da0d9bb (patch) | |
tree | 9bac2d47a56604becc27543c56fd8343317d9660 /nitrocli/src/commands.rs | |
parent | 0148d954b1ea3105696e9958152b679997d9be86 (diff) | |
download | nitrocli-c3b9df0dfa9ef2de2a800c4fbc5880a49da0d9bb.tar.gz nitrocli-c3b9df0dfa9ef2de2a800c4fbc5880a49da0d9bb.tar.bz2 |
Make 'open' and 'close' subcommands of new 'storage' command
Upon their inception, the 'open' and 'close' commands were pretty much
the only relevant commands the program provided and it made sense to
have them reside in the root namespace. By now we support more commands
and have started to structure them in a more hierarchical fashion.
To go with the flow, this change introduces a new 'storage' command and
makes the existing 'open' and 'close' commands subcommands of it. We
chose the name 'storage' (over, say, 'volume') because we plan to move
the printing of the storage related status from the 'status' root level
command into a subcommand within 'storage'.
Diffstat (limited to 'nitrocli/src/commands.rs')
-rw-r--r-- | nitrocli/src/commands.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nitrocli/src/commands.rs b/nitrocli/src/commands.rs index 9aef2de..fdfe049 100644 --- a/nitrocli/src/commands.rs +++ b/nitrocli/src/commands.rs @@ -243,7 +243,7 @@ pub fn status() -> Result<()> { } /// Open the encrypted volume on the nitrokey. -pub fn open() -> Result<()> { +pub fn storage_open() -> Result<()> { let device = get_storage_device()?; try_with_passphrase( pinentry::PinType::User, @@ -258,7 +258,7 @@ extern "C" { } /// Close the previously opened encrypted volume. -pub fn close() -> Result<()> { +pub fn storage_close() -> Result<()> { // Flush all filesystem caches to disk. We are mostly interested in // making sure that the encrypted volume on the nitrokey we are // about to close is not closed while not all data was written to |