From 6c70c6d345509bf6690b4443ba36974d2c6a147b Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Wed, 8 Sep 1999 08:41:59 +0000 Subject: 1999-09-08 Thomas Bushnell, BSG * dir.c (diskfs_get_directs): Initialize `err' to shut gcc up. 1999-09-07 Thomas Bushnell, BSG * dir.c (diskfs_lookup_hard): Pass additional parameter to diskfs_get_filemap. (diskfs_dirempty): Likewise. * sizes.c (diskfs_truncate): Likewise. (block_extended): Likewise. (diskfs_grow): Likewise. * pager.c (diskfs_get_filemap): Accept additional parameter. --- ufs/ChangeLog | 14 ++++++++++++++ ufs/dir.c | 6 +++--- ufs/pager.c | 4 +++- ufs/sizes.c | 6 +++--- 4 files changed, 23 insertions(+), 7 deletions(-) (limited to 'ufs') diff --git a/ufs/ChangeLog b/ufs/ChangeLog index 1375fede..4bebe284 100644 --- a/ufs/ChangeLog +++ b/ufs/ChangeLog @@ -1,3 +1,17 @@ +1999-09-08 Thomas Bushnell, BSG + + * dir.c (diskfs_get_directs): Initialize `err' to shut gcc up. + +1999-09-07 Thomas Bushnell, BSG + + * dir.c (diskfs_lookup_hard): Pass additional parameter to + diskfs_get_filemap. + (diskfs_dirempty): Likewise. + * sizes.c (diskfs_truncate): Likewise. + (block_extended): Likewise. + (diskfs_grow): Likewise. + * pager.c (diskfs_get_filemap): Accept additional parameter. + 1999-09-04 Thomas Bushnell, BSG * pager.c (find_address): If !ISREAD, then don't return errors for diff --git a/ufs/dir.c b/ufs/dir.c index 304c8a44..aee08bb0 100644 --- a/ufs/dir.c +++ b/ufs/dir.c @@ -144,7 +144,7 @@ diskfs_lookup_hard (struct node *dp, const char *name, enum lookup_type type, ds->stat = LOOKING; /* Map in the directory contents. */ - memobj = diskfs_get_filemap (dp, prot); + memobj = diskfs_get_filemap (dp, 0, prot); if (memobj == MACH_PORT_NULL) return errno; @@ -730,7 +730,7 @@ diskfs_dirempty(struct node *dp, memory_object_t memobj; error_t err; - memobj = diskfs_get_filemap (dp, VM_PROT_READ); + memobj = diskfs_get_filemap (dp, 0, VM_PROT_READ); if (memobj == MACH_PORT_NULL) /* XXX should reflect error properly */ @@ -839,7 +839,7 @@ diskfs_get_directs (struct node *dp, char buf[DIRBLKSIZ]; char *bufp; int bufvalid; - error_t err; + error_t err = 0; int i; char *datap; struct directory_entry *entryp; diff --git a/ufs/pager.c b/ufs/pager.c index 3038932d..3cba748e 100644 --- a/ufs/pager.c +++ b/ufs/pager.c @@ -547,11 +547,13 @@ flush_node_pager (struct node *node) /* Call this to create a FILE_DATA pager and return a send right. NP must be locked. PROT is the max protection desired. */ mach_port_t -diskfs_get_filemap (struct node *np, vm_prot_t prot) +diskfs_get_filemap (struct node *np, int index, vm_prot_t prot) { struct user_pager_info *upi; mach_port_t right; + assert (index == 0); /* XXX */ + assert (S_ISDIR (np->dn_stat.st_mode) || S_ISREG (np->dn_stat.st_mode) || (S_ISLNK (np->dn_stat.st_mode) diff --git a/ufs/sizes.c b/ufs/sizes.c index 58cbfc98..cffce158 100644 --- a/ufs/sizes.c +++ b/ufs/sizes.c @@ -103,7 +103,7 @@ diskfs_truncate (struct node *np, pager_change_attributes (upi->p, MAY_CACHE, MEMORY_OBJECT_COPY_NONE, 1); - obj = diskfs_get_filemap (np, VM_PROT_READ | VM_PROT_WRITE); + obj = diskfs_get_filemap (np, 0, VM_PROT_READ | VM_PROT_WRITE); if (obj != MACH_PORT_NULL) { /* XXX should cope with errors from diskfs_get_filemap */ @@ -403,7 +403,7 @@ block_extended (struct node *np, volatile int *pokeaddr; /* Map in this part of the file */ - mapobj = diskfs_get_filemap (np, VM_PROT_WRITE | VM_PROT_READ); + mapobj = diskfs_get_filemap (np, 0, VM_PROT_WRITE | VM_PROT_READ); /* XXX Should cope with errors from diskfs_get_filemap and back out the operation here. */ @@ -484,7 +484,7 @@ diskfs_grow (struct node *np, assert (!diskfs_readonly); /* This reference will ensure that NP->dn->fileinfo stays allocated. */ - pagerpt = diskfs_get_filemap (np, VM_PROT_WRITE|VM_PROT_READ); + pagerpt = diskfs_get_filemap (np, 0, VM_PROT_WRITE|VM_PROT_READ); if (pagerpt == MACH_PORT_NULL) return errno; -- cgit v1.2.3