From owner-svn-src-all@freebsd.org Sat Sep 17 18:14:32 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93281BDE1DC; Sat, 17 Sep 2016 18:14:32 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 573D13A5; Sat, 17 Sep 2016 18:14:32 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8HIEV0m095615; Sat, 17 Sep 2016 18:14:31 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8HIEVG6095612; Sat, 17 Sep 2016 18:14:31 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609171814.u8HIEVG6095612@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 17 Sep 2016 18:14:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305903 - in head: lib/libprocstat sys/ufs/ufs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Sep 2016 18:14:32 -0000 Author: kib Date: Sat Sep 17 18:14:31 2016 New Revision: 305903 URL: https://svnweb.freebsd.org/changeset/base/305903 Log: Fix libprocstat build after r305902. - Use _Bool to not require userspace to include stdbool.h. - Make extattr.h usable without vnode_if.h. - Follow i_ump to get cdev pointer. Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/lib/libprocstat/common_kvm.c head/sys/ufs/ufs/extattr.h head/sys/ufs/ufs/inode.h Modified: head/lib/libprocstat/common_kvm.c ============================================================================== --- head/lib/libprocstat/common_kvm.c Sat Sep 17 16:47:34 2016 (r305902) +++ head/lib/libprocstat/common_kvm.c Sat Sep 17 18:14:31 2016 (r305903) @@ -45,6 +45,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include #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; Modified: head/sys/ufs/ufs/extattr.h ============================================================================== --- head/sys/ufs/ufs/extattr.h Sat Sep 17 16:47:34 2016 (r305902) +++ head/sys/ufs/ufs/extattr.h Sat Sep 17 18:14:31 2016 (r305903) @@ -133,6 +133,10 @@ struct ufs_extattr_per_mount { int uepm_flags; }; +struct vop_getextattr_args; +struct vop_deleteextattr_args; +struct vop_setextattr_args; + void ufs_extattr_uepm_init(struct ufs_extattr_per_mount *uepm); void ufs_extattr_uepm_destroy(struct ufs_extattr_per_mount *uepm); int ufs_extattr_start(struct mount *mp, struct thread *td); Modified: head/sys/ufs/ufs/inode.h ============================================================================== --- head/sys/ufs/ufs/inode.h Sat Sep 17 16:47:34 2016 (r305902) +++ head/sys/ufs/ufs/inode.h Sat Sep 17 18:14:31 2016 (r305903) @@ -145,14 +145,14 @@ struct inode { #define ITOFS(ip) (ITOUMP(ip)->um_fs) #define ITOVFS(ip) ((ip)->i_vnode->v_mount) -static inline bool +static inline _Bool I_IS_UFS1(const struct inode *ip) { return ((ip->i_flag & IN_UFS2) == 0); } -static inline bool +static inline _Bool I_IS_UFS2(const struct inode *ip) {