From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbET2-0006uq-Lu for qemu-devel@nongnu.org; Thu, 26 Mar 2015 16:33:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YbESy-0002TO-Py for qemu-devel@nongnu.org; Thu, 26 Mar 2015 16:33:28 -0400 Received: from mail-wi0-x231.google.com ([2a00:1450:400c:c05::231]:36765) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbESy-0002TB-FS for qemu-devel@nongnu.org; Thu, 26 Mar 2015 16:33:24 -0400 Received: by wibg7 with SMTP id g7so3317694wib.1 for ; Thu, 26 Mar 2015 13:33:23 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <55146D0F.6040309@redhat.com> Date: Thu, 26 Mar 2015 21:33:19 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1427388174-30915-1-git-send-email-imammedo@redhat.com> In-Reply-To: <1427388174-30915-1-git-send-email-imammedo@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] fix assertion in "info memory-devices" if memdev isn't accessible List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov , qemu-devel@nongnu.org Cc: lma@suse.com, afaerber@suse.de, lcapitulino@redhat.com On 26/03/2015 17:42, Igor Mammedov wrote: > + mdevid = object_property_get_str(OBJECT(dimm->hostmem), "id", > + &error_abort); > + mdevpath = g_strdup_printf("/objects/%s", mdevid); > + g_free(mdevid); > + mdev = object_resolve_path_type(mdevpath, TYPE_MEMORY_BACKEND, > + NULL); You can add a backend with id xyz, remove it, and add another with the same id, right? I think the can_be_deleted solution is better and not more invasive, even for 2.3. Paolo