Print this page
usr/src/cmd/dlmgmtd/dlmgmt_door.c
        
@@ -353,11 +353,11 @@
         free(linkp);
 }
 
 /*
  * Set the DLMGMT_ACTIVE flag on the link to note that it is active.
- * When a link is active and is owned by an NGZ then it is added to
+ * When a link is active and owned by an NGZ then it is added to
  * that zone's datalink list.
  */
 int
 link_activate(dlmgmt_link_t *linkp)
 {
@@ -382,10 +382,11 @@
                  * under.
                  */
                 if (zoneid != linkp->ll_zoneid) {
                         assert(linkp->ll_zoneid == 0);
                         assert(linkp->ll_onloan == B_FALSE);
+                        assert(linkp->ll_transient == 0);
 
                         /*
                          * If dlmgmtd already has a link with this
                          * name under the NGZ then we have a problem.
                          */
@@ -420,15 +421,15 @@
                          * and is needed here in the event of a
                          * dlmgmtd restart.
                          */
                         if (linkp->ll_class == DATALINK_CLASS_VNIC &&
                             !(linkp->ll_flags & DLMGMT_PERSIST))
-                                linkp->ll_trans = B_TRUE;
+                                linkp->ll_transient = B_TRUE;
                 }
         } else if (linkp->ll_zoneid != GLOBAL_ZONEID) {
                 /*
-                 * In this case the link was not found under any NGZs
+                 * In this case the link was not found under any NGZ
                  * but according to its ll_zoneid member it is owned
                  * by an NGZ. Add the datalink to the appropriate zone
                  * datalink list.
                  */
                 err = zone_add_datalink(linkp->ll_zoneid, linkp->ll_linkid);
@@ -488,12 +489,13 @@
                 return (EINVAL);
         if (dlmgmt_nextlinkid == DATALINK_INVALID_LINKID)
                 return (ENOSPC);
         if (flags & ~(DLMGMT_ACTIVE | DLMGMT_PERSIST | DLMGMT_TRANSIENT) ||
             ((flags & DLMGMT_PERSIST) && (flags & DLMGMT_TRANSIENT)) ||
-            flags == 0)
+            flags == 0) {
                 return (EINVAL);
+        }
 
         if ((linkp = calloc(1, sizeof (dlmgmt_link_t))) == NULL) {
                 err = ENOMEM;
                 goto done;
         }
@@ -509,11 +511,11 @@
          * While DLMGMT_TRANSIENT starts off as a flag it is converted
          * into a link field since it is really a substate of
          * DLMGMT_ACTIVE -- it should not survive as a flag beyond
          * this point.
          */
-        linkp->ll_trans = (flags & DLMGMT_TRANSIENT) ? B_TRUE : B_FALSE;
+        linkp->ll_transient = (flags & DLMGMT_TRANSIENT) ? B_TRUE : B_FALSE;
         flags &= ~DLMGMT_TRANSIENT;
 
         if (avl_find(&dlmgmt_name_avl, linkp, &name_where) != NULL ||
             avl_find(&dlmgmt_id_avl, linkp, &id_where) != NULL) {
                 err = EEXIST;