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:
Edward Tomasz Napierala 2015-05-15 10:53:06 +00:00
parent 9c812d6665
commit 3adf55e951
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/stable/10/; revision=282956

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);
}