summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2001-08-15 06:10:49 +0000
committerRoland McGrath <roland@gnu.org>2001-08-15 06:10:49 +0000
commitd41992085608d485cf0e6f0282ff1d61c19fa9f1 (patch)
treecfdd6c998b51781c84f62fd959fe27e1b40d9036
parente749545a3e4cb7664c0348067c49aa0d89caf70c (diff)
2001-08-12 Neal H Walfield <neal@cs.uml.edu>
* pager.c: Include <errno.h>. (pager_read_page): Use memset, not bzero. * storeio.c (check_open_hook): Typo fix in comment. (trivfs_modify_stat): STORE->size is a store_offset_t. It not a vm_size_t.
-rw-r--r--storeio/pager.c3
-rw-r--r--storeio/storeio.c4
2 files changed, 4 insertions, 3 deletions
diff --git a/storeio/pager.c b/storeio/pager.c
index 75456b83..904c4b69 100644
--- a/storeio/pager.c
+++ b/storeio/pager.c
@@ -23,6 +23,7 @@
#include <assert.h>
#include <strings.h>
#include <unistd.h>
+#include <errno.h>
#include <sys/mman.h>
#include "dev.h"
@@ -53,7 +54,7 @@ pager_read_page (struct user_pager_info *upi,
if (!err && want < vm_page_size)
/* Zero anything we didn't read. Allocation only happens in page-size
multiples, so we know we can write there. */
- bzero ((char *)*buf + want, vm_page_size - want);
+ memset ((char *)*buf + want, '\0', vm_page_size - want);
*writelock = (store->flags & STORE_READONLY);
diff --git a/storeio/storeio.c b/storeio/storeio.c
index 87bc249c..84b90067 100644
--- a/storeio/storeio.c
+++ b/storeio/storeio.c
@@ -222,7 +222,7 @@ check_open_hook (struct trivfs_control *trivfs_control,
err = dev_open (dev);
if (err && (flags & (O_READ|O_WRITE)) == 0)
/* If we're not opening for read or write, then just ignore the
- error, as this allows stat to word correctly. XXX */
+ error, as this allows stat to work correctly. XXX */
err = 0;
}
mutex_unlock (&dev->lock);
@@ -287,7 +287,7 @@ trivfs_modify_stat (struct trivfs_protid *cred, struct stat *st)
/* An open device. */
{
struct store *store = open->dev->store;
- vm_size_t size = store->size;
+ store_offset_t size = store->size;
if (store->block_size > 1)
st->st_blksize = store->block_size;