devinfo.h (103662) | devinfo.h (149671) |
---|---|
1/*- 2 * Copyright (c) 2000 Michael Smith 3 * Copyright (c) 2000 BSDi 4 * 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: --- 10 unchanged lines hidden (view full) --- 19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * | 1/*- 2 * Copyright (c) 2000 Michael Smith 3 * Copyright (c) 2000 BSDi 4 * 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: --- 10 unchanged lines hidden (view full) --- 19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * |
27 * $FreeBSD: head/lib/libdevinfo/devinfo.h 103662 2002-09-20 02:16:33Z imp $ | 27 * $FreeBSD: head/lib/libdevinfo/devinfo.h 149671 2005-08-31 14:57:39Z rodrigc $ |
28 */ 29 | 28 */ 29 |
30#ifndef _DEVINFO_H_INCLUDED 31#define _DEVINFO_H_INCLUDED 32 |
|
30#include <sys/cdefs.h> 31#include <sys/_types.h> 32 33typedef __uintptr_t devinfo_handle_t; 34#define DEVINFO_ROOT_DEVICE ((devinfo_handle_t)0) 35 36/* 37 * State of the device. --- 34 unchanged lines hidden (view full) --- 72 devinfo_handle_t dr_rman; /* resource manager handle */ 73 devinfo_handle_t dr_device; /* owning device */ 74 75 unsigned long dr_start; /* region start */ 76 unsigned long dr_size; /* region size */ 77 /* XXX add flags */ 78}; 79 | 33#include <sys/cdefs.h> 34#include <sys/_types.h> 35 36typedef __uintptr_t devinfo_handle_t; 37#define DEVINFO_ROOT_DEVICE ((devinfo_handle_t)0) 38 39/* 40 * State of the device. --- 34 unchanged lines hidden (view full) --- 75 devinfo_handle_t dr_rman; /* resource manager handle */ 76 devinfo_handle_t dr_device; /* owning device */ 77 78 unsigned long dr_start; /* region start */ 79 unsigned long dr_size; /* region size */ 80 /* XXX add flags */ 81}; 82 |
83__BEGIN_DECLS 84 |
|
80/* 81 * Acquire a coherent copy of the kernel's device and resource tables. 82 * This must return success (zero) before any other interfaces will 83 * function. Sets errno on failure. 84 */ 85extern int devinfo_init(void); 86 87/* --- 43 unchanged lines hidden (view full) --- 131 132/* 133 * Iterate over all the resource managers, calling (fn) on each. If (fn) 134 * returns nonzero, abort the scan and return. 135 */ 136extern int 137 devinfo_foreach_rman(int (* fn)(struct devinfo_rman *rman, void *arg), 138 void *arg); | 85/* 86 * Acquire a coherent copy of the kernel's device and resource tables. 87 * This must return success (zero) before any other interfaces will 88 * function. Sets errno on failure. 89 */ 90extern int devinfo_init(void); 91 92/* --- 43 unchanged lines hidden (view full) --- 136 137/* 138 * Iterate over all the resource managers, calling (fn) on each. If (fn) 139 * returns nonzero, abort the scan and return. 140 */ 141extern int 142 devinfo_foreach_rman(int (* fn)(struct devinfo_rman *rman, void *arg), 143 void *arg); |
144 145__END_DECLS 146 147#endif /* ! _DEVINFO_H_INCLUDED */ |
|