MFC r199529:

Extend ddb(4) "show mount" command to print active string mount options.
Note that only option names are printed, not values.

Approved by:	trasz (mentor)
This commit is contained in:
Jaakko Heinonen 2009-12-04 11:23:37 +00:00
parent e043b4c399
commit a95336167e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/stable/8/; revision=200097

View File

@ -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 "