diff options
author | kib <kib@FreeBSD.org> | 2016-10-01 09:19:43 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2016-10-01 09:19:43 +0000 |
commit | c83481c3142b3f842f75e35f0359ab1e4a918a1c (patch) | |
tree | 65d15e03e0d26f9bad6be5514272c0efe1e8e4cf /lib | |
parent | 5513c4602acb9d1e5d22c58e867ae3714c2ee127 (diff) | |
download | FreeBSD-src-c83481c3142b3f842f75e35f0359ab1e4a918a1c.zip FreeBSD-src-c83481c3142b3f842f75e35f0359ab1e4a918a1c.tar.gz |
MFC r305902:
Reduce size of ufs inode.
MFC r305903:
Fix libprocstat build after r305902.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libprocstat/common_kvm.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/libprocstat/common_kvm.c b/lib/libprocstat/common_kvm.c index be05980..4ca2514 100644 --- a/lib/libprocstat/common_kvm.c +++ b/lib/libprocstat/common_kvm.c @@ -45,6 +45,8 @@ __FBSDID("$FreeBSD$"); #include <sys/mount.h> #include <ufs/ufs/quota.h> #include <ufs/ufs/inode.h> +#include <ufs/ufs/extattr.h> +#include <ufs/ufs/ufsmount.h> #include <fs/devfs/devfs.h> #include <fs/devfs/devfs_int.h> #undef _KERNEL @@ -88,17 +90,22 @@ int ufs_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn) { struct inode inode; + struct ufsmount um; if (!kvm_read_all(kd, (unsigned long)VTOI(vp), &inode, sizeof(inode))) { warnx("can't read inode at %p", (void *)VTOI(vp)); return (1); } + if (!kvm_read_all(kd, (unsigned long)inode.i_ump, &um, sizeof(um))) { + warnx("can't read ufsmount at %p", (void *)inode.i_ump); + return (1); + } /* * The st_dev from stat(2) is a dev_t. These kernel structures * contain cdev pointers. We need to convert to dev_t to make * comparisons */ - vn->vn_fsid = dev2udev(kd, inode.i_dev); + vn->vn_fsid = dev2udev(kd, um.um_dev); vn->vn_fileid = inode.i_number; vn->vn_mode = (mode_t)inode.i_mode; vn->vn_size = inode.i_size; |