From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Julien Desfossez <jdesfossez@efficios.com>
Cc: lttng-dev@lists.lttng.org
Subject: Re: [LTTNG-TOOLS 2.3 PATCH 1/2] Fix: return code of get_subbuff on metadata stream
Date: Mon, 5 Aug 2013 15:06:55 -0400 [thread overview]
Message-ID: <20130805190655.GA18891__28684.8407741219$1375729674$gmane$org@Krystal> (raw)
In-Reply-To: <1375716439-24407-1-git-send-email-jdesfossez@efficios.com>
* Julien Desfossez (jdesfossez@efficios.com) wrote:
> On error, the ioctl kernctl_get_next_subbuf returns -1 and sets errno to
> a meaningful value but we were ignoring it. It was causing
> lttng_kconsumer_read_subbuffer to return -1 (error) instead of -EAGAIN
> (normal).
Merging an updated patch instead:
commit 56591bac20c0f3b728c95d92702d243de838bdc4
Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Date: Mon Aug 5 13:46:58 2013 -0400
Fix: kernel ctl error codes are based on errno
ioctl returns -1, and error codes are based on -errno.
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thanks,
Mathieu
>
> Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
> ---
> src/common/kernel-consumer/kernel-consumer.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/common/kernel-consumer/kernel-consumer.c b/src/common/kernel-consumer/kernel-consumer.c
> index 3086abe..f8978d2 100644
> --- a/src/common/kernel-consumer/kernel-consumer.c
> +++ b/src/common/kernel-consumer/kernel-consumer.c
> @@ -851,7 +851,7 @@ ssize_t lttng_kconsumer_read_subbuffer(struct lttng_consumer_stream *stream,
> /* Get the next subbuffer */
> err = kernctl_get_next_subbuf(infd);
> if (err != 0) {
> - ret = err;
> + ret = -errno;
> /*
> * This is a debug message even for single-threaded consumer,
> * because poll() have more relaxed criterions than get subbuf,
> --
> 1.7.10.4
>
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
next prev parent reply other threads:[~2013-08-05 19:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1375716439-24407-1-git-send-email-jdesfossez@efficios.com>
2013-08-05 15:27 ` [LTTNG-TOOLS 2.3 PATCH 2/2] Test: enable kernel events after start Julien Desfossez
2013-08-05 19:06 ` Mathieu Desnoyers [this message]
[not found] ` <1375716439-24407-2-git-send-email-jdesfossez@efficios.com>
2013-08-05 19:07 ` Mathieu Desnoyers
2013-08-05 15:27 [LTTNG-TOOLS 2.3 PATCH 1/2] Fix: return code of get_subbuff on metadata stream Julien Desfossez
[not found] <1375641986-2278-1-git-send-email-jdesfossez@efficios.com>
2013-08-04 20:34 ` Mathieu Desnoyers
-- strict thread matches above, loose matches on Subject: below --
2013-08-04 18:46 Julien Desfossez
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='20130805190655.GA18891__28684.8407741219$1375729674$gmane$org@Krystal' \
--to=mathieu.desnoyers@efficios.com \
--cc=jdesfossez@efficios.com \
--cc=lttng-dev@lists.lttng.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.