diff options
Diffstat (limited to 'usr/src/lib/libzpool/common/util.c')
| -rw-r--r-- | usr/src/lib/libzpool/common/util.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/usr/src/lib/libzpool/common/util.c b/usr/src/lib/libzpool/common/util.c index 094c8b6c6f..df49adbc7a 100644 --- a/usr/src/lib/libzpool/common/util.c +++ b/usr/src/lib/libzpool/common/util.c @@ -111,11 +111,17 @@ show_vdev_stats(const char *desc, nvlist_t *nv, int indent) for (c = 0; c < children; c++) { nvlist_t *cnv = child[c]; - char *cname; + char *cname, *tname; + uint64_t np; if (nvlist_lookup_string(cnv, ZPOOL_CONFIG_PATH, &cname) && nvlist_lookup_string(cnv, ZPOOL_CONFIG_TYPE, &cname)) cname = "<unknown>"; - show_vdev_stats(cname, cnv, indent + 2); + tname = calloc(1, strlen(cname) + 2); + (void) strcpy(tname, cname); + if (nvlist_lookup_uint64(cnv, ZPOOL_CONFIG_NPARITY, &np) == 0) + tname[strlen(tname)] = '0' + np; + show_vdev_stats(tname, cnv, indent + 2); + free(tname); } } |
