From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NwELL-0006Sa-2v for qemu-devel@nongnu.org; Mon, 29 Mar 2010 08:45:23 -0400 Received: from [140.186.70.92] (port=57144 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NwELJ-0006RE-GL for qemu-devel@nongnu.org; Mon, 29 Mar 2010 08:45:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NwELI-0003RB-0j for qemu-devel@nongnu.org; Mon, 29 Mar 2010 08:45:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:25561) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NwELH-0003Qw-Pf for qemu-devel@nongnu.org; Mon, 29 Mar 2010 08:45:19 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o2TCjFWR018742 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 29 Mar 2010 08:45:15 -0400 From: Markus Armbruster References: <1269367641-6241-1-git-send-email-armbru@redhat.com> <1269367641-6241-4-git-send-email-armbru@redhat.com> <20100324164018.713345f6@redhat.com> <20100325144921.05e4a27c@redhat.com> <20100326093147.235772e1@redhat.com> Date: Mon, 29 Mar 2010 14:38:35 +0200 In-Reply-To: <20100326093147.235772e1@redhat.com> (Luiz Capitulino's message of "Fri, 26 Mar 2010 09:31:47 -0300") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [Qemu-devel] Re: [PATCH 3/3] monitor: Convert do_migrate() to QError List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: qemu-devel@nongnu.org Luiz Capitulino writes: > On Thu, 25 Mar 2010 20:30:33 +0100 > Markus Armbruster wrote: > >> Luiz Capitulino writes: >> >> > On Thu, 25 Mar 2010 18:37:25 +0100 >> > Markus Armbruster wrote: >> > >> > [...] >> > >> >> >> @@ -86,12 +86,13 @@ int do_migrate(Monitor *mon, const QDict *qdict, QObject **ret_data) >> >> >> (int)qdict_get_int(qdict, "inc")); >> >> >> #endif >> >> >> } else { >> >> >> - monitor_printf(mon, "unknown migration protocol: %s\n", uri); >> >> >> + qerror_report(QERR_INVALID_PARAMETER, "uri"); >> >> >> return -1; >> >> >> } >> >> >> >> >> >> if (s == NULL) { >> >> >> - monitor_printf(mon, "migration failed\n"); >> >> >> + /* TODO push error reporting into the FOO_start_outgoing_migration() */ >> >> >> + qerror_report(QERR_MIGRATION_FAILED); >> >> >> return -1; >> >> >> } >> >> > >> >> > I think this one is no better than the automatic UndefinedError >> >> > which is going to be triggered. I would only touch this when/if >> >> > we get the migration functions converted. >> >> >> >> I feel it is a bit better, because: >> >> >> >> * It doesn't dilute the nice "this is a bug, and I should report it" >> >> property of UndefinedError. >> >> >> >> * It avoids the "returned failure but did not pass an error" message. >> >> Minor, because it's under CONFIG_DEBUG_MONITOR. >> > >> > But this is exactly what we want because having QERR_MIGRATION_FAILED >> > there doesn't fix the problems those warnings are making us aware of. >> >> Except we are already aware of the problem, and additional warnings are >> just noise. > > Our memory is not the best place for it, not only because we can forget, > but also because it's limited on you and me. > > Anyone who enables QMP's debugging support should be able to know what's > there to be done. That's what TODO comments are for.