Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2699 → Rev 2700

/trunk/uspace/lib/libc/generic/vfs.c
95,8 → 95,7
return (int) rc;
}
 
 
int open(const char *path, int oflag, ...)
static int _open(const char *path, int lflag, int oflag, ...)
{
int res;
ipcarg_t rc;
113,7 → 112,7
return res;
}
}
req = async_send_2(vfs_phone, VFS_OPEN, oflag, 0, &answer);
req = async_send_3(vfs_phone, VFS_OPEN, lflag, oflag, 0, &answer);
rc = ipc_data_write_start(vfs_phone, path, strlen(path));
if (rc != EOK) {
async_wait_for(req, NULL);
127,6 → 126,11
return (int) IPC_GET_ARG1(answer);
}
 
int open(const char *path, int oflag, ...)
{
return _open(path, L_FILE, oflag);
}
 
ssize_t read(int fildes, void *buf, size_t nbyte)
{
int res;
242,7 → 246,7
DIR *dirp = malloc(sizeof(DIR));
if (!dirp)
return NULL;
dirp->fd = open(dirname, 0); /* TODO: must be a directory */
dirp->fd = _open(dirname, L_DIRECTORY, 0);
if (dirp->fd < 0) {
free(dirp);
return NULL;