diff options
author | Marcus Brinkmann <marcus@gnu.org> | 2001-01-07 19:31:50 +0000 |
---|---|---|
committer | Marcus Brinkmann <marcus@gnu.org> | 2001-01-07 19:31:50 +0000 |
commit | 5cb8c15669c5ac51b5aa9e33671fef7dcc0916b5 (patch) | |
tree | 624d306c3a3ca22d419c6d3926557e72fd76f871 /libstore | |
parent | 1b062b32391b5ec34652853eddaa79ab9d625cc1 (diff) |
doc/
2001-01-07 Marcus Brinkmann <marcus@gnu.org>
* hurd.texi (Diskfs Callbacks): Make diskfs_dirstat_size const.
ext2fs/
2001-01-07 Marcus Brinkmann <marcus@gnu.org>
* dir.c: Make diskfs_dirstat_size const.
isofs/
2001-01-07 Marcus Brinkmann <marcus@gnu.org>
* lookup.c: Make diskfs_dirstat_size const.
ufs/
2001-01-07 Marcus Brinkmann <marcus@gnu.org>
* dir.c: Make diskfs_dirstat_size const.
libdiskfs/
2001-01-07 Marcus Brinkmann <marcus@gnu.org>
* diskfs.h: Make diskfs_dirstat_size const.
libdiskfs/
2001-01-07 Marcus Brinkmann <marcus@gnu.org>
* file-statfs.c: Include <string.h>.
ftpfs/
2001-01-07 Marcus Brinkmann <marcus@gnu.org>
* dir.c (ftpfs_dir_create): Fix last change (calloc invocation).
2001-01-07 Marcus Brinkmann <marcus@gnu.org>
* copy.c: Include <mach.h>. New macro page_aligned.
(copy_write): Cast buf to vm_address_t in call to vm_write.
Dereference amount for memcpy.
(copy_read): Add len parameter to vm_read, remove redundant following
len assignment.
Diffstat (limited to 'libstore')
-rw-r--r-- | libstore/ChangeLog | 8 | ||||
-rw-r--r-- | libstore/copy.c | 10 |
2 files changed, 14 insertions, 4 deletions
diff --git a/libstore/ChangeLog b/libstore/ChangeLog index cb529cee..fe1405fc 100644 --- a/libstore/ChangeLog +++ b/libstore/ChangeLog @@ -1,3 +1,11 @@ +2001-01-07 Marcus Brinkmann <marcus@gnu.org> + + * copy.c: Include <mach.h>. New macro page_aligned. + (copy_write): Cast buf to vm_address_t in call to vm_write. + Dereference amount for memcpy. + (copy_read): Add len parameter to vm_read, remove redundant following + len assignment. + 2000-12-20 Roland McGrath <roland@frob.com> * zero.c (zero_open): Check for END being null after strtoul call. diff --git a/libstore/copy.c b/libstore/copy.c index b5f00c3b..6a4d0d5a 100644 --- a/libstore/copy.c +++ b/libstore/copy.c @@ -24,6 +24,9 @@ #include <string.h> #include <malloc.h> #include <sys/mman.h> +#include <mach.h> + +#define page_aligned(addr) (((size_t) addr & (vm_page_size - 1)) == 0) #include "store.h" @@ -37,8 +40,7 @@ copy_read (struct store *store, { /* When reading whole pages, we can avoid any real copying. */ error_t err = vm_read (mach_task_self (), - (vm_address_t) data, amount, (pointer_t *) buf); - *len = amount; + (vm_address_t) data, amount, (pointer_t *) buf, len); return err; } @@ -65,12 +67,12 @@ copy_write (struct store *store, { /* When reading whole pages, we can avoid any real copying. */ error_t err = vm_write (mach_task_self (), - (vm_address_t) data, buf, len); + (vm_address_t) data, (vm_address_t) buf, len); *amount = len; return err; } - memcpy (data, buf, amount); + memcpy (data, buf, *amount); *amount = len; return 0; } |