diff options
author | jh <jh@FreeBSD.org> | 2009-11-19 14:33:03 +0000 |
---|---|---|
committer | jh <jh@FreeBSD.org> | 2009-11-19 14:33:03 +0000 |
commit | 0c0aa71530aa1d7a3f406f6e7c6c075b16f6d76d (patch) | |
tree | f22a325207e66fabb3c21f30bc72b766be51c064 /sys/kern/vfs_subr.c | |
parent | cb3a6b35468454fd18261cbe9850f6877c029348 (diff) | |
download | FreeBSD-src-0c0aa71530aa1d7a3f406f6e7c6c075b16f6d76d.zip FreeBSD-src-0c0aa71530aa1d7a3f406f6e7c6c075b16f6d76d.tar.gz |
Extend ddb(4) "show mount" command to print active string mount options.
Note that only option names are printed, not values.
Reviewed by: pjd
Approved by: trasz (mentor)
MFC after: 2 weeks
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r-- | sys/kern/vfs_subr.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index d92555f..9453f73 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -2761,6 +2761,7 @@ DB_SHOW_COMMAND(vnode, db_show_vnode) DB_SHOW_COMMAND(mount, db_show_mount) { struct mount *mp; + struct vfsopt *opt; struct statfs *sp; struct vnode *vp; char buf[512]; @@ -2866,6 +2867,18 @@ DB_SHOW_COMMAND(mount, db_show_mount) } db_printf(" mnt_kern_flag = %s\n", buf); + db_printf(" mnt_opt = "); + opt = TAILQ_FIRST(mp->mnt_opt); + if (opt != NULL) { + db_printf("%s", opt->name); + opt = TAILQ_NEXT(opt, link); + while (opt != NULL) { + db_printf(", %s", opt->name); + opt = TAILQ_NEXT(opt, link); + } + } + db_printf("\n"); + sp = &mp->mnt_stat; db_printf(" mnt_stat = { version=%u type=%u flags=0x%016jx " "bsize=%ju iosize=%ju blocks=%ju bfree=%ju bavail=%jd files=%ju " |