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
This commit is contained in:
Baptiste Daroussin 2015-07-17 19:10:43 +00:00
parent d57724fd46
commit dac542123b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=285658

View File

@ -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)