[Coco] No easy rename on OS-9 ?

Gene Heskett gheskett at wdtv.com
Sun Mar 30 23:28:38 EDT 2014


On Sunday 30 March 2014 23:13:15 Brett Gordon did opine:

> On Fri, Mar 28, 2014 at 7:27 PM, Gene Heskett <gheskett at wdtv.com> wrote:
> > On Friday 28 March 2014 19:20:57 Luis Antoniosi (CoCoDemus) did opine:
> > > it turns out that there is a mv on rtsi:
> > > 
> > > ftp://www.rtsi.com/OS9/OS9_6X09/UTILITIES/mv.ar
> > 
> > Yup, looked at it. It does the move by copying it to the target
> > location, then deleting it from the source location. Needlessly
> > complex, subject to disk errors etc, when all you really need to do
> > is pick up the $20 bytes of the source directory entry and put it in
> > the target directory.  The directory entry is moved, but not even the
> > FD sector is moved.  Then go back and null the first byte of the
> > source dir, and to be complete, run dsort on both directories.
> 
> Too bad OS9 doesn't include an interface for moving files.  A legal
> user-space program can only copy the file.  I thought that was odd too. 
> I guess MV isn't worthy enough for a syscall.
> 
> Brett

That "legality" is not the real problem Brett. There is no prohibition from 
the user doing only the directory entries $20 byte move from one dir to 
another as long as its on the same media/partition. The real problem is 
that because you have to write every byte of the code except the opens, 
seeks, writes, and closes, it is simply too big to even consider making it 
part of the os9boot file.

That said, there isn't any reason why a small module that translated from 
the syscall to issuing the I$Fork command to execute the mv couldn't be 
done.

I didn't dis the mv we have, after a while it just gets easier to write 
that sort of stuff from scratch, doing it right.  The end result is that it 
Just Works(TM).  Exactly what it was supposed to do.

Cheers, Gene
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>




More information about the Coco mailing list