Print this page
patch tsoome-feedback


1199                 id = vlan->dv_vlanid;
1200                 if (nvlist_add_uint64(nvl, RCM_NV_LINKID, id) != 0) {
1201                         rcm_log_message(RCM_ERROR,
1202                             _("VLAN: failed to construct nvlist\n"));
1203                         (void) mutex_unlock(&cache_lock);
1204                         goto done;
1205                 }
1206         }
1207         (void) mutex_unlock(&cache_lock);
1208 
1209         if (rcm_notify_event(hd, RCM_RESOURCE_LINK_NEW, 0, nvl, NULL) !=
1210             RCM_SUCCESS) {
1211                 rcm_log_message(RCM_ERROR,
1212                     _("VLAN: failed to notify %s event for %s\n"),
1213                     RCM_RESOURCE_LINK_NEW, node->vc_resource);
1214                 goto done;
1215         }
1216 
1217         ret = 0;
1218 done:
1219         if (nvl != NULL)
1220                 nvlist_free(nvl);
1221         return (ret);
1222 }
1223 
1224 /*
1225  * vlan_consumer_notify() - Notify consumers of VLANs coming back online.
1226  */
1227 static int
1228 vlan_consumer_notify(rcm_handle_t *hd, datalink_id_t linkid, char **errorp,
1229     uint_t flags, rcm_info_t **info)
1230 {
1231         char rsrc[RCM_LINK_RESOURCE_MAX];
1232         link_cache_t *node;
1233 
1234         /* Check for the interface in the cache */
1235         (void) snprintf(rsrc, RCM_LINK_RESOURCE_MAX, "%s/%u", RCM_LINK_PREFIX,
1236             linkid);
1237 
1238         rcm_log_message(RCM_TRACE2, "VLAN: vlan_consumer_notify(%s)\n", rsrc);
1239 




1199                 id = vlan->dv_vlanid;
1200                 if (nvlist_add_uint64(nvl, RCM_NV_LINKID, id) != 0) {
1201                         rcm_log_message(RCM_ERROR,
1202                             _("VLAN: failed to construct nvlist\n"));
1203                         (void) mutex_unlock(&cache_lock);
1204                         goto done;
1205                 }
1206         }
1207         (void) mutex_unlock(&cache_lock);
1208 
1209         if (rcm_notify_event(hd, RCM_RESOURCE_LINK_NEW, 0, nvl, NULL) !=
1210             RCM_SUCCESS) {
1211                 rcm_log_message(RCM_ERROR,
1212                     _("VLAN: failed to notify %s event for %s\n"),
1213                     RCM_RESOURCE_LINK_NEW, node->vc_resource);
1214                 goto done;
1215         }
1216 
1217         ret = 0;
1218 done:

1219         nvlist_free(nvl);
1220         return (ret);
1221 }
1222 
1223 /*
1224  * vlan_consumer_notify() - Notify consumers of VLANs coming back online.
1225  */
1226 static int
1227 vlan_consumer_notify(rcm_handle_t *hd, datalink_id_t linkid, char **errorp,
1228     uint_t flags, rcm_info_t **info)
1229 {
1230         char rsrc[RCM_LINK_RESOURCE_MAX];
1231         link_cache_t *node;
1232 
1233         /* Check for the interface in the cache */
1234         (void) snprintf(rsrc, RCM_LINK_RESOURCE_MAX, "%s/%u", RCM_LINK_PREFIX,
1235             linkid);
1236 
1237         rcm_log_message(RCM_TRACE2, "VLAN: vlan_consumer_notify(%s)\n", rsrc);
1238