Date: Fri, 23 Jun 2000 10:21:08 -0500 From: "Jacques A . Vidrine" <n@nectar.com> To: Brian Fundakowski Feldman <green@FreeBSD.org> Cc: Wes Peters <wes@softweyr.com>, Greg Lehey <grog@sydney.worldwide.lemis.com>, FreeBSD current users <FreeBSD-current@FreeBSD.ORG>, FreeBSD-arch@FreeBSD.ORG Subject: Re: -e option to umount? Message-ID: <20000623102108.H76049@bone.nectar.com> In-Reply-To: <Pine.BSF.4.21.0006221343230.16434-100000@builder.freebsd.org>; from green@FreeBSD.org on Thu, Jun 22, 2000 at 01:44:47PM -0700 References: <395265AA.AEC5EB8@softweyr.com> <Pine.BSF.4.21.0006221343230.16434-100000@builder.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[I think this thread belongs only on -current for the moment. Please followup there.] On Thu, Jun 22, 2000 at 01:44:47PM -0700, Brian Fundakowski Feldman wrote: > For what it's worth, there's a port, ports/sysutils/eject, which is made > to do this. I'm not one to deny a simple feature in the base system, > though, even if this feature is not /really/ that simple. There are two problems with ports/sysutils/eject: = It uses only CDIOCEJECT, which will not work for all removable media (e.g. SCSI disks, tapes). = It tries to unmount the device after ejecting it. This doesn't make since for all devices. Even for those that it _does_ make sense, it can be hard to correctly determine how (by what name) the device is mounted. So I wrote a simple utility that ejects media as follows: = Check to see if the given device is known to cam, and if so use camlib to eject it. = If that doesn't work, try the CDIOCEJECT ioctl. = If that didn't work, give up. It is available as a port at: http://www.nectar.com/freebsd/neject.tar Included in the port distfile is a patch (umount.patch) that adds a `-e' option to umount. If you use it, then umount will run eject for each local filesystem that is unmounted. I figure umount should call eject, rather than the other way around, since umount already knows the device name and mount point. I actually think that there should be load/eject media ioctls defined that are not specific to CDs. I'll post a separate message to that effect on -current. -- Jacques Vidrine / n@nectar.com / nectar@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000623102108.H76049>