Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Aug 2002 17:55:53 -0700 (PDT)
From:      Nate Lawson <nate@root.org>
To:        freebsd-bugs@FreeBSD.org, freebsd-gnats-submit@freebsd.org
Cc:        cyrille.lefevre@laposte.net, alfred@freebsd.org
Subject:   Re: kern/41527: unable to umount /dev/fd
Message-ID:  <Pine.BSF.4.21.0208221749130.60931-100000@root.org>
In-Reply-To: <200208220106.g7M16Lnm031116@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Please use the following patch.  I have tested it and it works fine.  
Since alfred has been in the code a lot recently, I'll commit the
following if he agrees.

-Nate

--- fdesc_vfsops.c.orig	Fri Mar 29 20:03:52 2002
+++ fdesc_vfsops.c	Thu Aug 22 17:40:23 2002
@@ -79,6 +79,10 @@
 	int error = 0;
 	struct fdescmount *fmp;
 	struct vnode *rvp;
+	size_t size;
+
+	if (path == NULL)
+		panic("fdesc_mount: cannot mount as root");
 
 	/*
 	 * Update is a no-op
@@ -100,6 +104,8 @@
 	mp->mnt_data = (qaddr_t) fmp;
 	vfs_getnewfsid(mp);
 
+	(void) copyinstr(path, mp->mnt_stat.f_mntonname, MNAMELEN - 1, &size);
+	bzero(mp->mnt_stat.f_mntonname + size, MNAMELEN - size);
 	bzero(mp->mnt_stat.f_mntfromname, MNAMELEN);
 	bcopy("fdesc", mp->mnt_stat.f_mntfromname, sizeof("fdesc"));
 	(void)fdesc_statfs(mp, &mp->mnt_stat, p);


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0208221749130.60931-100000>