procfs_mem.c (1817) | procfs_mem.c (2807) |
---|---|
1/* 2 * Copyright (c) 1993 Jan-Simon Pendry 3 * Copyright (c) 1993 Sean Eric Fagan 4 * Copyright (c) 1993 5 * The Regents of the University of California. All rights reserved. 6 * 7 * This code is derived from software contributed to Berkeley by 8 * Jan-Simon Pendry and Sean Eric Fagan. --- 23 unchanged lines hidden (view full) --- 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)procfs_mem.c 8.4 (Berkeley) 1/21/94 39 * | 1/* 2 * Copyright (c) 1993 Jan-Simon Pendry 3 * Copyright (c) 1993 Sean Eric Fagan 4 * Copyright (c) 1993 5 * The Regents of the University of California. All rights reserved. 6 * 7 * This code is derived from software contributed to Berkeley by 8 * Jan-Simon Pendry and Sean Eric Fagan. --- 23 unchanged lines hidden (view full) --- 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)procfs_mem.c 8.4 (Berkeley) 1/21/94 39 * |
40 * $Id: procfs_mem.c,v 1.1.1.1 1994/05/24 10:05:09 rgrimes Exp $ | 40 * $Id: procfs_mem.c,v 1.2 1994/08/02 07:45:13 davidg Exp $ |
41 */ 42 43/* 44 * This is a lightly hacked and merged version 45 * of sef's pread/pwrite functions 46 */ 47 48#include <sys/param.h> --- 126 unchanged lines hidden (view full) --- 175 */ 176 error = vm_map_pageable(kernel_map, kva, 177 kva + PAGE_SIZE, 0); 178 179 /* 180 * Now do the i/o move. 181 */ 182 if (!error) | 41 */ 42 43/* 44 * This is a lightly hacked and merged version 45 * of sef's pread/pwrite functions 46 */ 47 48#include <sys/param.h> --- 126 unchanged lines hidden (view full) --- 175 */ 176 error = vm_map_pageable(kernel_map, kva, 177 kva + PAGE_SIZE, 0); 178 179 /* 180 * Now do the i/o move. 181 */ 182 if (!error) |
183 error = uiomove(kva + page_offset, len, uio); | 183 error = uiomove((caddr_t)(kva + page_offset), 184 len, uio); |
184 185 vm_map_remove(kernel_map, kva, kva + PAGE_SIZE); 186 } 187 if (fix_prot) 188 vm_map_protect(map, pageno, pageno + PAGE_SIZE, 189 VM_PROT_READ|VM_PROT_EXECUTE, 0); 190 } while (error == 0 && uio->uio_resid > 0); 191 --- 110 unchanged lines hidden --- | 185 186 vm_map_remove(kernel_map, kva, kva + PAGE_SIZE); 187 } 188 if (fix_prot) 189 vm_map_protect(map, pageno, pageno + PAGE_SIZE, 190 VM_PROT_READ|VM_PROT_EXECUTE, 0); 191 } while (error == 0 && uio->uio_resid > 0); 192 --- 110 unchanged lines hidden --- |