From dac542123b184a8a538ab8c81d2f08ebef3fa9f0 Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Fri, 17 Jul 2015 19:10:43 +0000 Subject: [PATCH] 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 --- usr.sbin/ctladm/ctladm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/usr.sbin/ctladm/ctladm.c b/usr.sbin/ctladm/ctladm.c index aefba042aa5..6baf0902823 100644 --- a/usr.sbin/ctladm/ctladm.c +++ b/usr.sbin/ctladm/ctladm.c @@ -3661,6 +3661,7 @@ cctl_islist(int fd, int argc, char **argv, char *combinedopt) retval = 1; goto bailout; } + retval = 0; XML_ParserFree(parser); if (verbose != 0) { @@ -4080,6 +4081,7 @@ cctl_devlist(int fd, int argc, char **argv, char *combinedopt) retval = 1; goto bailout; } + retval = 0; XML_ParserFree(parser); printf("LUN Backend %18s %4s %-16s %-16s\n", "Size (Blocks)", "BS", @@ -4376,6 +4378,7 @@ cctl_portlist(int fd, int argc, char **argv, char *combinedopt) retval = 1; goto bailout; } + retval = 0; XML_ParserFree(parser); if (quiet == 0)