From: Milan Broz Date: Mon, 28 Sep 2009 18:50:05 +0000 (+0000) Subject: ... and previous reintroduce it as debug message. X-Git-Tag: upstream/1.6~710 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=93796f4036f8463bf8a60dbf6bd8946dc103a414;p=platform%2Fupstream%2Fcryptsetup.git ... and previous reintroduce it as debug message. (The problem is when repeated passphrase input is tried on pipe, it should not show "error reading passphrase", because it fails for the second reading attepmt anyway but should retain error message saying "no key with this passpharase...") git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@117 36d66b0a-2a48-0410-832c-cd162a569da5 --- diff --git a/lib/utils.c b/lib/utils.c index c498a60..d23619e 100644 --- a/lib/utils.c +++ b/lib/utils.c @@ -493,8 +493,10 @@ void get_key(char *prompt, char **key, unsigned int *passLen, int key_size, if(key_file) close(fd); /* Fail if piped input dies reading nothing */ - if(!i && !regular_file) + if(!i && !regular_file) { + log_dbg("Error reading passphrase."); goto out_err; + } pass[i] = 0; *key = pass; *passLen = i;