Avoid a core dump if ginode() returns NULL. Correct an error message
while we're here.
This commit is contained in:
parent
66574ac8a6
commit
00d9f4be09
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: setup.c,v 1.27 2006/04/17 19:05:16 perseant Exp $ */
|
||||
/* $NetBSD: setup.c,v 1.28 2006/04/28 00:07:54 perseant Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
||||
@ -205,7 +205,7 @@ setup(const char *dev)
|
||||
if (fs == NULL) {
|
||||
if (preen)
|
||||
printf("%s: ", cdevname());
|
||||
pfatal("BAD SUPER BLOCK\n");
|
||||
errexit("BAD SUPER BLOCK OR IFILE INODE NOT FOUND\n");
|
||||
}
|
||||
if ((lp = getdisklabel((char *) NULL, fsreadfd)) != NULL)
|
||||
dev_bsize = secsize = lp->d_secsize;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: utilities.c,v 1.23 2006/04/13 19:50:10 perseant Exp $ */
|
||||
/* $NetBSD: utilities.c,v 1.24 2006/04/28 00:07:54 perseant Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1986, 1993
|
||||
@ -220,6 +220,8 @@ namelookup:
|
||||
idesc.id_parent = ino;
|
||||
idesc.id_func = findname;
|
||||
idesc.id_name = namebuf;
|
||||
if (ginode(idesc.id_number) == NULL)
|
||||
break;
|
||||
if ((ckinode(ginode(idesc.id_number), &idesc) & FOUND) == 0)
|
||||
break;
|
||||
len = strlen(namebuf);
|
||||
|
Loading…
Reference in New Issue
Block a user