mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
gpg: Print a new FAILURE status after most commands.
* common/status.h (STATUS_FAILURE): New. * g10/cpr.c (write_status_failure): New. * g10/gpg.c (main): Call write_status_failure for all commands which print an error message here. * g10/call-agent.c (start_agent): Print an STATUS_ERROR if we can't set the pinentry mode. -- This status line can be used similar to the error code returned by commands send over the Assuan interface in gpgsm. We don't emit them in gpgsm because there we already have that Assuan interface to return proper error code. This change helps GPGME to return better error codes. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
348a6ebb63
commit
9cdff09743
6 changed files with 117 additions and 28 deletions
|
@ -318,9 +318,12 @@ start_agent (ctrl_t ctrl, int for_card)
|
|||
NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
xfree (tmp);
|
||||
if (rc)
|
||||
log_error ("setting pinentry mode '%s' failed: %s\n",
|
||||
str_pinentry_mode (opt.pinentry_mode),
|
||||
gpg_strerror (rc));
|
||||
{
|
||||
log_error ("setting pinentry mode '%s' failed: %s\n",
|
||||
str_pinentry_mode (opt.pinentry_mode),
|
||||
gpg_strerror (rc));
|
||||
write_status_error ("set_pinentry_mode", rc);
|
||||
}
|
||||
}
|
||||
|
||||
check_hijacking (agent_ctx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue