Rev 3022 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3022 | Rev 4055 | ||
---|---|---|---|
Line 30... | Line 30... | ||
30 | #include <unistd.h> |
30 | #include <unistd.h> |
31 | #include <ipc/ipc.h> |
31 | #include <ipc/ipc.h> |
32 | #include <ipc/services.h> |
32 | #include <ipc/services.h> |
33 | #include <async.h> |
33 | #include <async.h> |
34 | #include <errno.h> |
34 | #include <errno.h> |
35 | #include <../../../srv/devmap/devmap.h> |
35 | #include <ipc/devmap.h> |
36 | #include "../tester.h" |
36 | #include "../tester.h" |
37 | 37 | ||
38 | #include <time.h> |
38 | #include <time.h> |
39 | 39 | ||
40 | #define TEST_DEVICE1 "TestDevice1" |
40 | #define TEST_DEVICE1 "TestDevice1" |
Line 130... | Line 130... | ||
130 | aid_t req; |
130 | aid_t req; |
131 | ipc_call_t answer; |
131 | ipc_call_t answer; |
132 | int phone; |
132 | int phone; |
133 | ipcarg_t callback_phonehash; |
133 | ipcarg_t callback_phonehash; |
134 | 134 | ||
135 | phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAP, DEVMAP_DRIVER, 0); |
135 | phone = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_DEVMAP, DEVMAP_DRIVER, 0); |
136 | - | ||
137 | while (phone < 0) { |
136 | if (phone < 0) { |
138 | usleep(100000); |
- | |
139 | phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAP, |
137 | printf("Failed to connect to device mapper\n"); |
140 | DEVMAP_DRIVER, 0); |
138 | return -1; |
141 | } |
139 | } |
142 | 140 | ||
143 | req = async_send_2(phone, DEVMAP_DRIVER_REGISTER, 0, 0, &answer); |
141 | req = async_send_2(phone, DEVMAP_DRIVER_REGISTER, 0, 0, &answer); |
144 | 142 | ||
145 | retval = ipc_data_write_start(phone, (char *)name, strlen(name) + 1); |
143 | retval = ipc_data_write_start(phone, (char *)name, strlen(name) + 1); |