[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC v0 4/8] object: create default canonical paths for

From: Paolo Bonzini
Subject: Re: [Qemu-devel] [RFC v0 4/8] object: create default canonical paths for orphans
Date: Wed, 13 Jun 2012 12:08:25 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0

Il 13/06/2012 11:38, Peter A. G. Crosthwaite ha scritto:
> Create a default canonical path for an object which doesnt have one. This
> is a workaround for a bug probably buried deep with qdev as objects should
> always have valid canonical paths, but the need came about with the
> petalogix_ml605_mmu platform, the ethernet and dma devices as created by
> qdev have bogus paths (apparently).

We already do this in qdev_init_nofail:

    if (!OBJECT(dev)->parent) {
        static int unattached_count = 0;
        gchar *name = g_strdup_printf("device[%d]", unattached_count++);

                                  name, OBJECT(dev), NULL);

Probably we should move this piece to a function qdev_attach, so that
you can call it before object_property_set_link.

Alternatively, we could make object_property_set_link bypass the
canonical paths and write the pointer directly, but I think this would
be bad.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]