From 5cb8c15669c5ac51b5aa9e33671fef7dcc0916b5 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Sun, 7 Jan 2001 19:31:50 +0000 Subject: doc/ 2001-01-07 Marcus Brinkmann * hurd.texi (Diskfs Callbacks): Make diskfs_dirstat_size const. ext2fs/ 2001-01-07 Marcus Brinkmann * dir.c: Make diskfs_dirstat_size const. isofs/ 2001-01-07 Marcus Brinkmann * lookup.c: Make diskfs_dirstat_size const. ufs/ 2001-01-07 Marcus Brinkmann * dir.c: Make diskfs_dirstat_size const. libdiskfs/ 2001-01-07 Marcus Brinkmann * diskfs.h: Make diskfs_dirstat_size const. libdiskfs/ 2001-01-07 Marcus Brinkmann * file-statfs.c: Include . ftpfs/ 2001-01-07 Marcus Brinkmann * dir.c (ftpfs_dir_create): Fix last change (calloc invocation). 2001-01-07 Marcus Brinkmann * copy.c: Include . 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. --- doc/ChangeLog | 4 ++++ doc/hurd.texi | 2 +- ext2fs/ChangeLog | 4 ++++ ext2fs/dir.c | 2 +- ftpfs/ChangeLog | 4 ++++ ftpfs/dir.c | 2 +- isofs/ChangeLog | 4 ++++ isofs/lookup.c | 2 +- libdiskfs/ChangeLog | 8 ++++++++ libdiskfs/diskfs.h | 2 +- libdiskfs/file-statfs.c | 1 + libstore/ChangeLog | 8 ++++++++ libstore/copy.c | 10 ++++++---- ufs/ChangeLog | 4 ++++ ufs/dir.c | 2 +- 15 files changed, 49 insertions(+), 10 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index b0ca95f8..188ad440 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,7 @@ +2001-01-07 Marcus Brinkmann + + * hurd.texi (Diskfs Callbacks): Make diskfs_dirstat_size const. + 2000-04-18 Gordon Matzigkeit * hurd.texi (Microkernel Object Library): Delete deprecated diff --git a/doc/hurd.texi b/doc/hurd.texi index f6355628..9097163c 100644 --- a/doc/hurd.texi +++ b/doc/hurd.texi @@ -3942,7 +3942,7 @@ You must define this type, which will hold information between a call to enough information so that those calls work as described below. @end deftypevr -@deftypevar size_t diskfs_dirstat_size +@deftypevar const size_t diskfs_dirstat_size This must be the size in bytes of a @code{struct dirstat}. @end deftypevar diff --git a/ext2fs/ChangeLog b/ext2fs/ChangeLog index 2f4d0d67..b20901a1 100644 --- a/ext2fs/ChangeLog +++ b/ext2fs/ChangeLog @@ -1,3 +1,7 @@ +2001-01-07 Marcus Brinkmann + + * dir.c: Make diskfs_dirstat_size const. + 2000-12-21 Marcus Brinkmann * pager.c: Include . diff --git a/ext2fs/dir.c b/ext2fs/dir.c index 2887e1b0..4b16c665 100644 --- a/ext2fs/dir.c +++ b/ext2fs/dir.c @@ -87,7 +87,7 @@ struct dirstat size_t nbytes; }; -size_t diskfs_dirstat_size = sizeof (struct dirstat); +const size_t diskfs_dirstat_size = sizeof (struct dirstat); /* Initialize DS such that diskfs_drop_dirstat will ignore it. */ void diff --git a/ftpfs/ChangeLog b/ftpfs/ChangeLog index a339fec7..416bd9b7 100644 --- a/ftpfs/ChangeLog +++ b/ftpfs/ChangeLog @@ -1,3 +1,7 @@ +2001-01-07 Marcus Brinkmann + + * dir.c (ftpfs_dir_create): Fix last change (calloc invocation). + 2000-12-21 Marcus Brinkmann * dir.c (ftpfs_dir_create): New macro INIT_HTABLE_LEN to diff --git a/ftpfs/dir.c b/ftpfs/dir.c index 462567f6..9e550ce8 100644 --- a/ftpfs/dir.c +++ b/ftpfs/dir.c @@ -818,7 +818,7 @@ ftpfs_dir_create (struct ftpfs *fs, struct node *node, const char *rmt_path, { struct ftpfs_dir *new = malloc (sizeof (struct ftpfs_dir)); struct ftpfs_dir_entry **htable - = calloc (INIT_HTABLE_LEN * sizeof (struct ftpfs_dir_entry *)); + = calloc (INIT_HTABLE_LEN, sizeof (struct ftpfs_dir_entry *)); if (!new || !htable) { diff --git a/isofs/ChangeLog b/isofs/ChangeLog index 35761f0f..728df807 100644 --- a/isofs/ChangeLog +++ b/isofs/ChangeLog @@ -1,3 +1,7 @@ +2001-01-07 Marcus Brinkmann + + * lookup.c: Make diskfs_dirstat_size const. + 2000-12-21 Marcus Brinkmann * rr.c (rrip_work): Use strdup instead malloc and strcpy. diff --git a/isofs/lookup.c b/isofs/lookup.c index e6ee692f..8a0777e4 100644 --- a/isofs/lookup.c +++ b/isofs/lookup.c @@ -410,7 +410,7 @@ diskfs_get_directs (struct node *dp, } /* We have no dirstats at all. */ -size_t diskfs_dirstat_size = 0; +const size_t diskfs_dirstat_size = 0; void diskfs_null_dirstat (struct dirstat *ds) diff --git a/libdiskfs/ChangeLog b/libdiskfs/ChangeLog index 459aa5d3..614f7889 100644 --- a/libdiskfs/ChangeLog +++ b/libdiskfs/ChangeLog @@ -1,3 +1,11 @@ +2001-01-07 Marcus Brinkmann + + * diskfs.h: Make diskfs_dirstat_size const. + +2001-01-07 Marcus Brinkmann + + * file-statfs.c: Include . + 2000-12-26 Roland McGrath * file-statfs.c (diskfs_S_file_statfs): Zero out the struct statfs diff --git a/libdiskfs/diskfs.h b/libdiskfs/diskfs.h index d0c745f6..5d4072c0 100644 --- a/libdiskfs/diskfs.h +++ b/libdiskfs/diskfs.h @@ -193,7 +193,7 @@ struct dirstat; /* The user must define this variable; it should be the size in bytes of a struct dirstat. */ -extern size_t diskfs_dirstat_size; +extern const size_t diskfs_dirstat_size; /* The user must define this variable; it is the maximum number of links to any one file. The implementation of dir_rename does not know diff --git a/libdiskfs/file-statfs.c b/libdiskfs/file-statfs.c index 62eaf67b..817b0115 100644 --- a/libdiskfs/file-statfs.c +++ b/libdiskfs/file-statfs.c @@ -15,6 +15,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include "priv.h" 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 + + * copy.c: Include . 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 * 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 #include #include +#include + +#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; } diff --git a/ufs/ChangeLog b/ufs/ChangeLog index 6927195b..14aed9dd 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,7 @@ +2001-01-07 Marcus Brinkmann + + * dir.c: Make diskfs_dirstat_size const. + 2000-12-02 Roland McGrath * inode.c (write_node): Remove assert that dn_set_mtime et al are diff --git a/ufs/dir.c b/ufs/dir.c index 2cc77398..7880ca21 100644 --- a/ufs/dir.c +++ b/ufs/dir.c @@ -79,7 +79,7 @@ struct dirstat size_t nbytes; }; -size_t diskfs_dirstat_size = sizeof (struct dirstat); +const size_t diskfs_dirstat_size = sizeof (struct dirstat); /* Initialize DS such that diskfs_drop_dirstat will ignore it. */ void -- cgit v1.2.3