From: Wei Liu Subject: Re: [PATCH v2 for-4.6] libxl: handle read-only drives with qemu-xen Date: Wed, 16 Sep 2015 15:14:24 +0100 Message-ID: <20150916141424.GB20876@zion.uk.xensource.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZcDTo-0004Ca-6p for xen-devel@lists.xenproject.org; Wed, 16 Sep 2015 14:14:36 +0000 Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: M A Young Cc: Ian.Campbell@eu.citrix.com, xen-devel@lists.xenproject.org, wei.liu2@citrix.com, Ian.Jackson@eu.citrix.com, Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Tue, Sep 15, 2015 at 06:53:53PM +0100, M A Young wrote: > On Tue, 15 Sep 2015, Stefano Stabellini wrote: > > > } else { > > + if (!disks[i].readwrite) { > > + LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "qemu-xen doesn't support read-only disk drivers"); > > + return ERROR_INVAL; > > + } > > + > > Is ERROR_INVAL the right error to return? I get > > libxl_dm.c: In function 'libxl__build_device_model_args_new': > libxl_dm.c:807:28: error: return makes pointer from integer without a cast > [-Werror=int-conversion] > return ERROR_INVAL; > ^ > cc1: all warnings being treated as errors > > when I try to build xen with the proposed patch. NULL is returned when > there is a problem in other places in this function. > I don't follow. The function in question is libxl__build_device_model_args_new, which returns an integer. And there are other places in that function that return ERROR_*. Do I miss anything? Wei. > Michael Young