gpg: Print a new FAILURE status after most commands.
authorWerner Koch <wk@gnupg.org>
Tue, 8 Sep 2015 13:29:59 +0000 (15:29 +0200)
committerWerner Koch <wk@gnupg.org>
Tue, 8 Sep 2015 13:31:51 +0000 (15:31 +0200)
commit77f2964b9602fb463738d14bd957d967a0c1b5ac
treeb48ef522574319ee29f3a6d084b27732cb1767ff
parent0b01bb7f253fc1f9422e59dc475fa86854b46f69
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.
--

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.

(backported from master 9cdff09743c473a12359bfdb914578ede0e4e3e2)

Signed-off-by: Werner Koch <wk@gnupg.org>
common/status.h
g10/cpr.c
g10/gpg.c
g10/main.h