From owner-freebsd-questions@FreeBSD.ORG Tue Dec 20 20:00:46 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D077E16A420 for ; Tue, 20 Dec 2005 20:00:46 +0000 (GMT) (envelope-from spammesilly@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id BA09543D67 for ; Tue, 20 Dec 2005 20:00:45 +0000 (GMT) (envelope-from spammesilly@gmail.com) Received: by wproxy.gmail.com with SMTP id i31so1415557wra for ; Tue, 20 Dec 2005 12:00:45 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=SjxSziFZ9bx94Q9r5iMSPlOy99eLVEAcAbeCB+UnAa0C8dXNl0duXjRPl3B4l3kZec8Jw9q7Z1C6+KxukGKDOOSQPoHoaq9tz1OTWLufNnQTCRraH7/u0eXmE6FiTedxcA84Xm+nCWUI2t8y9OfMZAObYEmiP4JgKw+CsnyNseY= Received: by 10.54.83.19 with SMTP id g19mr591059wrb; Tue, 20 Dec 2005 12:00:44 -0800 (PST) Received: by 10.54.121.2 with HTTP; Tue, 20 Dec 2005 12:00:44 -0800 (PST) Message-ID: Date: Tue, 20 Dec 2005 15:00:44 -0500 From: Daniel Gonzalez To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: How to Safely unplug USB stick X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2005 20:00:47 -0000 > > I went a little bit through the source of an linux "eject" and the > *BSD "eject". The Linux Verion is using "cdrom.h" and *BSD "cdio.h". > I think that both "eject's" are actually doing the same (*BSD: > ioctl(fd,CDIOEJECT); Linux ioctl (fd,CDROMEJECT)). I'm not a > kernel/driver programmer, but I think the umass Driver or SCSI Driver > (because "eject /dev/cd0" also doesn't work ) doesn't accept a > CDIOEJECT. Have you tried: # /usr/local/sbin/eject /dev/acd0 My cdrom drive is usually /dev/cd0 because it's a CD RW. Otherwise non-writable drives are /dev/acd0. My CDRW won't eject with /dev/cd0 but it works fine with eject /dev/acd0. As for the USB stick, I mount it using the following: # mount_msdosfs -o longnames /dev/da0s1 /mnt/usbflash0 And umount with the following: # umount /mnt/usbflash0 (I'm using PCBSD which is FreeBSD 6.0-RELEASE, GENERIC kernel Unmounting the drive causes the LED light to flicker, then extinguish. Don't know if that helps you any, but that is what happens on my system Hope that helps -- Dan Gonzalez spammesilly@gmail.com IM: signulth