From 3adf55e9512dbe9cde6bfa7e594f95337ac1b8f1 Mon Sep 17 00:00:00 2001 From: Edward Tomasz Napierala Date: Fri, 15 May 2015 10:53:06 +0000 Subject: [PATCH] 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 --- usr.sbin/ctladm/ctladm.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/usr.sbin/ctladm/ctladm.c b/usr.sbin/ctladm/ctladm.c index f2e933a77cc1..03c751b21f31 100644 --- a/usr.sbin/ctladm/ctladm.c +++ b/usr.sbin/ctladm/ctladm.c @@ -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); }