1221807Sstas/*-
2221807Sstas * Copyright (c) 2009 Stanislav Sedov <stas@FreeBSD.org>
3221807Sstas * All rights reserved.
4221807Sstas *
5221807Sstas * Redistribution and use in source and binary forms, with or without
6221807Sstas * modification, are permitted provided that the following conditions
7221807Sstas * are met:
8221807Sstas * 1. Redistributions of source code must retain the above copyright
9221807Sstas *    notice, this list of conditions and the following disclaimer.
10221807Sstas * 2. Redistributions in binary form must reproduce the above copyright
11221807Sstas *    notice, this list of conditions and the following disclaimer in the
12221807Sstas *    documentation and/or other materials provided with the distribution.
13221807Sstas *
14221807Sstas * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
15221807Sstas * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16221807Sstas * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17221807Sstas * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
18221807Sstas * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19221807Sstas * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20221807Sstas * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21221807Sstas * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22221807Sstas * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23221807Sstas * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24221807Sstas * SUCH DAMAGE.
25221807Sstas *
26221807Sstas * $FreeBSD$
27221807Sstas */
28221807Sstas
29221807Sstas#ifndef	_COMMON_KVM_H_
30221807Sstas#define	_COMMON_KVM_H_
31221807Sstas
32221807Sstasdev_t	dev2udev(kvm_t *kd, struct cdev *dev);
33221807Sstasint	kdevtoname(kvm_t *kd, struct cdev *dev, char *);
34221807Sstasint	kvm_read_all(kvm_t *kd, unsigned long addr, void *buf,
35221807Sstas    size_t nbytes);
36221807Sstas
37221807Sstas/*
38221807Sstas * Filesystems specific access routines.
39221807Sstas */
40221807Sstasint	devfs_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn);
41221807Sstasint	isofs_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn);
42221807Sstasint	msdosfs_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn);
43221807Sstasint	nfs_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn);
44252356Sdavideint	smbfs_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn);
45221807Sstasint	udf_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn);
46221807Sstasint	ufs_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn);
47221807Sstasint	zfs_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn);
48221807Sstasvoid	*getvnodedata(struct vnode *vp);
49221807Sstasstruct mount	*getvnodemount(struct vnode *vp);
50221807Sstas
51221807Sstas#endif	/* _COMMON_KVM_H_ */
52