From: Ian Campbell Subject: Re: [PATCH 1/2] libxl: move check for existence of qemuu device model Date: Sat, 2 Mar 2013 03:56:41 +0000 Message-ID: <1362196601.4198.33.camel@hastur.hellion.org.uk> References: <1359027839.17440.130.camel@zakaz.uk.xensource.com> <1362159712-26589-2-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1362159712-26589-2-git-send-email-ian.jackson@eu.citrix.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: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Fri, 2013-03-01 at 17:41 +0000, Ian Jackson wrote: > + if (b_info->device_model_version > + == LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN) { > const char *dm; > int rc; > > - b_info->device_model_version = > - LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN; > dm = libxl__domain_device_model(gc, b_info); > rc = access(dm, X_OK); > if (rc < 0) { > /* qemu-xen unavailable, use qemu-xen-traditional */ > if (errno == ENOENT) { > LIBXL__LOG_ERRNO(CTX, XTL_VERBOSE, "qemu-xen is unavailable" > - ", use qemu-xen-traditional instead"); > + ", use qemu-xen-traditional instead"); > b_info->device_model_version = > LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL; After the following change (in 2/2) won't this stat potentially be checking for the qemu-xen-trad binaries, which makes the error message somewhat confusing and also makes the fallback unhelpful. On a related note we could do with stating the device model even in the case where the user has specified device_model_version explicitly, to give better error reporting in that case too. Ian.