On Wed, Feb 26, 2014 at 11:00:19AM +0100, Igor Mammedov wrote: > On Fri, 21 Feb 2014 15:46:55 +0100 > Stefan Hajnoczi <stefa...@redhat.com> 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