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);
 }
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to