Subversion Repositories HelenOS

Rev

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

Rev 3464 Rev 3488
Line 114... Line 114...
114
    if (vfs_phone < 0)
114
    if (vfs_phone < 0)
115
        vfs_phone = ipc_connect_me_to(PHONE_NS, SERVICE_VFS, 0, 0);
115
        vfs_phone = ipc_connect_me_to(PHONE_NS, SERVICE_VFS, 0, 0);
116
    return vfs_phone;
116
    return vfs_phone;
117
}
117
}
118
 
118
 
119
static int device_get_handle(char *name, dev_handle_t *handle)
119
static int device_get_handle(const char *name, dev_handle_t *handle)
120
{
120
{
121
    int phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAP, DEVMAP_CLIENT,
121
    int phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAP, DEVMAP_CLIENT,
122
        0);
122
        0);
123
    if (phone < 0)
123
    if (phone < 0)
124
        return phone;
124
        return phone;
Line 362... Line 362...
362
            futex_up(&vfs_phone_futex);
362
            futex_up(&vfs_phone_futex);
363
            return res;
363
            return res;
364
        }
364
        }
365
    }
365
    }
366
       
366
       
367
    off_t newoffs;
367
    ipcarg_t newoffs;
368
    rc = async_req_3_1(vfs_phone, VFS_SEEK, fildes, offset, whence,
368
    rc = async_req_3_1(vfs_phone, VFS_SEEK, fildes, offset, whence,
369
        (ipcarg_t)&newoffs);
369
        &newoffs);
370
 
370
 
371
    async_serialize_end();
371
    async_serialize_end();
372
    futex_up(&vfs_phone_futex);
372
    futex_up(&vfs_phone_futex);
373
 
373
 
374
    if (rc != EOK)
374
    if (rc != EOK)
375
        return (off_t) -1;
375
        return (off_t) -1;
376
   
376
   
377
    return newoffs;
377
    return (off_t) newoffs;
378
}
378
}
379
 
379
 
380
int ftruncate(int fildes, off_t length)
380
int ftruncate(int fildes, off_t length)
381
{
381
{
382
    int res;
382
    int res;