common_kvm.c (231384) | common_kvm.c (235602) |
---|---|
1/*- 2 * Copyright (c) 2009 Stanislav Sedov <stas@FreeBSD.org> 3 * Copyright (c) 1988, 1993 4 * The Regents of the University of California. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 19 unchanged lines hidden (view full) --- 28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 */ 34 35#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2009 Stanislav Sedov <stas@FreeBSD.org> 3 * Copyright (c) 1988, 1993 4 * The Regents of the University of California. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 19 unchanged lines hidden (view full) --- 28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 */ 34 35#include <sys/cdefs.h> |
36__FBSDID("$FreeBSD: head/lib/libprocstat/common_kvm.c 231384 2012-02-10 13:47:40Z ed $"); | 36__FBSDID("$FreeBSD: head/lib/libprocstat/common_kvm.c 235602 2012-05-18 10:15:46Z gleb $"); |
37 38#include <sys/param.h> 39#include <sys/user.h> 40#include <sys/stat.h> 41#include <sys/vnode.h> 42#include <sys/conf.h> 43#define _KERNEL 44#include <sys/pipe.h> --- 49 unchanged lines hidden (view full) --- 94 return (1); 95 } 96 /* 97 * The st_dev from stat(2) is a dev_t. These kernel structures 98 * contain cdev pointers. We need to convert to dev_t to make 99 * comparisons 100 */ 101 vn->vn_fsid = dev2udev(kd, inode.i_dev); | 37 38#include <sys/param.h> 39#include <sys/user.h> 40#include <sys/stat.h> 41#include <sys/vnode.h> 42#include <sys/conf.h> 43#define _KERNEL 44#include <sys/pipe.h> --- 49 unchanged lines hidden (view full) --- 94 return (1); 95 } 96 /* 97 * The st_dev from stat(2) is a dev_t. These kernel structures 98 * contain cdev pointers. We need to convert to dev_t to make 99 * comparisons 100 */ 101 vn->vn_fsid = dev2udev(kd, inode.i_dev); |
102 vn->vn_fileid = (long)inode.i_number; | 102 vn->vn_fileid = inode.i_number; |
103 vn->vn_mode = (mode_t)inode.i_mode; | 103 vn->vn_mode = (mode_t)inode.i_mode; |
104 vn->vn_size = (u_long)inode.i_size; | 104 vn->vn_size = inode.i_size; |
105 return (0); 106} 107 108int 109devfs_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn) 110{ 111 struct devfs_dirent devfs_dirent; 112 struct mount mount; --- 95 unchanged lines hidden --- | 105 return (0); 106} 107 108int 109devfs_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn) 110{ 111 struct devfs_dirent devfs_dirent; 112 struct mount mount; --- 95 unchanged lines hidden --- |