From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54830) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TK1Jm-0002w0-BO for qemu-devel@nongnu.org; Fri, 05 Oct 2012 02:23:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TK1Jl-0000ms-Bc for qemu-devel@nongnu.org; Fri, 05 Oct 2012 02:23:26 -0400 Received: from mail-wi0-f175.google.com ([209.85.212.175]:41118) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TK1Jl-0000mo-41 for qemu-devel@nongnu.org; Fri, 05 Oct 2012 02:23:25 -0400 Received: by mail-wi0-f175.google.com with SMTP id hq4so101344wib.10 for ; Thu, 04 Oct 2012 23:23:24 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <506E7CD8.7030409@redhat.com> Date: Fri, 05 Oct 2012 08:23:20 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1349275025-5093-1-git-send-email-pbonzini@redhat.com> <1349275025-5093-6-git-send-email-pbonzini@redhat.com> <20121004150630.552307ed@doriath.home> In-Reply-To: <20121004150630.552307ed@doriath.home> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 05/18] migration: avoid using error_is_set List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: qemu-devel@nongnu.org Il 04/10/2012 20:06, Luiz Capitulino ha scritto: >> > + if (ret < 0 || local_err) { >> > + if (!local_err) { >> > + error_set_errno(errp, -ret, QERR_UNDEFINED_ERROR); > Two problems here. First, ret usually is not -errno. If we really want to > use it here (I think this is great improvement) than we have to fix the > functions called by qmp_migrate() first. Yes, it is only -errno for migration-unix.c, but anyway... > The other problem is just this will produce a weird error message, it's > better to do s/QERR_UNDEFINED_ERROR/"migration has failed". > ... both problems are fixed later in the series when ret is eliminated. Paolo