aboutsummaryrefslogtreecommitdiff
path: root/NK_C_API.h
diff options
context:
space:
mode:
authorRobin Krahl <me@robin-krahl.de>2019-01-14 19:03:53 +0100
committerRobin Krahl <me@robin-krahl.de>2019-01-14 19:03:53 +0100
commitbe6fd465ded13b4dd5b8ea10834a296efb8f1424 (patch)
tree886f7cff72ce1d13c4ce1a598bbc1b259d313ff3 /NK_C_API.h
parent1f3da5c76acb20b2183ac52373ed3b0b63e1151e (diff)
downloadlibnitrokey-be6fd465ded13b4dd5b8ea10834a296efb8f1424.tar.gz
libnitrokey-be6fd465ded13b4dd5b8ea10834a296efb8f1424.tar.bz2
Return -2 if an error occured in NK_get_progress_bar_valuefix/progress-bar-error
NK_get_progress_bar_value returns the progress value from 0 to 100 or -1 if there is no pending operation. In the previous implementation, it also returned zero if an error occurred, making it impossible to distinguish progress zero and an error. Therefore, we change the return value to -2 if an error occured.
Diffstat (limited to 'NK_C_API.h')
-rw-r--r--NK_C_API.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/NK_C_API.h b/NK_C_API.h
index b1bdf1e..43e5631 100644
--- a/NK_C_API.h
+++ b/NK_C_API.h
@@ -747,7 +747,8 @@ extern "C" {
/**
* Get progress value of current long operation.
* Storage only
- * @return int in range 0-100 or -1 if device is not busy
+ * @return int in range 0-100 or -1 if device is not busy or -2 if an
+ * error occured
*/
NK_C_API int NK_get_progress_bar_value();