int to endpoint_t conversions in mmap

This commit is contained in:
Tomas Hruby
2010-06-09 09:14:53 +00:00
parent cccfe8e0ce
commit 1207fcc6f0
3 changed files with 13 additions and 10 deletions

View File

@@ -208,22 +208,20 @@ PUBLIC int do_unmap_phys(message *m)
*===========================================================================*/
PUBLIC int do_remap(message *m)
{
int d, dn, s, sn;
int dn, sn;
vir_bytes da, sa, startv;
size_t size;
struct vir_region *vr, *region;
struct vmproc *dvmp, *svmp;
int r;
d = m->VMRE_D;
s = m->VMRE_S;
da = (vir_bytes) m->VMRE_DA;
sa = (vir_bytes) m->VMRE_SA;
size = m->VMRE_SIZE;
if ((r = vm_isokendpt(d, &dn)) != OK)
if ((r = vm_isokendpt((endpoint_t) m->VMRE_D, &dn)) != OK)
return EINVAL;
if ((r = vm_isokendpt(s, &sn)) != OK)
if ((r = vm_isokendpt((endpoint_t) m->VMRE_S, &sn)) != OK)
return EINVAL;
dvmp = &vmproc[dn];