On 07/20/2016 05:19 PM, Mat Martineau wrote:
---
ell/key.c | 43 ++++++++++++++++++++++++++++++++++++-------
1 file changed, 36 insertions(+), 7 deletions(-)
diff --git a/ell/key.c b/ell/key.c
index 6117e31..60602f9 100644
--- a/ell/key.c
+++ b/ell/key.c
@@ -64,43 +64,72 @@ static const char * const key_type_names[] = {
static long kernel_add_key(const char *type, const char *description,
const void *payload, size_t len, int32_t keyring)
{
- return syscall(__NR_add_key, type, description, payload, len, keyring);
+ long result;
+
+ result = syscall(__NR_add_key, type, description, payload, len,
+ keyring);
+
+ return result >= 0 ? result : -errno;
}
I get lots of errno undeclared errors after this patch
Looks like #include <errno.h> is missing.
Regards,
-Denis