Ticket #4406 (closed defect: fixed)
XO leaves trash on USB sticks
| Reported by: | gnu | Owned by: | tomeu |
|---|---|---|---|
| Priority: | high | Milestone: | Future Release |
| Component: | sugar-datastore | Version: | Development build as of this date |
| Keywords: | Cc: | william.waddington@…, ffm, Eben, krstic, christianmarc | |
| Action Needed: | never set | Verified: | no |
| Deployments affected: | Blocked By: | ||
| Blocking: |
Description
B4, Build 611, Q2D01.
I thought Macintoshes were bad, dropping crumbs of garbage all over your USB drive whenever you plug it into a Mac. Now the OLPC is doing the same ugly thing -- but four times as bad.
On a real Linux machine (that doesn't trash USB keys), I put a single file (SimCity.xo) in the root of an otherwise empty 2GB USB key, unmounted it, and moved it to the XO. I clicked around in the Journal, trying to get it to read the USB stick. Various things did provoke the USB access light to light, though I never did see the file appear anywhere. Ultimately I rebooted the XO (it got me into a corner of the Journal that wouldn't let me out, and I couldn't unmount the USB stick, not from the dev console, and couldn't navigate to the "Unmount" pop-up because it wouldn't show me that screen). I removed the stick during the reboot, and examined it on a Linux machine. It ended up containing:
bash-3.1$ ls -la /media/COMPUSA total 16 drwxr-xr-x 3 gnu root 4096 Dec 31 1969 . drwxr-xr-x 6 root root 4096 Oct 23 03:44 .. drwxr-xr-x 3 gnu root 4096 Oct 23 2007 .olpc.store bash-3.1$ ls -la /media/COMPUSA/.olpc.store/ total 16 drwxr-xr-x 3 gnu root 4096 Oct 23 2007 . drwxr-xr-x 3 gnu root 4096 Dec 31 1969 .. drwxr-xr-x 2 gnu root 4096 Oct 23 2007 index -rwxr-xr-x 1 gnu root 107 Oct 23 2007 metainfo bash-3.1$ ls -la /media/COMPUSA/.olpc.store/index total 136 drwxr-xr-x 2 gnu root 4096 Oct 23 2007 . drwxr-xr-x 3 gnu root 4096 Oct 23 2007 .. -rwxr-xr-x 1 gnu root 2140 Oct 23 2007 config -rwxr-xr-x 1 gnu root 0 Oct 23 2007 flintlock -rwxr-xr-x 1 gnu root 12 Oct 23 2007 iamflint -rwxr-xr-x 1 gnu root 14 Oct 23 2007 position.baseA -rwxr-xr-x 1 gnu root 14 Oct 23 2007 position.baseB -rwxr-xr-x 1 gnu root 16384 Oct 23 2007 position.DB -rwxr-xr-x 1 gnu root 14 Oct 23 2007 postlist.baseA -rwxr-xr-x 1 gnu root 14 Oct 23 2007 postlist.baseB -rwxr-xr-x 1 gnu root 16384 Oct 23 2007 postlist.DB -rwxr-xr-x 1 gnu root 14 Oct 23 2007 record.baseA -rwxr-xr-x 1 gnu root 14 Oct 23 2007 record.baseB -rwxr-xr-x 1 gnu root 16384 Oct 23 2007 record.DB -rwxr-xr-x 1 gnu root 14 Oct 23 2007 termlist.baseA -rwxr-xr-x 1 gnu root 14 Oct 23 2007 termlist.baseB -rwxr-xr-x 1 gnu root 16384 Oct 23 2007 termlist.DB -rwxr-xr-x 1 gnu root 14 Oct 23 2007 value.baseA -rwxr-xr-x 1 gnu root 14 Oct 23 2007 value.baseB -rwxr-xr-x 1 gnu root 16384 Oct 23 2007 value.DB
What a load of binary trash!
The laptop shouldn't write to external USB drives at all -- unless the user writes some data to them. And when it does, it should write whatever files the user created -- no more, and no fewer. Whatever design, or lack thereof, that results in some XO program creating 19 files and two directories in place of a single file, should be redesigned.


