From b1e1ec7f1ba2dd942424e9337c1e808b1cf12f18 Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Mon, 3 Oct 1994 21:15:48 +0000 Subject: entered into RCS --- ufs/bmap.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'ufs') diff --git a/ufs/bmap.c b/ufs/bmap.c index e43a648c..0b3574b8 100644 --- a/ufs/bmap.c +++ b/ufs/bmap.c @@ -35,10 +35,18 @@ fetch_indir_spec (struct node *np, volatile daddr_t lbn, if (err = diskfs_catch_exception ()) return err; + indirs[0].offset = -2; + indirs[1].offset = -2; + indirs[2].offset = -2; + indirs[3].offset = -2; + if (lbn < NDADDR) { - indirs[0].bno = di->di_db[lbn]; - indirs[0].offset = -1; + if (lbn >= 0) + { + indirs[0].bno = di->di_db[lbn]; + indirs[0].offset = -1; + } diskfs_end_catch_exception (); return 0; -- cgit v1.2.3