devinfo.h (197224) | devinfo.h (199291) |
---|---|
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 197224 2009-09-15 16:59:52Z attilio $ | 27 * $FreeBSD: head/lib/libdevinfo/devinfo.h 199291 2009-11-15 16:44:43Z attilio $ |
28 */ 29 30#ifndef _DEVINFO_H_INCLUDED 31#define _DEVINFO_H_INCLUDED 32 33#include <sys/cdefs.h> 34#include <sys/_types.h> | 28 */ 29 30#ifndef _DEVINFO_H_INCLUDED 31#define _DEVINFO_H_INCLUDED 32 33#include <sys/cdefs.h> 34#include <sys/_types.h> |
35#include <sys/bus.h> |
|
35 36typedef __uintptr_t devinfo_handle_t; 37#define DEVINFO_ROOT_DEVICE ((devinfo_handle_t)0) 38 | 36 37typedef __uintptr_t devinfo_handle_t; 38#define DEVINFO_ROOT_DEVICE ((devinfo_handle_t)0) 39 |
39/* 40 * State of the device. 41 */ 42/* XXX not sure if I want a copy here, or expose sys/bus.h */ 43typedef enum devinfo_state { 44 DIS_NOTPRESENT = 10, /* not probed or probe failed */ 45 DIS_ALIVE = 20, /* probe succeeded */ 46 DIS_ATTACHED = 30, /* attach method called */ 47 DIS_BUSY = 40 /* device is open */ 48} devinfo_state_t; | 40typedef enum device_state devinfo_state_t; |
49 50struct devinfo_dev { 51 devinfo_handle_t dd_handle; /* device handle */ 52 devinfo_handle_t dd_parent; /* parent handle */ 53 54 char *dd_name; /* name of device */ 55 char *dd_desc; /* device description */ 56 char *dd_drivername; /* name of attached driver*/ --- 91 unchanged lines hidden --- | 41 42struct devinfo_dev { 43 devinfo_handle_t dd_handle; /* device handle */ 44 devinfo_handle_t dd_parent; /* parent handle */ 45 46 char *dd_name; /* name of device */ 47 char *dd_desc; /* device description */ 48 char *dd_drivername; /* name of attached driver*/ --- 91 unchanged lines hidden --- |