All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ell@lists.01.org
Subject: Re: [PATCH 2/4] key: Consistently return errno from syscall wrappers
Date: Thu, 21 Jul 2016 15:19:11 -0500	[thread overview]
Message-ID: <57912E3F.2070203@gmail.com> (raw)
In-Reply-To: <20160720221928.24488-2-mathew.j.martineau@linux.intel.com>

[-- Attachment #1: Type: text/plain, Size: 862 bytes --]

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

  reply	other threads:[~2016-07-21 20:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-20 22:19 [PATCH 1/4] key: Update restrict method name Mat Martineau
2016-07-20 22:19 ` [PATCH 2/4] key: Consistently return errno from syscall wrappers Mat Martineau
2016-07-21 20:19   ` Denis Kenzior [this message]
2016-07-21 21:23     ` Mat Martineau
2016-07-20 22:19 ` [PATCH 3/4] key: Add key-based asymmetric crypto operations Mat Martineau
2016-07-22 19:35   ` Denis Kenzior
2016-07-22 21:55     ` Mat Martineau
2016-07-20 22:19 ` [PATCH 4/4] unit: Add tests for key-based asymmetric crypto Mat Martineau
2016-07-21 20:19 ` [PATCH 1/4] key: Update restrict method name Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57912E3F.2070203@gmail.com \
    --to=denkenz@gmail.com \
    --cc=ell@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.