MIN/MAX -> min/max
This commit is contained in:
parent
dc27d4b943
commit
bcebe4a2be
|
@ -39,7 +39,7 @@
|
|||
* from: Utah $Hdr: mem.c 1.14 90/10/12$
|
||||
*
|
||||
* from: @(#)mem.c 7.5 (Berkeley) 5/7/91
|
||||
* $Id: mem.c,v 1.4 1994/05/06 17:39:51 briggs Exp $
|
||||
* $Id: mem.c,v 1.5 1994/06/26 13:08:25 briggs Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -56,8 +56,8 @@
|
|||
|
||||
#include <vm/vm_param.h>
|
||||
#include <vm/lock.h>
|
||||
#include <vm/pmap.h>
|
||||
#include <vm/vm_prot.h>
|
||||
#include <vm/pmap.h>
|
||||
|
||||
/*ARGSUSED*/
|
||||
mmrw(dev, uio, flags)
|
||||
|
@ -95,15 +95,16 @@ mmrw(dev, uio, flags)
|
|||
VM_PROT_READ : VM_PROT_WRITE, TRUE);
|
||||
o = (int)uio->uio_offset & PGOFSET;
|
||||
c = (u_int)(NBPG - ((int)iov->iov_base & PGOFSET));
|
||||
c = MIN(c, (u_int)(NBPG - o));
|
||||
c = MIN(c, (u_int)iov->iov_len);
|
||||
c = min(c, (u_int)(NBPG - o));
|
||||
c = min(c, (u_int)iov->iov_len);
|
||||
error = uiomove((caddr_t)&vmmap[o], (int)c, uio);
|
||||
pmap_remove(pmap_kernel(), vmmap, &vmmap[NBPG]);
|
||||
pmap_remove(kernel_pmap, (vm_offset_t) vmmap,
|
||||
(vm_offset_t) &vmmap[NBPG]);
|
||||
continue;
|
||||
|
||||
/* minor device 1 is kernel memory */
|
||||
case 1:
|
||||
c = MIN(iov->iov_len, MAXPHYS);
|
||||
c = min(iov->iov_len, MAXPHYS);
|
||||
if (!kernacc((caddr_t)(long)uio->uio_offset, c,
|
||||
uio->uio_rw == UIO_READ ? B_READ : B_WRITE))
|
||||
return (EFAULT);
|
||||
|
@ -128,7 +129,7 @@ mmrw(dev, uio, flags)
|
|||
malloc(CLBYTES, M_TEMP, M_WAITOK);
|
||||
bzero(zbuf, CLBYTES);
|
||||
}
|
||||
c = MIN(iov->iov_len, CLBYTES);
|
||||
c = min(iov->iov_len, CLBYTES);
|
||||
error = uiomove(zbuf, (int)c, uio);
|
||||
continue;
|
||||
|
||||
|
|
Loading…
Reference in New Issue