summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-11-06 10:17:18 -0500
committerDave Reisner <dreisner@archlinux.org>2012-11-06 10:18:10 -0500
commit8db9d8c2a4ef9806c286e258f9932a0972dc2375 (patch)
tree5230559e9c701a7b2e6445f65129b44d14dfcbc3 /src
parente4f44e734c4f397ee5e7ba3270e014a8ae0043dd (diff)
cryptsetup: fix inverted comparison in pass_volume_key
Diffstat (limited to 'src')
-rw-r--r--src/cryptsetup/cryptsetup.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c
index e8ba3f02a3..56a3b50974 100644
--- a/src/cryptsetup/cryptsetup.c
+++ b/src/cryptsetup/cryptsetup.c
@@ -468,7 +468,8 @@ int main(int argc, char *argv[]) {
opt_keyfile_size,
&params);
- pass_volume_key = !!hash;
+ /* hash == NULL implies the user passed "plain" */
+ pass_volume_key = (hash == NULL);
}
if (k < 0) {