MFC r278316:

Make "ctladm islist" ignore unknown elements, so the old version
continues to work with newer kernel.

Other ctladm(8) "*list" subcommands seem to already handle it in
a reasonable way.

Sponsored by:	The FreeBSD Foundation
This commit is contained in:
trasz 2015-05-15 10:53:06 +00:00
parent b843dffbc9
commit 2c0772761b

View File

@ -3559,8 +3559,12 @@ cctl_islist_end_element(void *user_data, const char *name)
} else if (strcmp(name, "connection") == 0) {
islist->cur_conn = NULL;
} else if (strcmp(name, "ctlislist") == 0) {
} else
errx(1, "unknown element %s", name);
/* Nothing. */
} else {
/*
* Unknown element; ignore it for forward compatiblity.
*/
}
free(str);
}