* each device manager node has now an autogenerated identifier
* added a generic syscall for device_manager it enables to iterate the device manager tree from userland * the listdev tool is now using it: it's still incomplete as it only dumps nodes and attributes git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19260 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -38,6 +38,7 @@ struct device_node_info {
|
||||
uint32 num_io_resources; // number of I/O resources
|
||||
io_resource_handle *io_resources; // array of I/O resource (NULL-terminated)
|
||||
bool automatically_loaded; // loaded automatically because PNP_DRIVER_ALWAYS_LOADED
|
||||
uint32 internal_id; // internal identifier
|
||||
};
|
||||
|
||||
|
||||
@@ -50,6 +51,32 @@ extern "C" {
|
||||
extern status_t probe_for_device_type(const char *type);
|
||||
extern status_t device_manager_init(struct kernel_args *args);
|
||||
|
||||
// temporary/optional device manager syscall API
|
||||
#define DEVICE_MANAGER_SYSCALLS "device_manager"
|
||||
|
||||
#define DM_GET_ROOT 1
|
||||
#define DM_GET_CHILD 2
|
||||
#define DM_GET_NEXT_CHILD 3
|
||||
#define DM_GET_NEXT_ATTRIBUTE 4
|
||||
|
||||
struct dev_attr {
|
||||
uint32 node_cookie;
|
||||
uint32 cookie;
|
||||
char name[255];
|
||||
type_code type;
|
||||
union {
|
||||
uint8 ui8;
|
||||
uint16 ui16;
|
||||
uint32 ui32;
|
||||
uint64 ui64;
|
||||
char string[255];
|
||||
struct {
|
||||
void *data;
|
||||
size_t length;
|
||||
} raw;
|
||||
} value;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user