How to safty unplug a USB Stick

Thomas Linton th.linton at gmail.com
Tue Dec 20 05:23:48 PST 2005


I don't have FS problems. After a umount the USB stick has still the
Power LED on. Under Linux an "eject" turns the Power LED off.

I tried /usr/ports/sysutils/eject without success (freeBSD 5.4)

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.




On 12/20/05, Dinesh Nair <dinesh at alphaque.com> wrote:
>
>
> On 12/20/05 07:44 Thomas Linton said the following:
> > Besides umount, to keep the FS consistant, I belive it would be necessary
> to
> > actually turn off the USB stick before you remove it. With Windows and
> Linux
> > there is also a way to safety remove -power off-  a USB stick.
>
> i've just unmounted and then pulled out various usb sticks, CF cards and
> sony memory sticks and have not seen any filesystem problems when i stick
> them back in again. never had to use camcontrol eject.
>
> --
> Regards,                           /\_/\   "All dogs go to heaven."
> dinesh at alphaque.com                (0 0)    http://www.alphaque.com/
> +==========================----oOO--(_)--OOo----==========================+
> | for a in past present future; do                                        |
> |   for b in clients employers associates relatives neighbours pets; do   |
> |   echo "The opinions here in no way reflect the opinions of my $a $b."  |
> | done; done                                                              |
> +=========================================================================+
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
>


More information about the freebsd-questions mailing list