Date: Tue, 20 Dec 2005 15:00:44 -0500 From: Daniel Gonzalez <spammesilly@gmail.com> To: freebsd-questions@freebsd.org Subject: Re: How to Safely unplug USB stick Message-ID: <ef208e530512201200n59126bedu771882c2b39ae528@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
> > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ef208e530512201200n59126bedu771882c2b39ae528>