/[hurd]/hurd/libstore/copy.c
ViewVC logotype

Diff of /hurd/libstore/copy.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.12 by roland, Sun Oct 14 21:08:39 2001 UTC revision 1.13 by marcus, Thu Mar 14 01:23:08 2002 UTC
# Line 1  Line 1 
1  /* Copy store backend  /* Copy store backend
2    
3     Copyright (C) 1995,96,97,99,2000,01 Free Software Foundation, Inc.     Copyright (C) 1995,96,97,99,2000,01,02 Free Software Foundation, Inc.
4     Written by Miles Bader <miles@gnu.org>     Written by Miles Bader <miles@gnu.org>
5    
6     This file is part of the GNU Hurd.     This file is part of the GNU Hurd.
# Line 36  copy_read (struct store *store, store_of Line 36  copy_read (struct store *store, store_of
36    char *data = store->hook + (addr * store->block_size);    char *data = store->hook + (addr * store->block_size);
37    
38    if (page_aligned (data) && page_aligned (amount))    if (page_aligned (data) && page_aligned (amount))
39      {      /* When reading whole pages, we can avoid any real copying.  */
40        /* When reading whole pages, we can avoid any real copying.  */      return vm_read (mach_task_self (),
41        error_t err = vm_read (mach_task_self (),                      (vm_address_t) data, amount,
42                               (vm_address_t) data, amount,                      (pointer_t *) buf, len);
                              (pointer_t *) buf, len);  
       *len *= vm_page_size;  
       return err;  
     }  
43    
44    if (*len < amount)    if (*len < amount)
45      /* Have to allocate memory for the return value.  */      /* Have to allocate memory for the return value.  */

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26