From: Wei Liu Subject: Re: [PATCH for 4.5] xl: Return proper error codes for block-attach and block-detach Date: Wed, 12 Nov 2014 17:35:39 +0000 Message-ID: <20141112173539.GC4309@zion.uk.xensource.com> References: <1415813493-25330-1-git-send-email-george.dunlap@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1415813493-25330-1-git-send-email-george.dunlap@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: George Dunlap Cc: Ian Jackson , Wei Liu , Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Wed, Nov 12, 2014 at 05:31:33PM +0000, George Dunlap wrote: > Return proper error codes on failure so that scripts can tell whether > the command completed properly or not. > > Signed-off-by: George Dunlap > --- > CC: Ian Campbell > CC: Ian Jackson Acked-by: Wei Liu > CC: Konrad Wilk > > Release justification: This is a bug fix. It's a fairly minor one, > but it's also a very simple one. > --- > tools/libxl/xl_cmdimpl.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c > index 3c9f146..b2abe4f 100644 > --- a/tools/libxl/xl_cmdimpl.c > +++ b/tools/libxl/xl_cmdimpl.c > @@ -6383,6 +6383,7 @@ int main_blockattach(int argc, char **argv) > > if (libxl_device_disk_add(ctx, fe_domid, &disk, 0)) { > fprintf(stderr, "libxl_device_disk_add failed.\n"); > + return 1; > } > return 0; > } > @@ -6444,6 +6445,7 @@ int main_blockdetach(int argc, char **argv) > rc = libxl_device_disk_remove(ctx, domid, &disk, 0); > if (rc) { > fprintf(stderr, "libxl_device_disk_remove failed.\n"); > + return 1; > } > libxl_device_disk_dispose(&disk); > return rc; > -- > 1.9.1