From: millert Date: Tue, 11 Apr 2000 18:38:32 +0000 (+0000) Subject: If realpath() fails, just use the old name and don't make it a fatal error. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=286915a40e7ff212750a0519e45fe591657a7316;p=openbsd If realpath() fails, just use the old name and don't make it a fatal error. Closes PR #1185 --- diff --git a/sbin/umount/umount.c b/sbin/umount/umount.c index 9e21e6087fc..e0bf0cbd3e4 100644 --- a/sbin/umount/umount.c +++ b/sbin/umount/umount.c @@ -1,4 +1,4 @@ -/* $OpenBSD: umount.c,v 1.9 2000/02/05 18:47:10 imp Exp $ */ +/* $OpenBSD: umount.c,v 1.10 2000/04/11 18:38:32 millert Exp $ */ /* $NetBSD: umount.c,v 1.16 1996/05/11 14:13:55 mycroft Exp $ */ /*- @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)umount.c 8.3 (Berkeley) 2/20/94"; #else -static char rcsid[] = "$OpenBSD: umount.c,v 1.9 2000/02/05 18:47:10 imp Exp $"; +static char rcsid[] = "$OpenBSD: umount.c,v 1.10 2000/04/11 18:38:32 millert Exp $"; #endif #endif /* not lint */ @@ -178,11 +178,10 @@ umountfs(oname) char *delimp, *hostp, *mntpt; char *name, *newname, rname[MAXPATHLEN], type[MFSNAMELEN]; - if (realpath(oname, rname) == NULL) { - warn("%s", oname); - return (1); - } - mntpt = name = rname; + if (realpath(oname, rname) == NULL) + mntpt = name = oname; + else + mntpt = name = rname; newname = NULL; if (stat(name, &sb) < 0) {