From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roger Pau Monne Subject: Re: [PATCH 7/9] hotplug/NetBSD: check type of file to attach from params Date: Tue, 17 Jul 2012 17:35:49 +0100 Message-ID: <50059465.6040807@citrix.com> References: <1342002232-75531-1-git-send-email-roger.pau@citrix.com> <1342002232-75531-8-git-send-email-roger.pau@citrix.com> <20485.36217.934017.194547@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20485.36217.934017.194547@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: Christoph Egger , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org Ian Jackson wrote: > Roger Pau Monne writes ("[PATCH 7/9] hotplug/NetBSD: check type of file to attach from params"): >> xend used to set the xenbus backend entry "type" to either "phy" or >> "file", but now libxl sets it to "phy" for both file and block device. >> We have to manually check for the type of the "param" filed in order >> to detect if we are trying to attach a file or a block device. > > This sounds and looks plausible but what if the type is something > else ? According to the checks we perform in libxl, it can't be anything else, but it might be good to add an exit 1 if it's neither 'phy' nor 'file'.