Date: Fri, 6 Feb 2015 14:44:30 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278316 - head/usr.sbin/ctladm Message-ID: <201502061444.t16EiUiN052965@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trasz Date: Fri Feb 6 14:44:29 2015 New Revision: 278316 URL: https://svnweb.freebsd.org/changeset/base/278316 Log: 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 Modified: head/usr.sbin/ctladm/ctladm.c Modified: head/usr.sbin/ctladm/ctladm.c ============================================================================== --- head/usr.sbin/ctladm/ctladm.c Fri Feb 6 14:22:00 2015 (r278315) +++ head/usr.sbin/ctladm/ctladm.c Fri Feb 6 14:44:29 2015 (r278316) @@ -3559,8 +3559,12 @@ cctl_islist_end_element(void *user_data, } 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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502061444.t16EiUiN052965>