[Coco] Files to os9
tim lindner
tlindner at macmess.org
Sat Sep 27 16:02:32 EDT 2008
Boisy Pitre <boisy at tee-boy.com> wrote:
> For some reason when my source is a native folder on the Mac, dsave
> returns an error 215.
I just update os9 dsave to support reading from the native file system.
Build a fresh copy from CVS to see the improvements.
g4:test tlindner$ l
total 320
-rw-r--r-- 1 tlindner tlindner 161280 Sep 27 12:30 decb.dsk
drwxr-xr-x 5 tlindner tlindner 170 Sep 27 12:25 work
g4:test tlindner$ ls -lR work
total 16
drwxr-xr-x 5 tlindner tlindner 170 Sep 27 12:26 adir
-rw-r--r--@ 1 tlindner tlindner 25 Sep 27 09:17 file1.txt
-rw-r--r--@ 1 tlindner tlindner 14 Sep 27 09:17 file2.txt
work/adir:
total 8
drwxr-xr-x 3 tlindner tlindner 102 Sep 27 12:26 bdir
drwxr-xr-x 3 tlindner tlindner 102 Sep 27 12:27 cdir
-rw-r--r--@ 1 tlindner tlindner 16 Sep 27 09:18 file3.txt
work/adir/bdir:
total 8
-rw-r--r--@ 1 tlindner tlindner 25 Sep 27 12:26 file1.txt
work/adir/cdir:
total 8
-rw-r--r--@ 1 tlindner tlindner 25 Sep 27 12:27 file1.txt
g4:test tlindner$ os9 format -q disk.dsk
g4:test tlindner$ os9 dsave work disk.dsk, -e
makdir disk.dsk,/adir
makdir disk.dsk,/adir/bdir
copy work/adir/bdir/file1.txt disk.dsk,/adir/bdir/file1.txt -b=32768
makdir disk.dsk,/adir/cdir
copy work/adir/cdir/file1.txt disk.dsk,/adir/cdir/file1.txt -b=32768
copy work/adir/file3.txt disk.dsk,/adir/file3.txt -b=32768
copy work/file1.txt disk.dsk,/file1.txt -b=32768
copy work/file2.txt disk.dsk,/file2.txt -b=32768
g4:test tlindner$ os9 dir -er disk.dsk,
Directory of disk.dsk,.
Owner Last modified Attributes Sector Bytecount Name
------- --------------- ---------- ------ --------- ----
0.0 2008/09/27 1247 d-ewrewr C 160 adir
0.0 2008/09/27 0917 ----r-wr 2E 25 file1.txt
0.0 2008/09/27 0917 ----r-wr 30 14 file2.txt
Directory of disk.dsk,./adir
Owner Last modified Attributes Sector Bytecount Name
------- --------------- ---------- ------ --------- ----
0.0 2008/09/27 1247 d-ewrewr 16 96 bdir
0.0 2008/09/27 1247 d-ewrewr 21 96 cdir
0.0 2008/09/27 0918 ----r-wr 2C 16 file3.txt
Directory of disk.dsk,./adir/bdir
Owner Last modified Attributes Sector Bytecount Name
------- --------------- ---------- ------ --------- ----
0.0 2008/09/27 1226 ----r-wr 1F 25 file1.txt
Directory of disk.dsk,./adir/cdir
Owner Last modified Attributes Sector Bytecount Name
------- --------------- ---------- ------ --------- ----
0.0 2008/09/27 1227 ----r-wr 2A 25 file1.txt
As an added bonus, os9 dsave can use any of the file systems as the
source libcoco supports: native, decb, os9, and cecb.
g4:test tlindner$ os9 format -q disk.dsk
g4:test tlindner$ decb dir decb.dsk,
file1 txt 0 B 1
file2 txt 0 B 1
g4:test tlindner$ os9 dsave decb.dsk, disk.dsk, -e
copy decb.dsk,file1.txt disk.dsk,/file1.txt -b=32768
copy decb.dsk,file2.txt disk.dsk,/file2.txt -b=32768
g4:test tlindner$ os9 dir -er disk.dsk,
Directory of disk.dsk,.
Owner Last modified Attributes Sector Bytecount Name
------- --------------- ---------- ------ --------- ----
0.0 2008/09/27 1248 ----r-wr B 25 file1.txt
0.0 2008/09/27 1248 ----r-wr D 14 file2.txt
Robert Gault (and other DOS/Windows users):
I had to add some features to libnative, so I broke your build. You'll
find an #error in libnative_read.c, you'll have to implement the new
feature for this to work. It should be pretty obvious on what to do.
--
tim lindner
tlindner at macmess.org Bright
More information about the Coco
mailing list