summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwroche <none@none>2008-03-22 11:26:09 -0700
committerwroche <none@none>2008-03-22 11:26:09 -0700
commit9cd5efbcf26e476412d4fc76a77babc607089c55 (patch)
tree685e83cf5943ff9d7d68a60c67d28654f3aeebf3
parent289641a452d666e2752de381ced5dffadf94063d (diff)
downloadillumos-joyent-9cd5efbcf26e476412d4fc76a77babc607089c55.tar.gz
6643959 iostat -m no longer shows mount point
6647838 mount points for SVM/md devices don't appear using iostat -m option
-rw-r--r--usr/src/cmd/stat/iostat/iostat.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/usr/src/cmd/stat/iostat/iostat.c b/usr/src/cmd/stat/iostat/iostat.c
index e5cdc51b14..039834a90d 100644
--- a/usr/src/cmd/stat/iostat/iostat.c
+++ b/usr/src/cmd/stat/iostat/iostat.c
@@ -276,6 +276,9 @@ main(int argc, char **argv)
forever = (iter == 0);
do {
+ if (do_conversions && show_mountpts)
+ do_mnttab();
+
if (do_tty || do_cpu) {
kstat_t *oldks;
oldks = oldss ? &oldss->s_sys.ss_agg_sys : NULL;
@@ -887,11 +890,15 @@ show_disk(void *v1, void *v2, void *data)
if (show_mountpts && new->is_dname) {
mnt_t *mount_pt;
char *lu;
+ char *dnlu;
char lub[SMALL_SCRATCH_BUFLEN];
lu = strrchr(new->is_dname, '/');
if (lu) {
- if (strcmp(disk_name, lu) == 0)
+ /* only the part after a possible '/' */
+ dnlu = strrchr(disk_name, '/');
+ if (dnlu != NULL &&
+ strcmp(dnlu, lu) == 0)
lu = new->is_dname;
else {
*lu = 0;