fix includes; speed up writes to /dev/null
authorMike Karels <karels@ucbvax.Berkeley.EDU>
Sun, 21 Apr 1991 08:20:57 +0000 (00:20 -0800)
committerMike Karels <karels@ucbvax.Berkeley.EDU>
Sun, 21 Apr 1991 08:20:57 +0000 (00:20 -0800)
SCCS-vsn: sys/hp300/hp300/mem.c 7.4

usr/src/sys/hp300/hp300/mem.c

index 12b9670..42a9cbe 100644 (file)
  *
  * from: Utah $Hdr: mem.c 1.13 89/10/08$
  *
  *
  * from: Utah $Hdr: mem.c 1.13 89/10/08$
  *
- *     @(#)mem.c       7.3 (Berkeley) %G%
+ *     @(#)mem.c       7.4 (Berkeley) %G%
  */
 
 /*
  * Memory special file
  */
 
  */
 
 /*
  * Memory special file
  */
 
-#include "sys/param.h"
-#include "sys/user.h"
-#include "sys/conf.h"
-#include "sys/buf.h"
-#include "sys/systm.h"
-#include "sys/cmap.h"
-#include "sys/uio.h"
-#include "sys/malloc.h"
+#include "param.h"
+#include "conf.h"
+#include "buf.h"
+#include "systm.h"
+#include "malloc.h"
 
 #include "../include/cpu.h"
 
 #include "vm/vm_param.h"
 
 #include "../include/cpu.h"
 
 #include "vm/vm_param.h"
+#include "vm/lock.h"
+#include "vm/vm_statistics.h"
 #include "vm/pmap.h"
 #include "vm/vm_prot.h"
 
 #include "vm/pmap.h"
 #include "vm/vm_prot.h"
 
@@ -87,10 +86,9 @@ mmrw(dev, uio, flags)
 
 /* minor device 2 is EOF/RATHOLE */
                case 2:
 
 /* minor device 2 is EOF/RATHOLE */
                case 2:
-                       if (uio->uio_rw == UIO_READ)
-                               return (0);
-                       c = iov->iov_len;
-                       break;
+                       if (uio->uio_rw == UIO_WRITE)
+                               uio->uio_resid = 0;
+                       return (0);
 
 /* minor device 12 (/dev/zero) is source of nulls on read, rathole on write */
                case 12:
 
 /* minor device 12 (/dev/zero) is source of nulls on read, rathole on write */
                case 12: