Subversion Repositories HelenOS

Rev

Rev 3214 | Rev 3255 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3214 Rev 3246
Line 103... Line 103...
103
    return vfs_phone;
103
    return vfs_phone;
104
}
104
}
105
 
105
 
106
static int device_get_handle(char *name, dev_handle_t *handle)
106
static int device_get_handle(char *name, dev_handle_t *handle)
107
{
107
{
108
    int phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAP, DEVMAP_CLIENT, 0);
108
    int phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAP, DEVMAP_CLIENT,
-
 
109
        0);
109
    if (phone < 0)
110
    if (phone < 0)
110
        return phone;
111
        return phone;
111
   
112
   
112
    ipc_call_t answer;
113
    ipc_call_t answer;
113
    aid_t req = async_send_2(phone, DEVMAP_DEVICE_GET_HANDLE, 0, 0,
114
    aid_t req = async_send_2(phone, DEVMAP_DEVICE_GET_HANDLE, 0, 0,
Line 221... Line 222...
221
    async_wait_for(req, &rc);
222
    async_wait_for(req, &rc);
222
    async_serialize_end();
223
    async_serialize_end();
223
    futex_up(&vfs_phone_futex);
224
    futex_up(&vfs_phone_futex);
224
    free(pa);
225
    free(pa);
225
 
226
 
-
 
227
    if (rc != EOK)
226
    if (rc != EOK) return (int) rc;
228
        return (int) rc;
227
    return (int) IPC_GET_ARG1(answer);
229
    return (int) IPC_GET_ARG1(answer);
228
}
230
}
229
 
231
 
230
int open(const char *path, int oflag, ...)
232
int open(const char *path, int oflag, ...)
231
{
233
{