diff options
| author | fw157321 <none@none> | 2007-05-11 11:59:15 -0700 |
|---|---|---|
| committer | fw157321 <none@none> | 2007-05-11 11:59:15 -0700 |
| commit | f96bd41028cd81050b7aa7edc07e56a330cc4186 (patch) | |
| tree | 284a714679677da60bde35feaae4ac849a7485ae /usr/src/cmd/picl | |
| parent | c4ffbf653be6bd0a63500a5999d18f9f30298523 (diff) | |
| download | illumos-joyent-f96bd41028cd81050b7aa7edc07e56a330cc4186.tar.gz | |
6555525 picl PRI plug-in fails to add Label property to disk nodes in the picl devtree
Diffstat (limited to 'usr/src/cmd/picl')
| -rw-r--r-- | usr/src/cmd/picl/plugins/sun4v/pri/io_dev_label.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/usr/src/cmd/picl/plugins/sun4v/pri/io_dev_label.c b/usr/src/cmd/picl/plugins/sun4v/pri/io_dev_label.c index 87eba25068..f3ce7a9f09 100644 --- a/usr/src/cmd/picl/plugins/sun4v/pri/io_dev_label.c +++ b/usr/src/cmd/picl/plugins/sun4v/pri/io_dev_label.c @@ -71,10 +71,12 @@ io_dev_addlabel(void) node_count = md_node_count(mdp); if (node_count == 0) { - pri_debug(LOG_NOTICE, "io_dev_addlabel: no nodes to process\n"); + pri_debug(LOG_NOTICE, "io_dev_addlabel: no nodes to " + "process\n"); return; } - components = (mde_cookie_t *)malloc(node_count * sizeof (mde_cookie_t)); + components = (mde_cookie_t *)malloc(node_count * + sizeof (mde_cookie_t)); if (components == NULL) { pri_debug(LOG_NOTICE, "io_dev_addlabel: can't get memory for IO nodes\n"); @@ -92,11 +94,12 @@ io_dev_addlabel(void) * Try to fetch the "type" as a string or as "data" until we * can agree on what its tag type should be. */ - if (md_get_prop_str(mdp, components[i], "type", &type) == -1) { + if (md_get_prop_str(mdp, components[i], "type", &type) == + -1) { if (md_get_prop_data(mdp, components[i], "type", (uint8_t **)&type, &type_size)) { - pri_debug(LOG_NOTICE, "io_add_devlabel: can't " - "get type for component %d\n", i); + pri_debug(LOG_NOTICE, "io_add_devlabel: " + "can't get type for component %d\n", i); continue; } } @@ -122,7 +125,8 @@ io_dev_addlabel(void) } else nac_size = strlen(nac) + 1; - if (md_get_prop_str(mdp, components[i], "path", &path) == -1) { + if (md_get_prop_str(mdp, components[i], "path", &path) == + -1) { pri_debug(LOG_NOTICE, "io_add_devlabel: can't get path value for " "device <%s>\n", type); @@ -202,8 +206,8 @@ io_dev_addlabel(void) * on the device we matched from the PRI path. */ for (status = PICL_SUCCESS; status == PICL_SUCCESS; - status = ptree_get_propval_by_name(tpn, PICL_PROP_PEER, - &tpn, sizeof (picl_nodehdl_t))) { + status = ptree_get_propval_by_name(tpn, + PICL_PROP_PEER, &tpn, sizeof (picl_nodehdl_t))) { /* * Add Labels to peers that have the same bus-addr * value (ignoring the function numbers.) @@ -218,13 +222,13 @@ io_dev_addlabel(void) picl_strerror(substatus)); } else { /* - * If the nac doesn't include a specific + * If the PRI path doesn't include a specific * function number then don't look for one * in the bus-addr. Devices on PCI-X bridges * may have a function number in the path, * so don't ignore that. */ - if (strchr(nac, ',') == NULL) { + if (strchr(saved_path, ',') == NULL) { if ((q = strchr(busaddr, ',')) != NULL) { *q = '\0'; @@ -291,8 +295,8 @@ find_node_by_string_prop(picl_nodehdl_t rooth, const char *pname, for (err = ptree_get_propval_by_name(rooth, PICL_PROP_CHILD, &childh, sizeof (picl_nodehdl_t)); err != PICL_PROPNOTFOUND; - err = ptree_get_propval_by_name(childh, PICL_PROP_PEER, &childh, - sizeof (picl_nodehdl_t))) { + err = ptree_get_propval_by_name(childh, PICL_PROP_PEER, + &childh, sizeof (picl_nodehdl_t))) { if (err != PICL_SUCCESS) return (err); |
