From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47979) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxAnN-0005c6-TZ for qemu-devel@nongnu.org; Thu, 20 Oct 2016 06:41:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bxAnK-0006Zu-28 for qemu-devel@nongnu.org; Thu, 20 Oct 2016 06:41:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34820) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bxAnJ-0006ZC-Sp for qemu-devel@nongnu.org; Thu, 20 Oct 2016 06:41:53 -0400 Date: Thu, 20 Oct 2016 11:41:49 +0100 From: "Dr. David Alan Gilbert" Message-ID: <20161020104148.GD2039@work-vm> References: <20161017185126.GD12934@work-vm> <20161017191550.GG12934@work-vm> <87h98a3wyd.fsf@dusky.pond.sub.org> <20161018095400.GD2190@work-vm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] qemu master tests/vmstate prints "Failed to load simple/primitive:b_1" etc List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Markus Armbruster , Peter Maydell , QEMU Developers * Paolo Bonzini (pbonzini@redhat.com) wrote: > > > On 18/10/2016 11:54, Dr. David Alan Gilbert wrote: > > I've not quite figured it out but we're linked against the stubs/ monitor > > code rather than the real monitor code; and the stubs monitor_vprintf discards > > and the stubs monitor_cur_is_qmp() always returns false, so to silence things > > we just have to make cur_mon non-NULL. > > Unfortunately cur_mon is of type Monitor * and Monitor isn't defined publicly, > > so we can't know it's size. The following evil hack does silence things > > for anyone desperate, but I do need to find a neater way; perhaps the right > > thing is just to link against monitor and create a dummy "null" chardev as you > > say. > > If error_printf/error_vprintf are to a separate file, then stubs/ can be > changed to use vfprintf unconditionally. Moving code out of util/qemu-error.c just so they can be stubbed separately seems a little odd. > And then I wonder what we actually use cur_mon for, perhaps with this > change we can remove stubs/mon*. I've just posted a slightly cleaner version of that nasty hack that gives a value to assign to cur_mon. Dave > Paolo -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK