fix to do writes in memory properly
authorBill Joy <wnj@ucbvax.Berkeley.EDU>
Mon, 28 Jun 1982 06:53:09 +0000 (22:53 -0800)
committerBill Joy <wnj@ucbvax.Berkeley.EDU>
Mon, 28 Jun 1982 06:53:09 +0000 (22:53 -0800)
SCCS-vsn: old/adb/adb.vax/access.c 4.5

usr/src/old/adb/adb.vax/access.c

index 3d64f4e..c271915 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include "defs.h"
  */
 
 #include "defs.h"
-static char sccsid[] = "@(#)access.c 4.4 %G%";
+static char sccsid[] = "@(#)access.c 4.4 5/15/81";
 
 
 MAP            txtmap;
 
 
 MAP            txtmap;
@@ -79,7 +79,7 @@ access(mode, addr, space, value)
                if (addr < 0)
                        return (0);
        }
                if (addr < 0)
                        return (0);
        }
-       if (physrw(file, addr, &w, rd) < 0)
+       if (physrw(file, addr, rd ? &w : &value, rd) < 0)
                rwerr(space);
        return (w);
 }
                rwerr(space);
        return (w);
 }