HaikuDepot: notify work status from main window
[haiku.git] / src / apps / devices / dm_wrapper.c
blob41b3f2dff8c7a02e68da4fa102ccbd41430e5aef
1 /*
2 * Copyright 2006 Haiku Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Jerome Duval (listdev)
7 */
10 #include <errno.h>
11 #include <fcntl.h>
12 #include <stdio.h>
13 #include <unistd.h>
15 #include <drivers/device_manager.h>
16 #include <device_manager_defs.h>
17 #include <generic_syscall_defs.h>
18 #include <string.h>
19 #include <syscalls.h>
21 #include "dm_wrapper.h"
24 status_t
25 init_dm_wrapper(void)
27 uint32 version = 0;
28 return _kern_generic_syscall(DEVICE_MANAGER_SYSCALLS, B_SYSCALL_INFO,
29 &version, sizeof(version));
33 status_t
34 uninit_dm_wrapper(void)
36 return B_OK;
40 status_t
41 get_root(device_node_cookie *cookie)
43 return _kern_generic_syscall(DEVICE_MANAGER_SYSCALLS, DM_GET_ROOT, cookie,
44 sizeof(device_node_cookie));
48 status_t
49 get_child(device_node_cookie *device)
51 return _kern_generic_syscall(DEVICE_MANAGER_SYSCALLS, DM_GET_CHILD, device,
52 sizeof(device_node_cookie));
56 status_t
57 get_next_child(device_node_cookie *device)
59 return _kern_generic_syscall(DEVICE_MANAGER_SYSCALLS, DM_GET_NEXT_CHILD,
60 device, sizeof(device_node_cookie));
64 status_t
65 dm_get_next_attr(struct device_attr_info *attr)
67 return _kern_generic_syscall(DEVICE_MANAGER_SYSCALLS,
68 DM_GET_NEXT_ATTRIBUTE, attr, sizeof(struct device_attr_info));