From: Wen Congyang <wency@cn.fujitsu.com>
To: Ross Lagerwall <ross.lagerwall@citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Ian Campbell <Ian.Campbell@citrix.com>,
xen devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH] tools/libxl: Fix the errno
Date: Fri, 20 Mar 2015 16:39:41 +0800 [thread overview]
Message-ID: <550BDCCD.9040701@cn.fujitsu.com> (raw)
In-Reply-To: <550BD988.7090209@citrix.com>
On 03/20/2015 04:25 PM, Ross Lagerwall wrote:
> On 03/20/2015 08:17 AM, Wen Congyang wrote:
>> After commit 6d896e13, we should pass -errno on read failure.
>>
>> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
>> ---
>> tools/libxl/libxl_aoutils.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/tools/libxl/libxl_aoutils.c b/tools/libxl/libxl_aoutils.c
>> index 0d4c8af..b93f0e4 100644
>> --- a/tools/libxl/libxl_aoutils.c
>> +++ b/tools/libxl/libxl_aoutils.c
>> @@ -262,7 +262,7 @@ static void datacopier_readable(libxl__egc *egc, libxl__ev_fd *ev,
>> assert(ferror(dc->log));
>> assert(errno);
>> LOGE(ERROR, "error logging %s", dc->copywhat);
>> - datacopier_callback(egc, dc, 0, errno);
>> + datacopier_callback(egc, dc, 0, -errno);
>> return;
>> }
>> }
>>
>
> Acked-by: Ross Lagerwall <ross.lagerwall@citrix.com>
>
I forgot another place, it should be:
diff --git a/tools/libxl/libxl_aoutils.c b/tools/libxl/libxl_aoutils.c
index 0d4c8af..965afc3 100644
--- a/tools/libxl/libxl_aoutils.c
+++ b/tools/libxl/libxl_aoutils.c
@@ -249,7 +249,7 @@ static void datacopier_readable(libxl__egc *egc, libxl__ev_fd *ev,
if (errno == EWOULDBLOCK) break;
LOGE(ERROR, "error reading %s during copy of %s",
dc->readwhat, dc->copywhat);
- datacopier_callback(egc, dc, 0, errno);
+ datacopier_callback(egc, dc, 0, -errno);
return;
}
if (r == 0) {
@@ -262,7 +262,7 @@ static void datacopier_readable(libxl__egc *egc, libxl__ev_fd *ev,
assert(ferror(dc->log));
assert(errno);
LOGE(ERROR, "error logging %s", dc->copywhat);
- datacopier_callback(egc, dc, 0, errno);
+ datacopier_callback(egc, dc, 0, -errno);
return;
}
}
next prev parent reply other threads:[~2015-03-20 8:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-20 8:17 [PATCH] tools/libxl: Fix the errno Wen Congyang
2015-03-20 8:25 ` Ross Lagerwall
2015-03-20 8:39 ` Wen Congyang [this message]
2015-03-20 11:03 ` Ian Campbell
2015-03-20 11:15 ` Ian Campbell
2015-03-20 16:02 ` Ross Lagerwall
2015-03-20 16:09 ` Ian Campbell
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=550BDCCD.9040701@cn.fujitsu.com \
--to=wency@cn.fujitsu.com \
--cc=Ian.Campbell@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=ross.lagerwall@citrix.com \
--cc=xen-devel@lists.xen.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.