diff options
author | Roland McGrath <roland@gnu.org> | 1992-10-25 00:48:27 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1992-10-25 00:48:27 +0000 |
commit | 021c1dc8a0615e9b2b33d6933444d25f4be0c8c6 (patch) | |
tree | 957d1ef2afe40db285bb5ae2fc45f0700c0555a7 /mach/bootprivport.c | |
parent | 27a97da69c1e49948c1242e73ad8cf712e000a6c (diff) |
Initial revision
Diffstat (limited to 'mach/bootprivport.c')
-rw-r--r-- | mach/bootprivport.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/mach/bootprivport.c b/mach/bootprivport.c new file mode 100644 index 0000000000..f4d06aaf8b --- /dev/null +++ b/mach/bootprivport.c @@ -0,0 +1,34 @@ +/* Copyright (C) 1992 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include <mach.h> +#include <mach/kernel_boot.h> + +kern_return_t +__mach_get_priv_ports (host_priv_t *host_priv_ptr, device_t *device_master_ptr) +{ + kern_return_t err; + mach_port_t bootstrap; + + if (err = task_get_bootstrap_port (mach_task_self (), &bootstrap)) + return err; + err = __kernel_boot_get_priv_ports (bootstrap, + host_priv_ptr, dev_master_ptr); + mach_port_deallocate (mach_task_self (), bootstrap); + return err; +} |