Received: from eggs.gnu.org ([2001:4830:134:3::10]:43999) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WJLKH-0000NB-SH for qemu-devel@nongnu.org; Fri, 28 Feb 2014 06:09:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WJLKB-0003oU-TY for qemu-devel@nongnu.org; Fri, 28 Feb 2014 06:09:57 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44755) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WJLKB-0003oK-Kv for qemu-devel@nongnu.org; Fri, 28 Feb 2014 06:09:51 -0500 Date: Fri, 28 Feb 2014 11:39:58 +0100 From: Stefan Hajnoczi Message-ID: <20140228103958.GF30385@stefanha-thinkpad.redhat.com> References: <1392994018-7786-1-git-send-email-stefanha@redhat.com> <1392994018-7786-4-git-send-email-stefanha@redhat.com> <20140226110019.07728967@nial.usersys.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140226110019.07728967@nial.usersys.redhat.com> Subject: Re: [Qemu-devel] [PATCH v4 3/6] iothread: add I/O thread object List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: Kevin Wolf , Paolo Bonzini , Fam Zheng , qemu-devel@nongnu.org, Michael Roth On Wed, Feb 26, 2014 at 11:00:19AM +0100, Igor Mammedov wrote: > On Fri, 21 Feb 2014 15:46:55 +0100 > Stefan Hajnoczi wrote: > > +char *iothread_get_id(IOThread *iothread) > > +{ > > + /* The last path component is the identifier */ > > + char *path = object_get_canonical_path(OBJECT(iothread)); > > + char *id = g_strdup(&path[sizeof(IOTHREADS_PATH)]); > > + g_free(path); > > + return id; > > +} > it seems to be a more generic issue, i.e. QOM object wanting to know its > name. I've did something similar for memory_backend except of cutting > of parent's path. > Could we make and use a more generic accessor for object name? Yes, I think we can do it in object.c. Will send another revision. Stefan