From 4aa08f3abdbaffdf78a844c44ade693cf7daea1f Mon Sep 17 00:00:00 2001 From: Jared Yanovich Date: Fri, 8 Apr 2005 20:09:39 +0000 Subject: Sync with recent realpath(3) changes: on failure, don't use the second argument "resolved", since it is undefined. ok and help millert, otto --- sbin/mount/mount.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sbin/mount') diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c index 39355330db6..b6ecf946516 100644 --- a/sbin/mount/mount.c +++ b/sbin/mount/mount.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mount.c,v 1.37 2004/11/13 21:45:50 miod Exp $ */ +/* $OpenBSD: mount.c,v 1.38 2005/04/08 20:09:36 jaredy Exp $ */ /* $NetBSD: mount.c,v 1.24 1995/11/18 03:34:29 cgd Exp $ */ /* @@ -40,7 +40,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)mount.c 8.19 (Berkeley) 4/19/94"; #else -static char rcsid[] = "$OpenBSD: mount.c,v 1.37 2004/11/13 21:45:50 miod Exp $"; +static char rcsid[] = "$OpenBSD: mount.c,v 1.38 2005/04/08 20:09:36 jaredy Exp $"; #endif #endif /* not lint */ @@ -216,7 +216,7 @@ main(int argc, char * const argv[]) usage(); if (realpath(*argv, mntpath) == NULL) - err(1, "realpath %s", mntpath); + err(1, "realpath %s", *argv); if (hasopt(options, "update")) { if ((mntbuf = getmntpt(mntpath)) == NULL) errx(1, @@ -348,7 +348,7 @@ mountfs(const char *vfstype, const char *spec, const char *name, char *optbuf, execname[MAXPATHLEN], mntpath[MAXPATHLEN]; if (realpath(name, mntpath) == NULL) { - warn("realpath %s", mntpath); + warn("realpath %s", name); return (1); } -- cgit v1.2.3