[Top][All Lists]

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

Re: [Qemu-devel] [PATCH 04/14] qdev: take ownership of id pointer

From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH 04/14] qdev: take ownership of id pointer
Date: Mon, 19 Sep 2011 09:34:12 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20110904 Red Hat/3.1.14-1.el6_1 Thunderbird/3.1.14

On 09/16/11 18:00, Anthony Liguori wrote:
qdev has this quirk that it owns a seemingly arbitrary QemuOpts pointer.  That's
because qdev expects a static string for the id (which really makes no sense
since ids are supposed to be provided by the user).  Instead of managing just
the id pointer, we currently take ownership of the entire QemuOpts structure
that was used to create the device just to keep the name around.

FYI: Keeping the pointer to the QemuOpts has one more reason: It will free the QemuOpts on hot-unplug, which is needed to free the id from QemuOpts point of view, which in turn allows to re-use the id when hot-plugging the same (or another) device later on.


reply via email to

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