seccomp: report more useful errors from seccomp
commit035121d23abcafcc2f346627d48132073d2e71d7
authorDaniel P. Berrangé <berrange@redhat.com>
Wed, 27 Mar 2019 09:47:28 +0000 (27 10:47 +0100)
committerEduardo Otubo <otubo@redhat.com>
Wed, 27 Mar 2019 12:11:38 +0000 (27 13:11 +0100)
treeb4022a2939cab3bbb41e77cbfe9bf2f1f58a2e15
parent9a1565a03b79d80b236bc7cc2dbce52a2ef3a1b8
seccomp: report more useful errors from seccomp

Most of the seccomp functions return errnos as a negative return
value. The code is currently ignoring these and reporting a generic
error message for all seccomp failure scenarios making debugging
painful. Report a more precise error from each failed call and include
errno if it is available.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Eduardo Otubo <otubo@redhat.com>
qemu-seccomp.c