Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Nov 2009 14:33:03 +0000 (UTC)
From:      Jaakko Heinonen <jh@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r199529 - head/sys/kern
Message-ID:  <200911191433.nAJEX3GH009271@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jh
Date: Thu Nov 19 14:33:03 2009
New Revision: 199529
URL: http://svn.freebsd.org/changeset/base/199529

Log:
  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

Modified:
  head/sys/kern/vfs_subr.c

Modified: head/sys/kern/vfs_subr.c
==============================================================================
--- head/sys/kern/vfs_subr.c	Thu Nov 19 13:39:07 2009	(r199528)
+++ head/sys/kern/vfs_subr.c	Thu Nov 19 14:33:03 2009	(r199529)
@@ -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 "



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911191433.nAJEX3GH009271>