1153 remove krtld support for _depends_on
authorBayard Bell <buffer.g.overflow@gmail.com>
Thu, 06 Oct 2011 10:08:23 +0100
changeset 13481 564315791ac3
parent 13480 868da6012e6f
child 13482 3ff13b2303cb
1153 remove krtld support for _depends_on Reviewed by: Robert Mustacchi <[email protected]> Reviewed by: Garrett D'Amore <[email protected]> Reviewed by: Jason King <[email protected]> Reviewed by: Richard Lowe <[email protected]> Approved by: Gordon Ross <[email protected]>
usr/src/uts/common/krtld/kobj.c
--- a/usr/src/uts/common/krtld/kobj.c	Thu Oct 06 10:24:09 2011 -0400
+++ b/usr/src/uts/common/krtld/kobj.c	Thu Oct 06 10:08:23 2011 +0100
@@ -22,6 +22,10 @@
  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
+/*
+ * Copyright 2011 Bayard G. Bell <[email protected]>.
+ * All rights reserved. Use is subject to license terms.
+ */
 
 /*
  * Kernel's linker/loader
@@ -1444,6 +1448,20 @@
 
 	q = (char *)sp->st_value;
 
+#ifdef KOBJ_DEBUG
+	/*
+	 * _depends_on is a deprecated interface, so we warn about its use
+	 * irrespective of subsequent processing errors. How else are we going
+	 * to be able to deco this interface completely?
+	 * Changes initially limited to DEBUG because third-party modules
+	 * should be flagged to developers before general use base.
+	 */
+	_kobj_printf(ops,
+	    "Warning: %s uses deprecated _depends_on interface.\n",
+	    mp->filename);
+	_kobj_printf(ops, "Please notify module developer or vendor.\n");
+#endif
+
 	/*
 	 * Idiot checks. Make sure it's
 	 * in-bounds and NULL terminated.