From: Stefano Stabellini Subject: Re: [PATCH] libxl: remove console 0 backend directory from xenstore on devices destroy Date: Tue, 5 Oct 2010 17:51:57 +0100 Message-ID: References: <0788bb897f692681036e.1286288426@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Return-path: In-Reply-To: <0788bb897f692681036e.1286288426@localhost.localdomain> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Campbell Cc: Ian, Campbell , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Tue, 5 Oct 2010, Ian Campbell wrote: > # HG changeset patch > # User Ian Campbell > # Date 1286288339 -3600 > # Node ID 0788bb897f692681036e33c0047e8cbb63565c35 > # Parent a2c40fa3bc6c8471e1988e445f449975cf6f3822 > libxl: remove console 0 backend directory from xenstore on devices destroy > > The first PV console device has an unusual frontend path for > historical reasons (/local/domain//console rather than > /local/domain//device/console/0). > > Therefore we need to check this additional frontend path as well as > those under /local/domain//device when tearing down all > backends or else we miss the backend for the console. > > As part of this we need to ensure that the frontend directory has a > valid link to the backend, currently this link does not exist. > > Fix this by adding libxl__device_frontend_path to return the correct > frontend path, accounting for the special case, and use it from > libxl__device_add_generic. Also add libxl__device_backend_path for > consistency. > > This also allows console 0 setup to follow essentially the same code > path as other consoles within libxl_device_console_add, reducing the > special casing required there. > > This also fixes the link from backend to frontend which until now gave > a dangling link to the normal device path instead of the exceptional > one. > applied, thanks