188,15 → 188,17 |
int phone; |
ipcarg_t callback_phonehash; |
|
phone = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_DEVMAP, DEVMAP_DRIVER, 0); |
if (phone < 0) { |
printf(NAME ": Failed to connect to device mapper\n"); |
return -1; |
phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAP, DEVMAP_DRIVER, 0); |
|
while (phone < 0) { |
usleep(10000); |
phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAP, |
DEVMAP_DRIVER, 0); |
} |
|
req = async_send_2(phone, DEVMAP_DRIVER_REGISTER, 0, 0, &answer); |
|
retval = ipc_data_write_start(phone, (char *) name, str_size(name) + 1); |
retval = ipc_data_write_start(phone, (char *) name, strlen(name) + 1); |
|
if (retval != EOK) { |
async_wait_for(req, NULL); |
219,8 → 221,7 |
|
req = async_send_2(driver_phone, DEVMAP_DEVICE_REGISTER, 0, 0, &answer); |
|
retval = ipc_data_write_start(driver_phone, (char *) name, |
str_size(name) + 1); |
retval = ipc_data_write_start(driver_phone, (char *) name, strlen(name) + 1); |
|
if (retval != EOK) { |
async_wait_for(req, NULL); |
277,18 → 278,6 |
return false; |
} |
|
/* |
* Create the second device. |
* We need at least two devices for the sake of testing of non-root |
* mounts. Of course it would be better to allow the second device |
* be created dynamically... |
*/ |
if (EOK != device_register(driver_phone, "spared", &dev_handle)) { |
ipc_hangup(driver_phone); |
printf(NAME ": Unable to register device\n"); |
return false; |
} |
|
return true; |
} |
|