Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 3245 → Rev 3246

/trunk/kernel/generic/src/lib/rd.c
48,14 → 48,14
 
/**
* RAM disk initialization routine. At this point, the RAM disk memory is shared
* and information about the share is provided as sysinfo values to the userspace
* tasks.
* and information about the share is provided as sysinfo values to the
* userspace tasks.
*/
int init_rd(rd_header_t *header, size_t size)
{
/* Identify RAM disk */
if ((header->magic[0] != RD_MAG0) || (header->magic[1] != RD_MAG1) ||
(header->magic[2] != RD_MAG2) || (header->magic[3] != RD_MAG3))
(header->magic[2] != RD_MAG2) || (header->magic[3] != RD_MAG3))
return RE_INVALID;
/* Identify version */
86,7 → 86,8
if ((uint64_t) hsize + dsize > size)
dsize = size - hsize;
rd_parea.pbase = ALIGN_DOWN((uintptr_t) KA2PA((void *) header + hsize), FRAME_SIZE);
rd_parea.pbase = ALIGN_DOWN((uintptr_t) KA2PA((void *) header + hsize),
FRAME_SIZE);
rd_parea.vbase = (uintptr_t) ((void *) header + hsize);
rd_parea.frames = SIZE2FRAMES(dsize);
rd_parea.cacheable = true;
95,8 → 96,8
sysinfo_set_item_val("rd", NULL, true);
sysinfo_set_item_val("rd.header_size", NULL, hsize);
sysinfo_set_item_val("rd.size", NULL, dsize);
sysinfo_set_item_val("rd.address.physical", NULL, (unative_t)
KA2PA((void *) header + hsize));
sysinfo_set_item_val("rd.address.physical", NULL,
(unative_t) KA2PA((void *) header + hsize));
 
return RE_OK;
}
/trunk/uspace/lib/libc/generic/vfs/vfs.c
105,7 → 105,8
 
static int device_get_handle(char *name, dev_handle_t *handle)
{
int phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAP, DEVMAP_CLIENT, 0);
int phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAP, DEVMAP_CLIENT,
0);
if (phone < 0)
return phone;
223,7 → 224,8
futex_up(&vfs_phone_futex);
free(pa);
 
if (rc != EOK) return (int) rc;
if (rc != EOK)
return (int) rc;
return (int) IPC_GET_ARG1(answer);
}