From owner-svn-src-head@freebsd.org Fri Jul 17 19:10:44 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60E3E9A4E17; Fri, 17 Jul 2015 19:10:44 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 467FB1485; Fri, 17 Jul 2015 19:10:44 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6HJAiTo037829; Fri, 17 Jul 2015 19:10:44 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6HJAi0V037828; Fri, 17 Jul 2015 19:10:44 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201507171910.t6HJAi0V037828@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 17 Jul 2015 19:10:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285658 - head/usr.sbin/ctladm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2015 19:10:44 -0000 Author: bapt Date: Fri Jul 17 19:10:43 2015 New Revision: 285658 URL: https://svnweb.freebsd.org/changeset/base/285658 Log: make ctdladm(8) return 0 is everything was ok. retval is used to test the return of XML_Parse function which is ok if 1 is returned and retval it directly returned to the main function and used as an exit value. if all the parsing part is done reset retval to 0 so that the command return 0 if everything ok Differential Revision: https://reviews.freebsd.org/D3102 Reviewed by: trasz MFC after: 3 days Sponsored by: gandi.net Modified: head/usr.sbin/ctladm/ctladm.c Modified: head/usr.sbin/ctladm/ctladm.c ============================================================================== --- head/usr.sbin/ctladm/ctladm.c Fri Jul 17 17:36:33 2015 (r285657) +++ head/usr.sbin/ctladm/ctladm.c Fri Jul 17 19:10:43 2015 (r285658) @@ -3661,6 +3661,7 @@ retry: retval = 1; goto bailout; } + retval = 0; XML_ParserFree(parser); if (verbose != 0) { @@ -4080,6 +4081,7 @@ retry: retval = 1; goto bailout; } + retval = 0; XML_ParserFree(parser); printf("LUN Backend %18s %4s %-16s %-16s\n", "Size (Blocks)", "BS", @@ -4376,6 +4378,7 @@ retry: retval = 1; goto bailout; } + retval = 0; XML_ParserFree(parser); if (quiet == 0)