[Coco] RBF and LSN0

Chuck Youse cyouse at serialtechnologies.com
Mon Sep 22 23:46:07 EDT 2008


So I've written two RBF drivers in recent weeks, and a thought has a
occurred to me, and I'm wondering if anyone can shed light on this.  If
Boisy is lurking he's probably the guy with the answer.

So RBF drivers are required to update their drive tables with the LSN0
"superblock" information every time that LSN0 is read; this is so that
RBF can consult the drive table to find out useful filesystem
information, like the size in sectors, etc.  So every RBF driver is
required to take a special action on reading LSN 0, and perform
essentially the same task.

It seems like a lot of duplication of code.  RBF knows when it's reading
LSN0, and it knows where the drive tables are kept in the driver's
static data area; so why is this functionality pushed off to the driver?
It seems RBF has all the information required to do this itself.. it's
RBF-specific information, anyway -- if you're using a different file
manager, this action is probably superfluous.

So anyone know why this was designed this way?

C.





More information about the Coco mailing list