/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_0(callid, EINVAL); |
ipc_answer_fast_0(rid, EINVAL); |
ipc_answer_fast(callid, EINVAL, 0, 0); |
ipc_answer_fast(rid, EINVAL, 0, 0); |
return; |
} |
98,8 → 98,8 |
*/ |
if ((size < FS_NAME_MAXLEN + 1) || |
(size > FS_NAME_MAXLEN + MAX_PATH_LEN)) { |
ipc_answer_fast_0(callid, EINVAL); |
ipc_answer_fast_0(rid, EINVAL); |
ipc_answer_fast(callid, EINVAL, 0, 0); |
ipc_answer_fast(rid, EINVAL, 0, 0); |
return; |
} |
109,8 → 109,8 |
uint8_t *buf; |
buf = malloc(size); |
if (!buf) { |
ipc_answer_fast_0(callid, ENOMEM); |
ipc_answer_fast_0(rid, ENOMEM); |
ipc_answer_fast(callid, ENOMEM, 0, 0); |
ipc_answer_fast(rid, ENOMEM, 0, 0); |
return; |
} |
130,7 → 130,7 |
int fs_handle = fs_name_to_handle(fs_name, true); |
if (!fs_handle) { |
free(buf); |
ipc_answer_fast_0(rid, ENOENT); |
ipc_answer_fast(rid, ENOENT, 0, 0); |
return; |
} |
142,7 → 142,7 |
rc = lookup_root(fs_handle, dev_handle, &mounted_root); |
if (rc != EOK) { |
free(buf); |
ipc_answer_fast_0(rid, rc); |
ipc_answer_fast(rid, rc, 0, 0); |
return; |
} |
163,7 → 163,7 |
*/ |
futex_up(&rootfs_futex); |
free(buf); |
ipc_answer_fast_0(rid, rc); |
ipc_answer_fast(rid, rc, 0, 0); |
return; |
} |
} else { |
178,7 → 178,7 |
rootfs = mounted_root; |
futex_up(&rootfs_futex); |
free(buf); |
ipc_answer_fast_0(rid, EOK); |
ipc_answer_fast(rid, EOK, 0, 0); |
return; |
} else { |
/* |
187,7 → 187,7 |
*/ |
futex_up(&rootfs_futex); |
free(buf); |
ipc_answer_fast_0(rid, ENOENT); |
ipc_answer_fast(rid, ENOENT, 0, 0); |
return; |
} |
} |
218,11 → 218,11 |
vfs_release_phone(phone); |
if (rc2 == EOK) |
ipc_answer_fast_0(rid, rc1); |
ipc_answer_fast(rid, rc1, 0, 0); |
else if (rc1 == EOK) |
ipc_answer_fast_0(rid, rc2); |
ipc_answer_fast(rid, rc2, 0, 0); |
else |
ipc_answer_fast_0(rid, rc1); |
ipc_answer_fast(rid, rc1, 0, 0); |
} |
/** |
/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_0(callid, EINVAL); |
ipc_answer_fast_0(rid, EINVAL); |
ipc_answer_fast(callid, EINVAL, 0, 0); |
ipc_answer_fast(rid, EINVAL, 0, 0); |
return; |
} |
176,8 → 176,8 |
* the info structure. |
*/ |
dprintf("Received VFS info has bad size.\n"); |
ipc_answer_fast_0(callid, EINVAL); |
ipc_answer_fast_0(rid, EINVAL); |
ipc_answer_fast(callid, EINVAL, 0, 0); |
ipc_answer_fast(rid, EINVAL, 0, 0); |
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_0(callid, ENOMEM); |
ipc_answer_fast_0(rid, ENOMEM); |
ipc_answer_fast(callid, ENOMEM, 0, 0); |
ipc_answer_fast(rid, ENOMEM, 0, 0); |
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_0(callid, rc); |
ipc_answer_fast_0(rid, rc); |
ipc_answer_fast(callid, rc, 0, 0); |
ipc_answer_fast(rid, rc, 0, 0); |
return; |
} |
208,8 → 208,8 |
if (!vfs_info_sane(&fs_info->vfs_info)) { |
free(fs_info); |
ipc_answer_fast_0(callid, EINVAL); |
ipc_answer_fast_0(rid, EINVAL); |
ipc_answer_fast(callid, EINVAL, 0, 0); |
ipc_answer_fast(rid, EINVAL, 0, 0); |
return; |
} |
225,8 → 225,8 |
dprintf("FS is already registered.\n"); |
futex_up(&fs_head_futex); |
free(fs_info); |
ipc_answer_fast_0(callid, EEXISTS); |
ipc_answer_fast_0(rid, EEXISTS); |
ipc_answer_fast(callid, EEXISTS, 0, 0); |
ipc_answer_fast(rid, EEXISTS, 0, 0); |
return; |
} |
247,12 → 247,12 |
list_remove(&fs_info->fs_link); |
futex_up(&fs_head_futex); |
free(fs_info); |
ipc_answer_fast_0(callid, EINVAL); |
ipc_answer_fast_0(rid, EINVAL); |
ipc_answer_fast(callid, EINVAL, 0, 0); |
ipc_answer_fast(rid, EINVAL, 0, 0); |
return; |
} |
fs_info->phone = IPC_GET_ARG3(call); |
ipc_answer_fast_0(callid, EOK); |
ipc_answer_fast(callid, EOK, 0, 0); |
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_0(callid, EINVAL); |
ipc_answer_fast_0(rid, EINVAL); |
ipc_answer_fast(callid, EINVAL, 0, 0); |
ipc_answer_fast(rid, EINVAL, 0, 0); |
return; |
} |
281,8 → 281,8 |
futex_up(&fs_head_futex); |
ipc_hangup(fs_info->phone); |
free(fs_info); |
ipc_answer_fast_0(callid, EINVAL); |
ipc_answer_fast_0(rid, EINVAL); |
ipc_answer_fast(callid, EINVAL, 0, 0); |
ipc_answer_fast(rid, EINVAL, 0, 0); |
return; |
} |
300,7 → 300,7 |
* system a global file system handle. |
*/ |
fs_info->fs_handle = (int) atomic_postinc(&fs_handle_next); |
ipc_answer_fast_1(rid, EOK, (ipcarg_t) fs_info->fs_handle); |
ipc_answer_fast(rid, EOK, (ipcarg_t) fs_info->fs_handle, 0); |
futex_up(&fs_head_futex); |
/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_0(iid, ENOMEM); |
ipc_answer_fast(iid, ENOMEM, 0, 0); |
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_0(iid, EOK); |
ipc_answer_fast(iid, EOK, 0, 0); |
/* |
* Here we enter the main connection fibril loop. |
104,7 → 104,7 |
case VFS_WRITE: |
case VFS_SEEK: |
default: |
ipc_answer_fast_0(callid, ENOTSUP); |
ipc_answer_fast(callid, ENOTSUP, 0, 0); |
break; |
} |
} |
/trunk/uspace/srv/fs/fat/fat.c |
---|
93,7 → 93,7 |
* IPC_M_CONNECT_ME_TO calls as opposed to callback connections |
* created by IPC_M_CONNECT_TO_ME. |
*/ |
ipc_answer_fast_0(iid, EOK); |
ipc_answer_fast(iid, EOK, 0, 0); |
} |
dprintf("VFS-FAT connection established.\n"); |
104,7 → 104,7 |
callid = async_get_call(&call); |
switch (IPC_GET_METHOD(call)) { |
default: |
ipc_answer_fast_0(callid, ENOTSUP); |
ipc_answer_fast(callid, ENOTSUP, 0, 0); |
break; |
} |
} |
/trunk/uspace/srv/ns/ns.c |
---|
92,14 → 92,13 |
if (!*addr) { |
ph_addr = (void *) sysinfo_value(name); |
if (!ph_addr) { |
ipc_answer_fast_0(callid, ENOENT); |
ipc_answer_fast(callid, ENOENT, 0, 0); |
return; |
} |
*addr = as_get_mappable_page(PAGE_SIZE); |
physmem_map(ph_addr, *addr, 1, |
AS_AREA_READ | AS_AREA_CACHEABLE); |
physmem_map(ph_addr, *addr, 1, AS_AREA_READ | AS_AREA_CACHEABLE); |
} |
ipc_answer_fast(callid, EOK, (ipcarg_t) *addr, AS_AREA_READ); |
ipc_answer_fast(callid, 0, (ipcarg_t) *addr, AS_AREA_READ); |
} |
int main(int argc, char **argv) |
128,11 → 127,11 |
&klogaddr); |
break; |
default: |
ipc_answer_fast_0(callid, ENOENT); |
ipc_answer_fast(callid, ENOENT, 0, 0); |
} |
continue; |
case IPC_M_PHONE_HUNGUP: |
retval = EOK; |
retval = 0; |
break; |
case IPC_M_CONNECT_TO_ME: |
/* |
153,7 → 152,7 |
break; |
} |
if (!(callid & IPC_CALLID_NOTIFICATION)) { |
ipc_answer_fast_0(callid, retval); |
ipc_answer_fast(callid, retval, 0, 0); |
} |
} |
} |