From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43324) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XY39Y-0000Zd-KM for qemu-devel@nongnu.org; Sat, 27 Sep 2014 21:20:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XY39S-00041z-Dk for qemu-devel@nongnu.org; Sat, 27 Sep 2014 21:19:56 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:18049) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XY39R-00041F-QJ for qemu-devel@nongnu.org; Sat, 27 Sep 2014 21:19:50 -0400 Message-ID: <542761FA.9070704@huawei.com> Date: Sun, 28 Sep 2014 09:18:50 +0800 From: zhanghailiang MIME-Version: 1.0 References: <1411108984-4380-1-git-send-email-zhang.zhanghailiang@huawei.com> <542212C1.9050908@huawei.com> In-Reply-To: <542212C1.9050908@huawei.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v6 0/2] dump: let dump_error return error reason to caller List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: lersek@redhat.com, lcapitulino@redhat.com, luonengjun@huawei.com, peter.huangpeng@huawei.com, armbru@redhat.com Hi, Ping^2... Can anyone help reviewing this patch? Luiz? Eric? Markus? Thanks;) Best regards, zhanghailiang On 2014/9/24 8:39, zhanghailiang wrote: > Hi, > > Ping... > > Thanks, > zhanghailiang > > On 2014/9/19 14:43, zhanghailiang wrote: >> Hi, >> >> In original code, Function dump_error ignores its second parameter which contains >> error reason, it is better to return the error message to the caller. >> >> Here we use error_setg to return the error info to caller. >> And at the same time, we turn functions like write_elf64_note() to void, >> Because functions shouldn't return an error code _and_ an Error object. >> After this modification the code will be more clean. >> >> v5 -> v6 >> - Don't check *errp directly, if errp is NULL, there will be an error, >> Instead, check a local variable *local_err (Markus Armbruster) >> v4 -> v5: >> - Turn functions like write_elf64_note() to void (Luiz Capitulino) >> v3 -> v4: >> - Adjust the errp argument to the end >> - Remove trailing '.' in error messages >> v2 -> v3: >> - Drop the '\n' in the message when call dump_error(Eric Blake) >> v1 -> v2: >> - Return the error reason to the caller (Luiz Capitulino) >> >> zhanghailiang (2): >> dump: let dump_error return error info to caller >> dump: Don't return error code when return an Error object >> >> dump.c | 382 +++++++++++++++++++++++++++++++---------------------------------- >> 1 file changed, 182 insertions(+), 200 deletions(-) >> > > > > >