summaryrefslogtreecommitdiff
path: root/usr.sbin/acpidump/acpi_user.c
diff options
context:
space:
mode:
authorMartin Reindl <martin@cvs.openbsd.org>2005-11-09 20:30:04 +0000
committerMartin Reindl <martin@cvs.openbsd.org>2005-11-09 20:30:04 +0000
commite2a4323c46e85822c934a712e6028a40ee010d78 (patch)
tree8d1503fcdb2791275d8303acdd198cca6aae13d9 /usr.sbin/acpidump/acpi_user.c
parent3399c71b5a089e0d41c27770aabcc054b4738896 (diff)
instead of rolling our own page macros, use the ones provided by uvm
Diffstat (limited to 'usr.sbin/acpidump/acpi_user.c')
-rw-r--r--usr.sbin/acpidump/acpi_user.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/usr.sbin/acpidump/acpi_user.c b/usr.sbin/acpidump/acpi_user.c
index 14a495d013b..4936decdfa6 100644
--- a/usr.sbin/acpidump/acpi_user.c
+++ b/usr.sbin/acpidump/acpi_user.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpi_user.c,v 1.2 2005/07/21 16:38:55 fgsch Exp $ */
+/* $OpenBSD: acpi_user.c,v 1.3 2005/11/09 20:30:03 martin Exp $ */
/*-
* Copyright (c) 1999 Doug Rabson
* Copyright (c) 2000 Mitsuru IWASAKI <iwasaki@FreeBSD.org>
@@ -25,22 +25,16 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: acpi_user.c,v 1.2 2005/07/21 16:38:55 fgsch Exp $
+ * $Id: acpi_user.c,v 1.3 2005/11/09 20:30:03 martin Exp $
* $FreeBSD: src/usr.sbin/acpi/acpidump/acpi_user.c,v 1.3 2000/11/08 02:37:00 iwasaki Exp $
*/
-#ifdef __FreeBSD__
-#include <sys/param.h>
-#else
#include <sys/types.h>
-#define PAGE_MASK (0x1000-1) /*For I386*/
-#define trunc_page(x) ((x) & ~PAGE_MASK)
-#define round_page(x) (((x) + PAGE_MASK) & ~PAGE_MASK)
-#endif
-
#include <sys/mman.h>
#include <sys/queue.h>
#include <sys/stat.h>
+#include <uvm/uvm_extern.h>
+
#include <err.h>
#include <fcntl.h>
#include <stdlib.h>
@@ -49,6 +43,8 @@
#include "acpidump.h"
+#define vm_page_size sysconf(_SC_PAGESIZE)
+
static int acpi_mem_fd = -1;
struct acpi_user_mapping {