libroot/posix/stdio: Remove unused portions.
[haiku.git] / src / bin / listdev / dm_wrapper.c
blob1720ad34fde031f7f63a83ff45e22c78e0084baf
1 /*
2 * Copyright 2006-2012, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
4 */
7 #include <errno.h>
8 #include <fcntl.h>
9 #include <stdio.h>
10 #include <unistd.h>
12 #include <drivers/device_manager.h>
13 #include <device_manager_defs.h>
14 #include <generic_syscall_defs.h>
15 #include <string.h>
16 #include <syscalls.h>
18 #include "dm_wrapper.h"
21 status_t init_dm_wrapper(void)
23 uint32 version = 0;
24 return _kern_generic_syscall(DEVICE_MANAGER_SYSCALLS, B_SYSCALL_INFO,
25 &version, sizeof(version));
29 status_t uninit_dm_wrapper(void)
31 return B_OK;
35 status_t
36 get_root(device_node_cookie *cookie)
38 return _kern_generic_syscall(DEVICE_MANAGER_SYSCALLS, DM_GET_ROOT,
39 cookie, sizeof(device_node_cookie));
43 status_t
44 get_child(device_node_cookie *device)
46 return _kern_generic_syscall(DEVICE_MANAGER_SYSCALLS, DM_GET_CHILD,
47 device, sizeof(device_node_cookie));
51 status_t
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));
59 status_t
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));