Report XML parsing errors.
MFC after: 3 days
This commit is contained in:
parent
b7413232f6
commit
fcb263a5fc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=275958
@ -3643,11 +3643,14 @@ cctl_islist(int fd, int argc, char **argv, char *combinedopt)
|
||||
XML_SetCharacterDataHandler(parser, cctl_islist_char_handler);
|
||||
|
||||
retval = XML_Parse(parser, conn_str, strlen(conn_str), 1);
|
||||
XML_ParserFree(parser);
|
||||
if (retval != 1) {
|
||||
warnx("%s: Unable to parse XML: Error %d", __func__,
|
||||
XML_GetErrorCode(parser));
|
||||
XML_ParserFree(parser);
|
||||
retval = 1;
|
||||
goto bailout;
|
||||
}
|
||||
XML_ParserFree(parser);
|
||||
|
||||
if (verbose != 0) {
|
||||
STAILQ_FOREACH(conn, &islist.conn_list, links) {
|
||||
@ -4058,11 +4061,14 @@ cctl_devlist(int fd, int argc, char **argv, char *combinedopt)
|
||||
XML_SetCharacterDataHandler(parser, cctl_char_handler);
|
||||
|
||||
retval = XML_Parse(parser, lun_str, strlen(lun_str), 1);
|
||||
XML_ParserFree(parser);
|
||||
if (retval != 1) {
|
||||
warnx("%s: Unable to parse XML: Error %d", __func__,
|
||||
XML_GetErrorCode(parser));
|
||||
XML_ParserFree(parser);
|
||||
retval = 1;
|
||||
goto bailout;
|
||||
}
|
||||
XML_ParserFree(parser);
|
||||
|
||||
printf("LUN Backend %18s %4s %-16s %-16s\n", "Size (Blocks)", "BS",
|
||||
"Serial Number", "Device ID");
|
||||
@ -4336,11 +4342,14 @@ cctl_portlist(int fd, int argc, char **argv, char *combinedopt)
|
||||
XML_SetCharacterDataHandler(parser, cctl_char_phandler);
|
||||
|
||||
retval = XML_Parse(parser, port_str, strlen(port_str), 1);
|
||||
XML_ParserFree(parser);
|
||||
if (retval != 1) {
|
||||
warnx("%s: Unable to parse XML: Error %d", __func__,
|
||||
XML_GetErrorCode(parser));
|
||||
XML_ParserFree(parser);
|
||||
retval = 1;
|
||||
goto bailout;
|
||||
}
|
||||
XML_ParserFree(parser);
|
||||
|
||||
if (quiet == 0)
|
||||
printf("Port Online Frontend Name pp vp\n");
|
||||
|
Loading…
Reference in New Issue
Block a user