gpg: Print a new FAILURE status after most commands.
authorWerner Koch <wk@gnupg.org>
Tue, 25 Aug 2015 07:03:31 +0000 (09:03 +0200)
committerWerner Koch <wk@gnupg.org>
Tue, 25 Aug 2015 13:26:33 +0000 (15:26 +0200)
commit9cdff09743c473a12359bfdb914578ede0e4e3e2
treeecad07063ec0abab01e9e29eca601d7ee33ef5ee
parent348a6ebb63523305ce9f47d0f3e8a9086c338fed
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>
common/status.h
doc/DETAILS
g10/call-agent.c
g10/cpr.c
g10/gpg.c
g10/main.h