summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nitrocli/Cargo.lock1
-rw-r--r--nitrocli/Cargo.toml4
-rw-r--r--nitrocli/src/commands.rs7
3 files changed, 7 insertions, 5 deletions
diff --git a/nitrocli/Cargo.lock b/nitrocli/Cargo.lock
index abbf84d..ae75d07 100644
--- a/nitrocli/Cargo.lock
+++ b/nitrocli/Cargo.lock
@@ -54,6 +54,7 @@ name = "nitrocli"
version = "0.2.0"
dependencies = [
"argparse 0.2.2",
+ "libc 0.2.45",
"nitrokey 0.2.3",
]
diff --git a/nitrocli/Cargo.toml b/nitrocli/Cargo.toml
index f4002f4..c1c241c 100644
--- a/nitrocli/Cargo.toml
+++ b/nitrocli/Cargo.toml
@@ -45,6 +45,10 @@ incremental = false
version = "0.2.2"
path = "../argparse"
+[dependencies.libc]
+version = "0.2"
+path = "../libc"
+
[dependencies.nitrokey]
version = "0.2.1"
path = "../nitrokey"
diff --git a/nitrocli/src/commands.rs b/nitrocli/src/commands.rs
index 503a180..77981db 100644
--- a/nitrocli/src/commands.rs
+++ b/nitrocli/src/commands.rs
@@ -22,6 +22,8 @@ use std::result;
use std::time;
use std::u8;
+use libc::sync;
+
use nitrokey::ConfigureOtp;
use nitrokey::Device;
use nitrokey::GenerateOtp;
@@ -234,11 +236,6 @@ pub fn storage_open() -> Result<()> {
)
}
-#[link(name = "c")]
-extern "C" {
- fn sync();
-}
-
/// Close the previously opened encrypted volume.
pub fn storage_close() -> Result<()> {
// Flush all filesystem caches to disk. We are mostly interested in