diff options
author | trasz <trasz@FreeBSD.org> | 2015-05-15 10:53:06 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2015-05-15 10:53:06 +0000 |
commit | 2c0772761b99f8a45b26d02261a813f0f10b9547 (patch) | |
tree | 4223da7051b12dbc808effb3fd146fe1ba163df6 /usr.sbin | |
parent | b843dffbc95eac25eb15f4e79ddfc37dcba33f27 (diff) | |
download | FreeBSD-src-2c0772761b99f8a45b26d02261a813f0f10b9547.zip FreeBSD-src-2c0772761b99f8a45b26d02261a813f0f10b9547.tar.gz |
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
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ctladm/ctladm.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.sbin/ctladm/ctladm.c b/usr.sbin/ctladm/ctladm.c index f2e933a..03c751b 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); } |