2 * Copyright 2006-2012, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
12 #include <drivers/device_manager.h>
13 #include <device_manager_defs.h>
14 #include <generic_syscall_defs.h>
18 #include "dm_wrapper.h"
21 status_t
init_dm_wrapper(void)
24 return _kern_generic_syscall(DEVICE_MANAGER_SYSCALLS
, B_SYSCALL_INFO
,
25 &version
, sizeof(version
));
29 status_t
uninit_dm_wrapper(void)
36 get_root(device_node_cookie
*cookie
)
38 return _kern_generic_syscall(DEVICE_MANAGER_SYSCALLS
, DM_GET_ROOT
,
39 cookie
, sizeof(device_node_cookie
));
44 get_child(device_node_cookie
*device
)
46 return _kern_generic_syscall(DEVICE_MANAGER_SYSCALLS
, DM_GET_CHILD
,
47 device
, sizeof(device_node_cookie
));
52 get_next_child(device_node_cookie
*device
)
54 return _kern_generic_syscall(DEVICE_MANAGER_SYSCALLS
, DM_GET_NEXT_CHILD
,
55 device
, sizeof(device_node_cookie
));
60 dm_get_next_attr(struct device_attr_info
*attr
)
62 return _kern_generic_syscall(DEVICE_MANAGER_SYSCALLS
, DM_GET_NEXT_ATTRIBUTE
,
63 attr
, sizeof(struct device_attr_info
));