Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2587 → Rev 2588

/trunk/uspace/srv/vfs/vfs.c
59,7 → 59,7
* Initialize the table of open files.
*/
if (!vfs_conn_open_files_init()) {
ipc_answer_fast(iid, ENOMEM, 0, 0);
ipc_answer_fast_0(iid, ENOMEM);
return;
}
 
67,7 → 67,7
* The connection was opened via the IPC_CONNECT_ME_TO call.
* This call needs to be answered.
*/
ipc_answer_fast(iid, EOK, 0, 0);
ipc_answer_fast_0(iid, EOK);
 
/*
* Here we enter the main connection fibril loop.
104,7 → 104,7
case VFS_WRITE:
case VFS_SEEK:
default:
ipc_answer_fast(callid, ENOTSUP, 0, 0);
ipc_answer_fast_0(callid, ENOTSUP);
break;
}
}
/trunk/uspace/srv/vfs/vfs_mount.c
86,8 → 86,8
ipc_call_t call;
size_t size;
if (!ipc_data_receive(&callid, &call, NULL, &size)) {
ipc_answer_fast(callid, EINVAL, 0, 0);
ipc_answer_fast(rid, EINVAL, 0, 0);
ipc_answer_fast_0(callid, EINVAL);
ipc_answer_fast_0(rid, EINVAL);
return;
}
 
98,8 → 98,8
*/
if ((size < FS_NAME_MAXLEN + 1) ||
(size > FS_NAME_MAXLEN + MAX_PATH_LEN)) {
ipc_answer_fast(callid, EINVAL, 0, 0);
ipc_answer_fast(rid, EINVAL, 0, 0);
ipc_answer_fast_0(callid, EINVAL);
ipc_answer_fast_0(rid, EINVAL);
return;
}
 
109,8 → 109,8
uint8_t *buf;
buf = malloc(size);
if (!buf) {
ipc_answer_fast(callid, ENOMEM, 0, 0);
ipc_answer_fast(rid, ENOMEM, 0, 0);
ipc_answer_fast_0(callid, ENOMEM);
ipc_answer_fast_0(rid, ENOMEM);
return;
}
 
130,7 → 130,7
int fs_handle = fs_name_to_handle(fs_name, true);
if (!fs_handle) {
free(buf);
ipc_answer_fast(rid, ENOENT, 0, 0);
ipc_answer_fast_0(rid, ENOENT);
return;
}
 
142,7 → 142,7
rc = lookup_root(fs_handle, dev_handle, &mounted_root);
if (rc != EOK) {
free(buf);
ipc_answer_fast(rid, rc, 0, 0);
ipc_answer_fast_0(rid, rc);
return;
}
 
163,7 → 163,7
*/
futex_up(&rootfs_futex);
free(buf);
ipc_answer_fast(rid, rc, 0, 0);
ipc_answer_fast_0(rid, rc);
return;
}
} else {
178,7 → 178,7
rootfs = mounted_root;
futex_up(&rootfs_futex);
free(buf);
ipc_answer_fast(rid, EOK, 0, 0);
ipc_answer_fast_0(rid, EOK);
return;
} else {
/*
187,7 → 187,7
*/
futex_up(&rootfs_futex);
free(buf);
ipc_answer_fast(rid, ENOENT, 0, 0);
ipc_answer_fast_0(rid, ENOENT);
return;
}
}
218,11 → 218,11
vfs_release_phone(phone);
 
if (rc2 == EOK)
ipc_answer_fast(rid, rc1, 0, 0);
ipc_answer_fast_0(rid, rc1);
else if (rc1 == EOK)
ipc_answer_fast(rid, rc2, 0, 0);
ipc_answer_fast_0(rid, rc2);
else
ipc_answer_fast(rid, rc1, 0, 0);
ipc_answer_fast_0(rid, rc1);
}
 
/**
/trunk/uspace/srv/vfs/vfs_register.c
159,8 → 159,8
* The client doesn't obey the same protocol as we do.
*/
dprintf("Receiving of VFS info failed.\n");
ipc_answer_fast(callid, EINVAL, 0, 0);
ipc_answer_fast(rid, EINVAL, 0, 0);
ipc_answer_fast_0(callid, EINVAL);
ipc_answer_fast_0(rid, EINVAL);
return;
}
176,8 → 176,8
* the info structure.
*/
dprintf("Received VFS info has bad size.\n");
ipc_answer_fast(callid, EINVAL, 0, 0);
ipc_answer_fast(rid, EINVAL, 0, 0);
ipc_answer_fast_0(callid, EINVAL);
ipc_answer_fast_0(rid, EINVAL);
return;
}
 
188,8 → 188,8
fs_info = (fs_info_t *) malloc(sizeof(fs_info_t));
if (!fs_info) {
dprintf("Could not allocate memory for FS info.\n");
ipc_answer_fast(callid, ENOMEM, 0, 0);
ipc_answer_fast(rid, ENOMEM, 0, 0);
ipc_answer_fast_0(callid, ENOMEM);
ipc_answer_fast_0(rid, ENOMEM);
return;
}
link_initialize(&fs_info->fs_link);
199,8 → 199,8
dprintf("Failed to deliver the VFS info into our AS, rc=%d.\n",
rc);
free(fs_info);
ipc_answer_fast(callid, rc, 0, 0);
ipc_answer_fast(rid, rc, 0, 0);
ipc_answer_fast_0(callid, rc);
ipc_answer_fast_0(rid, rc);
return;
}
 
208,8 → 208,8
if (!vfs_info_sane(&fs_info->vfs_info)) {
free(fs_info);
ipc_answer_fast(callid, EINVAL, 0, 0);
ipc_answer_fast(rid, EINVAL, 0, 0);
ipc_answer_fast_0(callid, EINVAL);
ipc_answer_fast_0(rid, EINVAL);
return;
}
225,8 → 225,8
dprintf("FS is already registered.\n");
futex_up(&fs_head_futex);
free(fs_info);
ipc_answer_fast(callid, EEXISTS, 0, 0);
ipc_answer_fast(rid, EEXISTS, 0, 0);
ipc_answer_fast_0(callid, EEXISTS);
ipc_answer_fast_0(rid, EEXISTS);
return;
}
 
247,12 → 247,12
list_remove(&fs_info->fs_link);
futex_up(&fs_head_futex);
free(fs_info);
ipc_answer_fast(callid, EINVAL, 0, 0);
ipc_answer_fast(rid, EINVAL, 0, 0);
ipc_answer_fast_0(callid, EINVAL);
ipc_answer_fast_0(rid, EINVAL);
return;
}
fs_info->phone = IPC_GET_ARG3(call);
ipc_answer_fast(callid, EOK, 0, 0);
ipc_answer_fast_0(callid, EOK);
 
dprintf("Callback connection to FS created.\n");
 
266,8 → 266,8
futex_up(&fs_head_futex);
ipc_hangup(fs_info->phone);
free(fs_info);
ipc_answer_fast(callid, EINVAL, 0, 0);
ipc_answer_fast(rid, EINVAL, 0, 0);
ipc_answer_fast_0(callid, EINVAL);
ipc_answer_fast_0(rid, EINVAL);
return;
}
281,8 → 281,8
futex_up(&fs_head_futex);
ipc_hangup(fs_info->phone);
free(fs_info);
ipc_answer_fast(callid, EINVAL, 0, 0);
ipc_answer_fast(rid, EINVAL, 0, 0);
ipc_answer_fast_0(callid, EINVAL);
ipc_answer_fast_0(rid, EINVAL);
return;
}
 
300,7 → 300,7
* system a global file system handle.
*/
fs_info->fs_handle = (int) atomic_postinc(&fs_handle_next);
ipc_answer_fast(rid, EOK, (ipcarg_t) fs_info->fs_handle, 0);
ipc_answer_fast_1(rid, EOK, (ipcarg_t) fs_info->fs_handle);
futex_up(&fs_head_futex);