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.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Edward Tomasz Napierala 2015-02-06 14:44:29 +00:00
parent 02aa7d7b57
commit b56a6368c7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=278316

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