diff options
author | Thomas Bushnell <thomas@gnu.org> | 1997-08-20 19:06:42 +0000 |
---|---|---|
committer | Thomas Bushnell <thomas@gnu.org> | 1997-08-20 19:06:42 +0000 |
commit | 7b01458f66d04a90e8497bd60f1baa7eb79b9d6a (patch) | |
tree | b81d77f74bfb35d39e7b3a356ff16067f22cb63a /ufs/dir.c | |
parent | 56c05885be4c655fc18c119dbb87527bf5b9af86 (diff) |
Wed Aug 20 14:34:24 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
* dir.c (diskfs_lookup_hard): Cope with error return from
diskfs_get_filemap.
* sizes.c (diskfs_grow): Likewise.
* dir.c (diskfs_dirempty): Cope (poorly) with error return from
diskfs_get_filemap.
* sizes.c (diskfs_truncate): Likewise.
(block_extended): Likewise.
* pager.c (diskfs_get_filemap): If pager_create fails, return
error to caller.
Diffstat (limited to 'ufs/dir.c')
-rw-r--r-- | ufs/dir.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -1,5 +1,5 @@ /* Directory management routines - Copyright (C) 1994, 1995, 1996 Free Software Foundation + Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -145,6 +145,10 @@ diskfs_lookup_hard (struct node *dp, char *name, enum lookup_type type, /* Map in the directory contents. */ memobj = diskfs_get_filemap (dp, prot); + + if (memobj == MACH_PORT_NULL) + return errno; + buf = 0; /* We allow extra space in case we have to do an EXTEND. */ buflen = round_page (dp->dn_stat.st_size + DIRBLKSIZ); @@ -727,6 +731,11 @@ diskfs_dirempty(struct node *dp, error_t err; memobj = diskfs_get_filemap (dp, VM_PROT_READ); + + if (memobj == MACH_PORT_NULL) + /* XXX should reflect error properly */ + return 0; + buf = 0; err = vm_map (mach_task_self (), &buf, dp->dn_stat.st_size, 0, |