diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2000-04-11 18:38:33 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2000-04-11 18:38:33 +0000 |
commit | 1e273e04cecc1357c26f34449b7dc77b1abc70cd (patch) | |
tree | 12225c77ad577d814936424c61de58dd6f9dbf21 /sbin/umount | |
parent | 071f158f18611d3672ba12b53a1acfd2affc0954 (diff) |
If realpath() fails, just use the old name and don't make it a fatal error.
Closes PR #1185
Diffstat (limited to 'sbin/umount')
-rw-r--r-- | sbin/umount/umount.c | 13 |
1 files changed, 6 insertions, 7 deletions
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) { |