vfs_subr.c (229727) | vfs_subr.c (230249) |
---|---|
1/*- 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 25 unchanged lines hidden (view full) --- 34 * @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95 35 */ 36 37/* 38 * External virtual filesystem routines 39 */ 40 41#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 25 unchanged lines hidden (view full) --- 34 * @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95 35 */ 36 37/* 38 * External virtual filesystem routines 39 */ 40 41#include <sys/cdefs.h> |
42__FBSDID("$FreeBSD: head/sys/kern/vfs_subr.c 229727 2012-01-06 20:05:48Z jhb $"); | 42__FBSDID("$FreeBSD: head/sys/kern/vfs_subr.c 230249 2012-01-17 01:08:01Z mckusick $"); |
43 44#include "opt_ddb.h" 45#include "opt_watchdog.h" 46 47#include <sys/param.h> 48#include <sys/systm.h> 49#include <sys/bio.h> 50#include <sys/buf.h> --- 2780 unchanged lines hidden (view full) --- 2831 */ 2832DB_SHOW_COMMAND(mount, db_show_mount) 2833{ 2834 struct mount *mp; 2835 struct vfsopt *opt; 2836 struct statfs *sp; 2837 struct vnode *vp; 2838 char buf[512]; | 43 44#include "opt_ddb.h" 45#include "opt_watchdog.h" 46 47#include <sys/param.h> 48#include <sys/systm.h> 49#include <sys/bio.h> 50#include <sys/buf.h> --- 2780 unchanged lines hidden (view full) --- 2831 */ 2832DB_SHOW_COMMAND(mount, db_show_mount) 2833{ 2834 struct mount *mp; 2835 struct vfsopt *opt; 2836 struct statfs *sp; 2837 struct vnode *vp; 2838 char buf[512]; |
2839 uint64_t mflags; |
|
2839 u_int flags; 2840 2841 if (!have_addr) { 2842 /* No address given, print short info about all mount points. */ 2843 TAILQ_FOREACH(mp, &mountlist, mnt_list) { 2844 db_printf("%p %s on %s (%s)\n", mp, 2845 mp->mnt_stat.f_mntfromname, 2846 mp->mnt_stat.f_mntonname, --- 5 unchanged lines hidden (view full) --- 2852 return; 2853 } 2854 2855 mp = (struct mount *)addr; 2856 db_printf("%p %s on %s (%s)\n", mp, mp->mnt_stat.f_mntfromname, 2857 mp->mnt_stat.f_mntonname, mp->mnt_stat.f_fstypename); 2858 2859 buf[0] = '\0'; | 2840 u_int flags; 2841 2842 if (!have_addr) { 2843 /* No address given, print short info about all mount points. */ 2844 TAILQ_FOREACH(mp, &mountlist, mnt_list) { 2845 db_printf("%p %s on %s (%s)\n", mp, 2846 mp->mnt_stat.f_mntfromname, 2847 mp->mnt_stat.f_mntonname, --- 5 unchanged lines hidden (view full) --- 2853 return; 2854 } 2855 2856 mp = (struct mount *)addr; 2857 db_printf("%p %s on %s (%s)\n", mp, mp->mnt_stat.f_mntfromname, 2858 mp->mnt_stat.f_mntonname, mp->mnt_stat.f_fstypename); 2859 2860 buf[0] = '\0'; |
2860 flags = mp->mnt_flag; | 2861 mflags = mp->mnt_flag; |
2861#define MNT_FLAG(flag) do { \ | 2862#define MNT_FLAG(flag) do { \ |
2862 if (flags & (flag)) { \ | 2863 if (mflags & (flag)) { \ |
2863 if (buf[0] != '\0') \ 2864 strlcat(buf, ", ", sizeof(buf)); \ 2865 strlcat(buf, (#flag) + 4, sizeof(buf)); \ | 2864 if (buf[0] != '\0') \ 2865 strlcat(buf, ", ", sizeof(buf)); \ 2866 strlcat(buf, (#flag) + 4, sizeof(buf)); \ |
2866 flags &= ~(flag); \ | 2867 mflags &= ~(flag); \ |
2867 } \ 2868} while (0) 2869 MNT_FLAG(MNT_RDONLY); 2870 MNT_FLAG(MNT_SYNCHRONOUS); 2871 MNT_FLAG(MNT_NOEXEC); 2872 MNT_FLAG(MNT_NOSUID); 2873 MNT_FLAG(MNT_UNION); 2874 MNT_FLAG(MNT_ASYNC); --- 21 unchanged lines hidden (view full) --- 2896 MNT_FLAG(MNT_IGNORE); 2897 MNT_FLAG(MNT_UPDATE); 2898 MNT_FLAG(MNT_DELEXPORT); 2899 MNT_FLAG(MNT_RELOAD); 2900 MNT_FLAG(MNT_FORCE); 2901 MNT_FLAG(MNT_SNAPSHOT); 2902 MNT_FLAG(MNT_BYFSID); 2903#undef MNT_FLAG | 2868 } \ 2869} while (0) 2870 MNT_FLAG(MNT_RDONLY); 2871 MNT_FLAG(MNT_SYNCHRONOUS); 2872 MNT_FLAG(MNT_NOEXEC); 2873 MNT_FLAG(MNT_NOSUID); 2874 MNT_FLAG(MNT_UNION); 2875 MNT_FLAG(MNT_ASYNC); --- 21 unchanged lines hidden (view full) --- 2897 MNT_FLAG(MNT_IGNORE); 2898 MNT_FLAG(MNT_UPDATE); 2899 MNT_FLAG(MNT_DELEXPORT); 2900 MNT_FLAG(MNT_RELOAD); 2901 MNT_FLAG(MNT_FORCE); 2902 MNT_FLAG(MNT_SNAPSHOT); 2903 MNT_FLAG(MNT_BYFSID); 2904#undef MNT_FLAG |
2904 if (flags != 0) { | 2905 if (mflags != 0) { |
2905 if (buf[0] != '\0') 2906 strlcat(buf, ", ", sizeof(buf)); 2907 snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), | 2906 if (buf[0] != '\0') 2907 strlcat(buf, ", ", sizeof(buf)); 2908 snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), |
2908 "0x%08x", flags); | 2909 "0x%016jx", mflags); |
2909 } 2910 db_printf(" mnt_flag = %s\n", buf); 2911 2912 buf[0] = '\0'; 2913 flags = mp->mnt_kern_flag; 2914#define MNT_KERN_FLAG(flag) do { \ 2915 if (flags & (flag)) { \ 2916 if (buf[0] != '\0') \ --- 1583 unchanged lines hidden --- | 2910 } 2911 db_printf(" mnt_flag = %s\n", buf); 2912 2913 buf[0] = '\0'; 2914 flags = mp->mnt_kern_flag; 2915#define MNT_KERN_FLAG(flag) do { \ 2916 if (flags & (flag)) { \ 2917 if (buf[0] != '\0') \ --- 1583 unchanged lines hidden --- |